~raharper/cloud-init/config-drive-network-data

Viewing all changes in revision 1178.4.1.

  • Committer: Scott Moser
  • Date: 2016-03-22 01:47:24 UTC
  • mto: (1178.2.10 trunk)
  • mto: This revision was merged to the branch mainline in revision 1200.
  • Revision ID: smoser@ubuntu.com-20160322014724-7d4psmyqzj9kvwip
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
3 classes:
  DataSourceAzure (check dmi data)
  DataSourceOpenstack (check dmi data)
  DataSourceNocloud (check the seeded data or kernel command line)

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: