← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1899299] Re: do-release-upgrade from Trusty to Xenial breaks cloud-init init-local on reboot

 

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

  * cherry-pick 83f6bbfb: Fix unpickle for source paths missing run_dir
    (#863) (LP: #1899299)
  * cherry-pick d132356c: fix error on upgrade caused by new vendordata2
    attributes (LP: #1922739)

 -- James Falcon <james.falcon@xxxxxxxxxxxxx>  Mon, 19 Apr 2021 14:00:12
-0500

** Changed in: cloud-init (Ubuntu Bionic)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1899299

Title:
  do-release-upgrade from Trusty to Xenial breaks cloud-init init-local
  on reboot

Status in cloud-init package in Ubuntu:
  Fix Released
Status in cloud-init source package in Xenial:
  Fix Released
Status in cloud-init source package in Bionic:
  Fix Released
Status in cloud-init source package in Focal:
  Fix Released
Status in cloud-init source package in Groovy:
  Fix Released
Status in cloud-init source package in Hirsute:
  Fix Released

Bug description:
  === 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,
  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
  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'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1899299/+subscriptions