OVF datasource should check if instant id is still on VMware Platform
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Medium
|
Unassigned |
Bug Description
Currently DatasourceOVF does not check the instance id to determine if current instance is a new instance or not, so that every booting, cloud-init will go through entire datasource list.
This leads an issue:
When a VM's network is customized to static IP by cloud-init DatasourceOVF and then the VM is rebooted, the VM's network will be changed to DHCP after rebooting since this time no customization config file will be found. cloud-init uses DatasourceNone which change network to "default" configuration.
The expected behaviors are:
1. cloud-init checks the instance id to know if this instance is "iid-vmware-xxxxxx" which means it's a VMware VM. If yes, it should always use datasourceOVF.
2. When there has customization config file, datasourceOVF parse the configures and enable nics as usual.
3. When there is no customization config file, datasourceOVF wait for it until timeout and then cloud-init does NOT apply other datasources.
Related branches
- Scott Moser: Needs Fixing
-
Diff: 127 lines (+38/-20)2 files modifiedcloudinit/sources/DataSourceOVF.py (+34/-16)
tests/unittests/test_vmware_config_file.py (+4/-4)
Changed in cloud-init: | |
status: | New → Incomplete |
Changed in cloud-init: | |
status: | Incomplete → New |
Changed in cloud-init: | |
status: | New → Triaged |
Thanks for filling a bug.
Cloud-init does check instance-id by looking in /var/lib/ cloud/data/ at files 'instance-id' and 'previous- instance- id' and will check if the existing Datasource's metadata provides the same instance-id.
The behavior you describe *sounds* like the OVF datasource changed.
Please run cloud-init collect-logs as root and attach the tarball so we can see what's going on.
Thanks!