cloud-init paths different on Ubuntu hosts

Bug #1072921 reported by Angus Salkeld
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Jeff Peeler
Grizzly
Fix Released
High
Jeff Peeler

Bug Description

cfn-userdata is located /var/lib/cloud/data/scripts/ vs the expected location of /var/lib/cloud/data. This breaks the provision logging as well as the provision completion file touching.

shardy
---------
I noticed this too, wonder if we can just drop some directory symlinks in as part of building the jeos (ie after cloud-init is installed, which owns /var/lib/cloud, but annoyingly not the subdirectories, so I guess it creates those at runtime)

If the above approach is viable then I guess this should be a heat-jeos issue

zane
--------
Note that in the case of the provision-finished file, it's the missing /var/lib/cloud/instance path that's the problem.

jpeeler
--------
I'm wondering if we shouldn't put logic in the scripts to handle cloud-init path handling. Thoughts on that? I'm unsure if the locations changed due to different version or distro, but I'm assuming at least the locations are fairly static now. (There's also the issue of assuming execution of runcmd will be successful which I have a fix for, so I think there's a precedent to making sure script execution is successful lies with the script itself - unless somebody knows of a cloud-config option I haven't found.)

Angus Salkeld (asalkeld)
Changed in heat:
status: New → Triaged
importance: Undecided → High
Angus Salkeld (asalkeld)
Changed in heat:
milestone: none → grizzly-3
Jeff Peeler (jpeeler-z)
Changed in heat:
assignee: nobody → Jeff Peeler (jpeeler-z)
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/19133

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

Reviewed: https://review.openstack.org/19133
Committed: http://github.com/openstack/heat/commit/93c3d93ec481d81e97d4b120384b5e1d93ca6532
Submitter: Jenkins
Branch: master

commit 93c3d93ec481d81e97d4b120384b5e1d93ca6532
Author: Jeff Peeler <email address hidden>
Date: Mon Jan 7 12:36:20 2013 -0500

    Handle different cloud-init versions gracefully

    Change loguserdata script to python to allow easy detection of which
    version of cloud-init installed. Some logging was added to
    part-handler.

    Took out injecting the command to touch provision-finished in the user
    data. This is now handled in loguserdata.py.

    Note that up until cloud-init version 0.6.0, the user data is not
    passed to part-handler. This behavior is why it's not possible to log
    the provisioning process with older versions. (Technically could rely
    on the redirection support added post 0.6.0, but having a separate
    file just for provisioning seems beneficial.)

    fixes bug 1072921

    Change-Id: I9005a21bfb74f27208f9195a6e10e1d2b474e91f
    Signed-off-by: Jeff Peeler <email address hidden>

Changed in heat:
status: In Progress → Fix Committed
Steven Hardy (shardy)
Changed in heat:
milestone: grizzly-3 → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: grizzly-2 → 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.