AttributeError: 'DataSourceNoCloud' object has no attribute 'vendordata2_raw'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
James Falcon | ||
cloud-init (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Groovy |
Fix Released
|
Undecided
|
Unassigned | ||
Hirsute |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
=== Begin SRU Template ===
[Impact]
In PR #777, we added 'vendordata2' and 'vendordata2_raw' attributes to the DataSource class, but didn't use the upgrade framework to deal with an unpickle after upgrade. Because of this, anybody upgrading their cloud-init from an older version to 21.1 who hasn't also run `cloud-init clean` will have cloud-init fail with a traceback.
The change here should fix that failure.
[Test Plan]
Launch an instance or install a cloud-init package using version earlier than 21.1-19-
Upgrade to 21.1-19-
On un-patched versions, `cloud-init status` will show error, and there will be a traceback in /var/log/
[Where problems could occur]
Any problem here would mean we're continuing to unpickle data incorrectly, thus we'd see similar behavior to the bug we're fixing.
[Other Info]
Pull request: https:/
Commit: https:/
A test has also been added upstream and to our CI to prevent these types of errors from happening in the future: https:/
== End SRU Template ==
== Original Description ==
On a test LXD VM instance, I see:
2021-04-06 14:05:11,296 - util.py[WARNING]: failed stage init
2021-04-06 14:05:11,302 - util.py[DEBUG]: failed stage init
Traceback (most recent call last):
File "/usr/lib/
ret = functor(name, args)
File "/usr/lib/
init.update()
File "/usr/lib/
self.
File "/usr/lib/
return self.vendordata
AttributeError: 'DataSourceNoCloud' object has no attribute 'vendordata2_raw'
Changed in cloud-init: | |
importance: | Undecided → High |
assignee: | nobody → James Falcon (falcojr) |
status: | New → Incomplete |
status: | Incomplete → Triaged |
description: | updated |
description: | updated |
Oh, actually, this may be because of the mid-boot reboot that LXD agent installation now causes to happen.