When files are injected into a disk image, they should have a comment e.g. "Injected during boot by the OpenStack cloud"

Bug #754950 reported by justinsb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Brian Waldon

Bug Description

When files are injected into a disk image, they should have a comment e.g. "# Injected during boot by the OpenStack cloud"

Otherwise it's difficult to know where they came from!

Revision history for this message
justinsb (justin-fathomdb) wrote :

To clarify, I mean files that are generated by nova, like /etc/network/interfaces and .ssh/authorized_keys, not files passed in the API call

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Mark McLoughlin (markmc) wrote :

Ok, for network config, just add the comment here:

  ./nova/virt/interfaces.template

For ssh keys and meta.js: just add the comment to the process_input args in:

  nova/virt/disk.py:_inject_key_into_fs()
  nova/virt/disk.py:_inject_metadata_into_fs()

It doesn't make sense to add a comment for files from files_to_inject, since we can't know their format

tags: added: low-hanging-fruit
Brian Waldon (bcwaldon)
Changed in nova:
assignee: nobody → Brian Waldon (bcwaldon)
Brian Waldon (bcwaldon)
Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Revision history for this message
Brian Waldon (bcwaldon) wrote :

We can't inject into the metadata file since it is a json object (which you can't pollute with comments!)

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

Reviewed: https://review.openstack.org/3701
Committed: http://github.com/openstack/nova/commit/76e79792b4b94c9edac0ebf3cdf3eb49c7999398
Submitter: Jenkins
Branch: master

commit 76e79792b4b94c9edac0ebf3cdf3eb49c7999398
Author: Brian Waldon <email address hidden>
Date: Thu Feb 2 12:06:38 2012 -0800

    Add comments to injected keys and network config

    Fixes bug 754950

    Change-Id: Ib773479c3b34b9ddd322abd02b297acf5359a847

Changed in nova:
status: In Progress → Fix Committed
Brian Waldon (bcwaldon)
Changed in nova:
milestone: none → essex-4
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-4 → 2012.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.