-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'DataSourceNoCloud' object has no attribute 'vendordata2_raw' #3864
Comments
Launchpad user Dan Watkins(oddbloke) wrote on 2021-04-06T14:10:32.837405+00:00 Launchpad attachments: cloud-init.tar.gz |
Launchpad user Dan Watkins(oddbloke) wrote on 2021-04-06T14:28:40.626821+00:00 Oh, actually, this may be because of the mid-boot reboot that LXD agent installation now causes to happen. |
Launchpad user Dan Watkins(oddbloke) wrote on 2021-04-06T14:33:38.922457+00:00 (I can't reproduce this post-bionic, which lends credence to that hypothesis.) |
Launchpad user Chad Smith(chad.smith) wrote on 2021-04-15T18:59:59.289605+00:00 I see reproduce this with the following: |
Launchpad user Chad Smith(chad.smith) wrote on 2021-04-15T19:10:43.371138+00:00 That said, intermittent reproducer above. Second attempt didn't hit it. |
Launchpad user James P(james-pansarasa) wrote on 2021-04-16T12:38:44.739615+00:00 I see this consistently on the two bare metal instances I have running 20.04.2 LTS (5.4.0-72-generic) |
Launchpad user James Falcon(falcojr) wrote on 2021-04-16T19:06:01.167627+00:00 I have a PR here: #869 |
Launchpad user Paul Tötterman(ptman) wrote on 2021-04-17T05:05:54.713399+00:00 I'm probably hitting this as well. dpkg.log:2021-04-16 09:46:40 upgrade cloud-init:all 20.4.1-0ubuntu1 Apr 17 06:59:03 cloud-init[580]: 2021-04-17 04:59:03,191 - util.py[WARNING]: failed stage init |
Launchpad user Taylor Yu(tlyu) wrote on 2021-04-17T23:03:42.804920+00:00 Confirmed that removing/renaming obj.pkl appears to work around this issue without causing obvious problems. This was on Ubuntu 16.04.7 LTS, with DataSourceDigitalOcean. |
Launchpad user Dan Watkins(oddbloke) wrote on 2021-04-19T16:31:54.587215+00:00 A fix for this landed just now in d132356 |
Launchpad user Launchpad Janitor(janitor) wrote on 2021-04-20T09:49:32.796117+00:00 Status changed to 'Confirmed' because the bug affects multiple users. |
4 similar comments
Launchpad user Launchpad Janitor(janitor) wrote on 2021-04-20T09:49:32.796117+00:00 Status changed to 'Confirmed' because the bug affects multiple users. |
Launchpad user Launchpad Janitor(janitor) wrote on 2021-04-20T09:49:32.796117+00:00 Status changed to 'Confirmed' because the bug affects multiple users. |
Launchpad user Launchpad Janitor(janitor) wrote on 2021-04-20T09:49:32.796117+00:00 Status changed to 'Confirmed' because the bug affects multiple users. |
Launchpad user Launchpad Janitor(janitor) wrote on 2021-04-20T09:49:32.796117+00:00 Status changed to 'Confirmed' because the bug affects multiple users. |
Launchpad user Brian Murray(brian-murray) wrote on 2021-04-20T21:55:08.289874+00:00 Hello Dan, or anyone else affected, Accepted cloud-init into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/21.1-19-gbad84ad4-0ubuntu1~20.10.2 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. |
Launchpad user Brian Murray(brian-murray) wrote on 2021-04-20T21:55:09.953487+00:00 Hello Dan, or anyone else affected, Accepted cloud-init into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/21.1-19-gbad84ad4-0ubuntu1~20.10.2 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. |
Launchpad user Brian Murray(brian-murray) wrote on 2021-04-20T22:00:46.716948+00:00 Hello Dan, or anyone else affected, Accepted cloud-init into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/21.1-19-gbad84ad4-0ubuntu1~20.04.2 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. |
Launchpad user Brian Murray(brian-murray) wrote on 2021-04-20T22:00:49.199068+00:00 Hello Dan, or anyone else affected, Accepted cloud-init into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/21.1-19-gbad84ad4-0ubuntu1~20.04.2 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. |
Launchpad user Brian Murray(brian-murray) wrote on 2021-04-20T22:02:50.222247+00:00 Hello Dan, or anyone else affected, Accepted cloud-init into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/21.1-19-gbad84ad4-0ubuntu1~18.04.2 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. |
Launchpad user Brian Murray(brian-murray) wrote on 2021-04-20T22:02:52.627776+00:00 Hello Dan, or anyone else affected, Accepted cloud-init into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/21.1-19-gbad84ad4-0ubuntu1~18.04.2 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. |
Launchpad user Brian Murray(brian-murray) wrote on 2021-04-20T22:04:30.510186+00:00 Hello Dan, or anyone else affected, Accepted cloud-init into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/21.1-19-gbad84ad4-0ubuntu1~16.04.2 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. |
Launchpad user Brian Murray(brian-murray) wrote on 2021-04-20T22:04:32.188060+00:00 Hello Dan, or anyone else affected, Accepted cloud-init into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/21.1-19-gbad84ad4-0ubuntu1~16.04.2 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. |
Launchpad user glitsj16(glitsj16) wrote on 2021-04-20T23:11:28.530734+00:00 I originally filed https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1924755 and got informed that was a duplicate of this bug. I just installed the proposed fix from https://launchpad.net/ubuntu/+source/cloud-init/21.1-19-gbad84ad4-0ubuntu1~16.04.2. I can confirm this fixes it for me on Xenial. Thanks to all involved, regards. |
Launchpad user Taylor Yu(tlyu) wrote on 2021-04-20T23:37:19.872909+00:00 Verified on 20.04.2 LTS focal. Got this in the wild in /var/log/cloud-init.log after upgrading from 20.3-2-g371b392c-0ubuntu1 2021-04-16 19:42:33,005 - util.py[WARNING]: failed stage init Installed 21.1-19-gbad84ad4-0ubuntu1~20.04.2; rebooted. Confirmed no traceback in /var/log/cloud-init.log. cloud-init status --long reports: status: done instead of an error as with the previous version. Thanks! |
Launchpad user James P(james-pansarasa) wrote on 2021-04-21T13:14:22.021443+00:00 Verified fixed for 20.04.2 LTS (5.4.0-72-generic) |
Launchpad user Dan Watkins(oddbloke) wrote on 2021-04-22T15:28:03.339458+00:00 I'm performing verification of this locally using the cloud-init integration testing framework. Specifically, I'm running test_upgrade_package[0] with the following diff applied (to trigger this bug): @@ -104,18 +104,19 @@ def test_upgrade(session_cloud: IntegrationCloud): @pytest.mark.ci
+def test_subsequent_boot_of_upgraded_package(session_cloud: IntegrationCloud):
The important changes here are that I can run it against both the release pocket and -proposed, and that it doesn't perform a clean any longer. I'll propose these changes to cloud-init upstream after validation is complete. |
Launchpad user Dan Watkins(oddbloke) wrote on 2021-04-22T15:52:13.456093+00:00 For groovy, I'm testing with the $ CLOUD_INIT_OS_IMAGE=ubuntu:bac1692e9ec7::ubuntu::groovy CLOUD_INIT_CLOUD_INIT_SOURCE=UPGRADE pytest tests/integration_tests/test_upgrade.py::test_subsequent_boot_of_upgraded_package and I then verify that the same test passes with the package in groovy-proposed: $ CLOUD_INIT_OS_IMAGE=ubuntu:bac1692e9ec7::ubuntu::groovy CLOUD_INIT_CLOUD_INIT_SOURCE=PROPOSED pytest tests/integration_tests/test_upgrade.py::test_subsequent_boot_of_upgraded_package |
Launchpad user Dan Watkins(oddbloke) wrote on 2021-04-22T16:13:03.469927+00:00 For focal, I'm performing the same process but with the UPGRADE does fail: $ CLOUD_INIT_OS_IMAGE=ubuntu:b321e3832dbb::ubuntu::focal CLOUD_INIT_CLOUD_INIT_SOURCE=UPGRADE pytest tests/integration_tests/test_upgrade.py::test_subsequent_boot_of_upgraded_package and PROPOSED passes: $ CLOUD_INIT_OS_IMAGE=ubuntu:b321e3832dbb::ubuntu::focal CLOUD_INIT_CLOUD_INIT_SOURCE=PROPOSED pytest tests/integration_tests/test_upgrade.py::test_subsequent_boot_of_upgraded_package |
Launchpad user Dan Watkins(oddbloke) wrote on 2021-04-22T16:18:42.482673+00:00 For bionic, I'm performing the same process but with the UPGRADE does fail: $ CLOUD_INIT_OS_IMAGE=ubuntu:c2bdb694ecc2::ubuntu::bionic CLOUD_INIT_CLOUD_INIT_SOURCE=UPGRADE pytest tests/integration_tests/test_upgrade.py::test_subsequent_boot_of_upgraded_package $ CLOUD_INIT_OS_IMAGE=ubuntu:c2bdb694ecc2::ubuntu::bionic CLOUD_INIT_CLOUD_INIT_SOURCE=PROPOSED pytest tests/integration_tests/test_upgrade.py::test_subsequent_boot_of_upgraded_package |
Launchpad user Dan Watkins(oddbloke) wrote on 2021-04-22T16:28:00.607308+00:00 For xenial, I'm performing the same process but with the UPGRADE does fail: $ CLOUD_INIT_OS_IMAGE=ubuntu:bb8e87956495::ubuntu::xenial CLOUD_INIT_CLOUD_INIT_SOURCE=UPGRADE pytest tests/integration_tests/test_upgrade.py::test_subsequent_boot_of_upgraded_package $ CLOUD_INIT_OS_IMAGE=ubuntu:bb8e87956495::ubuntu::xenial CLOUD_INIT_CLOUD_INIT_SOURCE=PROPOSED pytest tests/integration_tests/test_upgrade.py::test_subsequent_boot_of_upgraded_package |
Launchpad user Launchpad Janitor(janitor) wrote on 2021-04-23T11:38:24.550885+00:00 This bug was fixed in the package cloud-init - 21.1-19-gbad84ad4-0ubuntu3 cloud-init (21.1-19-gbad84ad4-0ubuntu3) hirsute; urgency=medium
-- James Falcon james.falcon@canonical.com Mon, 19 Apr 2021 13:41:21 -0500 |
Launchpad user Dan Watkins(oddbloke) wrote on 2021-04-27T18:16:30.030216+00:00 For hirsute, the bug does not reproduce on upgrade from the release day image. However, it can present when upgrading between releases. To test, I launched a groovy instance with an old cloud-init (the same image as previously for groovy validation). I performed a I then launched another groovy instance, performed another release upgrade but, before rebooting, installed cloud-init from hirsute-proposed. On reboot, I then did not see the Traceback for this bug. |
Launchpad user James Falcon(falcojr) wrote on 2021-04-27T18:45:00.554021+00:00 For regression testing, I ran the suite of cloud-init integration tests against hirsute. |
Launchpad user Launchpad Janitor(janitor) wrote on 2021-04-27T19:27:52.380393+00:00 This bug was fixed in the package cloud-init - 21.1-19-gbad84ad4-0ubuntu3 cloud-init (21.1-19-gbad84ad4-0ubuntu3) hirsute; urgency=medium
-- James Falcon james.falcon@canonical.com Mon, 19 Apr 2021 13:41:21 -0500 |
Launchpad user Łukasz Zemczak(sil2100) wrote on 2021-04-27T19:28:01.412174+00:00 The verification of the Stable Release Update for cloud-init has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions. |
Launchpad user Launchpad Janitor(janitor) wrote on 2021-04-27T19:28:20.676161+00:00 This bug was fixed in the package cloud-init - 21.1-19-gbad84ad4-0ubuntu1~20.10.2 cloud-init (21.1-19-gbad84ad4-0ubuntu1~20.10.2) groovy; urgency=medium
-- James Falcon james.falcon@canonical.com Mon, 19 Apr 2021 13:58:19 -0500 |
Launchpad user Launchpad Janitor(janitor) wrote on 2021-04-27T19:28:46.660806+00:00 This bug was fixed in the package cloud-init - 21.1-19-gbad84ad4-0ubuntu1~20.04.2 cloud-init (21.1-19-gbad84ad4-0ubuntu1~20.04.2) focal; urgency=medium
-- James Falcon james.falcon@canonical.com Mon, 19 Apr 2021 14:00:12 -0500 |
Launchpad user Launchpad Janitor(janitor) wrote on 2021-04-27T19:28:57.700274+00:00 This bug was fixed in the package cloud-init - 21.1-19-gbad84ad4-0ubuntu1~18.04.2 cloud-init (21.1-19-gbad84ad4-0ubuntu1~18.04.2) bionic; urgency=medium
-- James Falcon james.falcon@canonical.com Mon, 19 Apr 2021 14:02:27 -0500 |
Launchpad user Launchpad Janitor(janitor) wrote on 2021-04-27T19:29:14.683272+00:00 This bug was fixed in the package cloud-init - 21.1-19-gbad84ad4-0ubuntu1~16.04.2 cloud-init (21.1-19-gbad84ad4-0ubuntu1~16.04.2) xenial; urgency=medium
-- James Falcon james.falcon@canonical.com Mon, 19 Apr 2021 14:06:47 -0500 |
Launchpad user James Falcon(falcojr) wrote on 2021-05-05T20:34:55.126662+00:00 This bug is believed to be fixed in cloud-init in version 21.2. If this is still a problem for you, please make a comment and set the state back to New Thank you. |
This bug was originally filed in Launchpad as LP: #1922739
Launchpad details
Launchpad user Dan Watkins(oddbloke) wrote on 2021-04-06T14:10:00.781519+00:00
=== 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-gbad84ad4-0ubuntu1 (if downgrading also run
cloud-init clean
).Upgrade to 21.1-19-gbad84ad4-0ubuntu1 or later, then reboot (without running
cloud-init clean
).On un-patched versions,
cloud-init status
will show error, and there will be a traceback in /var/log/cloud-init.log. Patched versions should show no error or traceback.[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: #869
Commit: d132356
A test has also been added upstream and to our CI to prevent these types of errors from happening in the future: https://github.com/canonical/cloud-init/blob/master/tests/integration_tests/test_upgrade.py#L107
== 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/python3/dist-packages/cloudinit/cmd/main.py", line 652, in status_wrapper
ret = functor(name, args)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 376, in main_init
init.update()
File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 371, in update
self._store_raw_vendordata(self.datasource.get_vendordata2_raw(),
File "/usr/lib/python3/dist-packages/cloudinit/sources/init.py", line 506, in get_vendordata2_raw
return self.vendordata2_raw
AttributeError: 'DataSourceNoCloud' object has no attribute 'vendordata2_raw'
The text was updated successfully, but these errors were encountered: