heat-config script hook fails when an input value is None

Bug #1532183 reported by Marcin Lewandowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Heat Templates
New
Undecided
Unassigned

Bug Description

heat-config script hook fails when an input value is None (not given). This occurs when the script is a python script.
What's even worse about this problem, is that the resulting software deployment is marked as successful (should rather be error).

The relevant template excerpt:

resources:
  config:
    type: OS::Heat::SoftwareConfig
    properties:
      group: script
      inputs:
        - name: JSONTEST
          type: Json
      config: |
        #!/usr/bin/env python
        # ... the contents are irrelevant because never called

The relevant log excerpt (manually truncated for better readability):

...
os-collect-config: [2016-01-08 12:31:35,798] (heat-config) [INFO] JSONTEST=None
os-collect-config: [2016-01-08 12:31:35,798] (heat-config) [INFO] deploy_server_id=ea749d66-0122-4dd2-85b2-69178457a0dc
...
os-collect-config: [2016-01-08 12:31:35,799] (heat-config) [DEBUG] Running /var/lib/heat-config/heat-config-script/684245ec-52a7-45b7-a506-9d5b996c0147
os-collect-config: Traceback (most recent call last):
os-collect-config: File "/var/lib/heat-config/hooks/script", line 96, in <module>
os-collect-config: sys.exit(main(sys.argv))
os-collect-config: File "/var/lib/heat-config/hooks/script", line 66, in main
os-collect-config: stderr=subprocess.PIPE, env=env)
os-collect-config: File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
os-collect-config: errread, errwrite)
os-collect-config: File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
os-collect-config: raise child_exception
os-collect-config: TypeError: execve() arg 3 contains a non-string value
os-collect-config:
os-collect-config: [2016-01-08 12:31:35,807] (heat-config) [ERROR] Error running /var/lib/heat-config/hooks/script. [1]
...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.