** Description changed: + === Begin SRU Template === + [Impact] + The 'Paths' class has a 'run_dir' attribute that was introduced since the release of Trusty. Because of this, performing a `do-release-upgrade` on Trusty followed by a reboot will have cloud-init fail with a traceback. + + The change here should fix that failure. + + [Test Plan] + - Launch a Trusty instance + - Perform a `do-release-upgrade` + - Reboot + + 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: https://github.com/canonical/cloud-init/pull/863 + Commit: https://github.com/canonical/cloud-init/commit/83f6bbfbe5b924be61a3c098f4202377d69c8947 + + == End SRU Template == + + == Original Description == + After performing a do-release-upgrade from stock trusty to xenial and rebooting cloud-init traces in it's attempt to preserve instance data: Probably obj.pkl issues across upgrade and a need to refresh Paths object after the dist upgrade. 2020-10-10 18:01:02,377 - util.py[DEBUG]: Read 298 bytes from /etc/os-release 2020-10-10 18:01:02,378 - util.py[WARNING]: failed stage init-local 2020-10-10 18:01:02,379 - util.py[DEBUG]: failed stage init-local Traceback (most recent call last): - File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 653, in status_wrapper - ret = functor(name, args) - File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 351, in main_init - _maybe_persist_instance_data(init) - File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 695, in _maybe_persist_instance_data - init.datasource.persist_instance_data() - File "/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 332, in persist_instance_data - json_sensitive_file = os.path.join(self.paths.run_dir, + File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 653, in status_wrapper + ret = functor(name, args) + File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 351, in main_init + _maybe_persist_instance_data(init) + File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 695, in _maybe_persist_instance_data + init.datasource.persist_instance_data() + File "/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py", line 332, in persist_instance_data + json_sensitive_file = os.path.join(self.paths.run_dir, AttributeError: 'Paths' object has no attribute 'run_dir' ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: cloud-init 20.3-2-g371b392c-0ubuntu1~16.04.1 ProcVersionSignature: Ubuntu 5.4.0-48.52-generic 5.4.60 Uname: Linux 5.4.0-48-generic x86_64 ApportVersion: 2.20.1-0ubuntu2.25 Architecture: amd64 CloudName: LXD Date: Sat Oct 10 21:22:46 2020 PackageArchitecture: all ProcEnviron: - TERM=xterm-256color - PATH=(custom, no user) - LANG=C.UTF-8 + TERM=xterm-256color + PATH=(custom, no user) + LANG=C.UTF-8 SourcePackage: cloud-init UpgradeStatus: Upgraded to xenial on 2020-10-10 (0 days ago) cloud-init-log-warnings: - 2020-10-10 18:01:02,378 - util.py[WARNING]: failed stage init-local - AttributeError: 'Paths' object has no attribute 'run_dir' - 2020-10-10 18:01:02,979 - util.py[WARNING]: failed stage init - AttributeError: 'Paths' object has no attribute 'run_dir' + 2020-10-10 18:01:02,378 - util.py[WARNING]: failed stage init-local + AttributeError: 'Paths' object has no attribute 'run_dir' + 2020-10-10 18:01:02,979 - util.py[WARNING]: failed stage init + AttributeError: 'Paths' object has no attribute 'run_dir'
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1899299 Title: do-release-upgrade from Trusty to Xenial breaks cloud-init init-local on reboot To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1899299/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
