If there is no Userdata, loguserdata.py should not try to execute it.

Bug #1154641 reported by Clint Byrum
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Low
Angus Salkeld

Bug Description

loguserdata.py explodes if userdata is not an executable:

Traceback (most recent call last):
  File "/var/lib/cloud/instance/scripts/loguserdata.py", line 52, in <module>
    returncode = main(log)
  File "/var/lib/cloud/instance/scripts/loguserdata.py", line 44, in main
    returncode = call([userdata_path], log)
  File "/var/lib/cloud/instance/scripts/loguserdata.py", line 26, in call
    p = subprocess.Popen(args, stdout=log, stderr=log)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
2013-03-13 03:56:11,929 - util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/loguserdata.py [1]

This is a completely normal situation and should just be logged.

Angus Salkeld (asalkeld)
Changed in heat:
assignee: nobody → Angus Salkeld (asalkeld)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/24399

Changed in heat:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/24400

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/24399
Committed: http://github.com/openstack/heat/commit/fbea93155097d283b3b1b479d2c3ade3c233d287
Submitter: Jenkins
Branch: master

commit fbea93155097d283b3b1b479d2c3ade3c233d287
Author: Angus Salkeld <email address hidden>
Date: Thu Mar 14 12:33:23 2013 +1100

    loguserdata: prevent shadowing of arguments and globals

    cleaning this up for bug 1154641

    Change-Id: I95271bdeba1bba29e78af79de4e2173d07750e4f
    Signed-off-by: Angus Salkeld <email address hidden>

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/24400
Committed: http://github.com/openstack/heat/commit/655e377d456b090a061f8c34a050284ed2e4b6ee
Submitter: Jenkins
Branch: master

commit 655e377d456b090a061f8c34a050284ed2e4b6ee
Author: Angus Salkeld <email address hidden>
Date: Thu Mar 14 14:21:55 2013 +1100

    loguserdata: handle exceptions from running the userdata

    - log the exceptions so the user can diagnose issues.

    bug 1154641
    Change-Id: Ic085c9f062255a9fa44b3e31b464c9ebd19a947c
    Signed-off-by: Angus Salkeld <email address hidden>

Thierry Carrez (ttx)
Changed in heat:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: grizzly-rc1 → 2013.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.