~harlowja/cloud-init/launch-index-work

Viewing all changes in revision 635.

  • Committer: Joshua Harlow
  • Date: 2012-08-26 22:04:06 UTC
  • Revision ID: harlowja@yahoo-inc.com-20120826220406-oy5wlqocal3cecu1
Add the capability to understand and filter on
userdata based on a launch-index (or leave userdata
alone if none is provided by the datasource). This
works by doing the following. 

1. Adjusting the userdata processor to attempt to
   inject a "Launch-Index" header into the messages
   headers (by either taking a header that already exists
   or by looking into the payload to see if it exists
   there). 
2. Adjust the get_userdata ds function to apply a filter
   on the returned userdata (defaulting to false) that
   will now use the datasources get_launch_index value
   to restrict the 'final' message used in consuming 
   user data (the same behavior if not existent). 
3. Further down the line processes that use the 'resultant'
   userdata now will only see the ones for there own launch
   index (ie cloud-config will be restricted automatically
   and so on) and are unaffected (although they can now
   ask the cloud object or the datasource for its launch index
   via the above new ds method.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: