Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

With below Heat statements under runcmd:

  - str_replace:
    template: dns-statroute-eth0.sh %eth0_gateway% %oam_stat_routes%
    parameters:
      "%eth0_gateway%": { get_param: dns_oam_gateway }
      "%oam_stat_routes%": { get_param: oam_stat_routes }

The VM was launched but the intended command failed to be executed. Here is the related content in /var/lib/cloud/instances/58acd270-3622-48cf-96ef-9ff73d579693/user-data.txt file. Seems the parameter replacement didn't happen.

#cloud-config
runcmd:
- parameters: {'%eth0_gateway%': 135.21.183.97, '%oam_stat_routes%': 135.25.0.0/16
      135.207.127.0/24 192.111.196.0/24 199.37.242.0/24 135.47.236.0/24}
  str_replace: null
  template: dns-statroute-eth0.sh %eth0_gateway% %oam_stat_routes%

With below Heat statements under runcmd:

  - str_replace:
    template: dns-statroute-eth0.sh %eth0_gateway% %oam_stat_routes%
    parameters:
      "%eth0_gateway%": { get_param: dns_oam_gateway }
      "%oam_stat_routes%": { get_param: oam_stat_routes }

The VM was launched but the intended command failed to be executed. Here is the related content in /var/lib/cloud/instances/58acd270-3622-48cf-96ef-9ff73d579693/user-data.txt file. Seems the parameter replacement didn't happen.

#cloud-config
runcmd:
- parameters: {'%eth0_gateway%': 135.21.183.97, 192.168.183.97, '%oam_stat_routes%': 135.25.0.0/16
192.168.0.0/16       135.207.127.0/24 192.111.196.0/24 199.37.242.0/24 135.47.236.0/24}
192.168.127.0/24 }
  str_replace: null
  template: dns-statroute-eth0.sh %eth0_gateway% %oam_stat_routes%