~cloud-init-dev/cloud-init/trunk

Viewing all changes in revision 1188.

  • Committer: Scott Moser
  • Date: 2016-03-22 02:30:56 UTC
  • mfrom: (1187.1.2 trunk.quick)
  • Revision ID: smoser@ubuntu.com-20160322023056-aqcuwhoq7yyier6y
quickly check to see if the previous instance id is still valid

This adds a check in cloud-init to see if the existing (cached)
datasource is still valid.  It relies on support from the Datasource
to implement 'check_instance_id'.  That method should quickly determine
(if possible) if the instance id found in the datasource is still valid.

This means that we can still notice new instance ids without
depending on a network datasource on every boot.

I've also implemented check_instance_id for the superclass and for
sources:
  DataSourceAzure (check dmi data)
  DataSourceConfigDrive (check dmi data)
  DataSourceNocloud (check the seeded data or kernel command line)
  DataSourceOpenstack (check dmi data)

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: