NodeUserData continues even if one SoftwareConfig fails

asked 2017-12-18 08:28:00 -0500

alp317 gravatar image

updated 2017-12-18 08:29:19 -0500

I am using first boot scripts to generate and configure parameters for my environment.

I have a first-boot.yaml file, that contains a MultipartMime.

    type: OS::Heat::MultipartMime
      - config: {get_resource: generate}
      - config: {get_resource: configure}

The generate resource is a python script, and generate some values and places them in a file. Similarly the configure resource is a bash script that will read the values and configure them.

    type: OS::Heat::SoftwareConfig
      group: script
      config: | 

Now this works fine for most scenarios. But sometimes the python script fails because it couldn't find the desired file.

At this point i want my Stack creation (overcloud deployment) to fail. But it keeps going and then the configure script also fails. Can anyone please tell me how to add checks here that ensures that python script exited with status code 0.

edit retag flag offensive close merge delete