** Summary changed:
- ConfigDrive datasource fails when metadata files is null
+ [SRU] ConfigDrive datasource fails when metadata files is null
** Description changed:
- On Ubuntu 12.04, cloud-init fails to provision when ConfigDrive data has
- a null value for "files":
+ SRU Justification
+ [IMPACT] On Ubuntu 12.04, cloud-init fails to provision when ConfigDrive
+ data has a null value for "files". Instances are DOA.
+
+ [FIX] Cloud-init should check if "files" is a valid value.
+
+ [REGRESSION POTENTIAL] This change is low-risk as it is error-hardening.
+
+ [TEST CASES 1] :
+ 1. Build new images from proposed
+ 2. Boot image on Cloud with files as null
+ 3. Boot image on Cloud with files populated
+ 4. Check to make sure that cloud-init provisioned with out errors
+
+ [TEST CASE 2]:
+ 1. Build existing Ubuntu image on ConfigDrive provisioned cloud
+ 2. Check for any errors in the logs
+ 3. Upgrade cloud-init
+ 4. Reboot and check for errors in logs
+ 5. Create a new instance from existing instance
+ 6. Check for errors in the log.
+
+ [FROM ORIGINAL REPORT]
Sep 4 18:46:28 utl-precise-0904-88f2e9 [CLOUDINIT] __init__.py[WARNING]:
get_data of DataSourceConfigDriveNet raised Failed to read file []: list
indices must be integers, not str
Sep 4 18:46:28 utl-precise-0904-88f2e9 [CLOUDINIT] util.py[DEBUG]: Traceback
(most recent call last):#012 File
"/usr/lib/python2.7/dist-packages/cloudinit/__init__.py", line 215, in
get_data_source#012 if s.get_data():#012 File
"/usr/lib/python2.7/dist-packages/cloudinit/DataSourceConfigDrive.py", line
138, in get_data#012 results = read_config_drive_dir(self.seed_dir)#012
File "/usr/lib/python2.7/dist-packages/cloudinit/DataSourceConfigDrive.py",
line 321, in read_config_drive_dir#012 data = finder(source_dir)#012 File
"/usr/lib/python2.7/dist-packages/cloudinit/DataSourceConfigDrive.py", line
392, in read_config_drive_dir_v2#012 raise BrokenConfigDriveDir("Failed to
read file %s: %s" % (item, exc))#012BrokenConfigDriveDir: Failed to read file
[]: list indices must be integers, not str
Sep 4 18:46:28 utl-precise-0904-88f2e9 [CLOUDINIT] __init__.py[DEBUG]: Did
not find data source. searched classes: ['DataSourceConfigDriveNet']
- root@utl-precise-0904-88f2e9:/#
-
+ root@utl-precise-0904-88f2e9:/#
meta_data.json:
{
- "domain": "foobar.com",
- "files": [
- []
- ],
- "hostname": "utl-precise-0904-88f2e9",
- "meta": {
- "dsmode": "net"
- },
- "name": "utl-precise-0904-88f2e9",
- "network_config": {
- "content_path": "/content/interfaces"
- },
- "public_keys": {
- "177313": "<REDACTED FOR READABILITY>"
- },
- "uuid": "9ba148b1-74d2-7f3f-2e8d-68746513d09f"
+ "domain": "foobar.com",
+ "files": [
+ []
+ ],
+ "hostname": "utl-precise-0904-88f2e9",
+ "meta": {
+ "dsmode": "net"
+ },
+ "name": "utl-precise-0904-88f2e9",
+ "network_config": {
+ "content_path": "/content/interfaces"
+ },
+ "public_keys": {
+ "177313": "<REDACTED FOR READABILITY>"
+ },
+ "uuid": "9ba148b1-74d2-7f3f-2e8d-68746513d09f"
}
** Changed in: cloud-init (Ubuntu Precise)
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1492420
Title:
[SRU] ConfigDrive datasource fails when metadata files is null
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1492420/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs