Xenial, Bionic, Cosmic revert ubuntu-advantage-tools config module changes from tip

Bug #1828641 reported by Chad Smith
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Undecided
Chad Smith
cloud-init (Ubuntu)
Invalid
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned
Cosmic
Fix Released
Undecided
Unassigned

Bug Description

== Begin SRU Template ==
[Impact]
Ubuntu-advantage-tools package version 19 introduced a new command line client that is backwards incompatible with previous ubuntu-advantage-tools releases.

Changes in cloud-init 19.1 support only the new ubuntu-advantage-tools CLI.

To avoid breaking the cc_ubuntu_advantage cloud-config module, we need to revert changes in cloud-init tip to avoid tracebacks for customers in Xenial, Bionic and Cosmic using ubuntu-advantage: declarating in their cloud-config.

Once ubuntu-advantage-tools >= 19 is SRU'd to Xenial, Bionic and Cosmic. This debian patch can be dropped.

[Test Case]
# Use old ubuntu-advantage cloud-config syntax to enable livepatch on a kvm instance to enable livepatch

Note: there are a number of expected failures
 * Xenial: Bug: #1830154 snap not in $PATH
 * Cosmic: livepatch is not supported on Cosmic
 * Disco: Bug: #1829788 KeyError traceback

[Test Case]
cat > pre-disco-ua.yaml <<EOF
#cloud-config
hostname: sru-test
ubuntu-advantage:
  commands:
    00: ubuntu-advantage enable-livepatch <REDACTED_LIVEPATCH_CREDS>
EOF

cat > disco-ua.yaml <<EOF
#cloud-config
hostname: sru-test
ubuntu_advantage:
  token: <REDACTED_CONTRACT_TOKEN>
  enable: [livepatch]
EOF

cat > setup_proposed.sh <<EOF
#/bin/bash
mirror=http://archive.ubuntu.com/ubuntu
echo deb \$mirror \$(lsb_release -sc)-proposed main | tee /etc/apt/sources.list.d/proposed.list
apt-get update -q;
apt-get install -qy cloud-init;
EOF

#!/bin/bash

set -e

# Perform individual bug tests using lxd for speed where possible
for series in xenial bionic cosmic disco; do
   echo "=== BEGIN $series";
   if [ $series = disco ]; then
       multipass launch daily:$series -n test-$series --cloud-init disco-ua.yaml;
   else
       multipass launch daily:$series -n test-$series --cloud-init pre-disco-ua.yaml;
   fi
   multipass exec test-$series -- cloud-init status --wait;
   if [ $series = bionic ]; then
       echo "Disabling livepatch on $series";
       multipass exec test-$series sudo ubuntu-advantage disable-livepatch;
       multipass exec test-$series sudo snap remove canonical-livepatch;
   elif [ $series = disco ]; then
       echo "Detaching ubuntu-advantage on $series";
       multipass exec test-$series sudo ubuntu-advantage detach;
   elif [ $series = cosmic -o $series = xenial ]; then
       multipass exec test-$series sudo snap remove canonical-livepatch;
   fi
   echo "Rebooting into clean system";
   multipass exec test-$series -- sudo cloud-init clean --logs --reboot;
   if [ $series = disco ]; then
       echo "Expect error [$series] per known LP: #1829788 KeyError traceback from ubuntu-advantage-tools";
   elif [ $series = bionic ]; then
           echo "Ensure no errors [$series] from cloud-init status";
   elif [ $series = cosmic ]; then
           echo "Expect [$series] error that livepatch does not support $series";
   else
           echo "Expect error [$series] about snap not in PATH LP: #1830154";
   fi
   sleep 10;
   while ! multipass exec test-$series -- pwd; do
      sleep 5
   done
   multipass exec test-$series -- cloud-init status --wait --long;
   multipass exec test-$series -- grep Trace /var/log/cloud-init.log;
   echo "Checking ubuntu-advantage status";
   multipass exec test-$series -- ubuntu-advantage status;
   echo "=== END $series";
done

[Regression Potential]
Changeset only affects systems deployed using the ubuntu-advantage module. In Xenial, Bionic and Cosmic. Existing behavior is retained because of a full revert of the upstream patch.

This ubuntu-advantage config module is not widely used and the underlying ubuntu-advantage-tools will undergo a major SRU shortly where this revert will be unnecessary.

[Other Info]
Upstream commit at
  https://git.launchpad.net/cloud-init/commit/?id=41f56e197

== End SRU Template ==

=== Original description ===

Xenial Bionic and Cosmic are currently running earlier versions of ubuntu-advantage-tools (10 for xenial and 17 for bionic/cosmic).

ubuntu-advantage-tools 19 and later is a completely rewritten CLI that is backwards incompatible.

Until ubuntu-advantage-tools >= 19.1 is released into Xenial, Bionic and Cosmic. Carry a debian patch file to revert upstream cloud-init config module changes for cc_ubuntu_advantage.py.

Related branches

Chad Smith (chad.smith)
summary: - xenial, Bionic, Cosmic revert ubuntu-advantage-tools config module
+ Xenial, Bionic, Cosmic revert ubuntu-advantage-tools config module
changes from tip
Chad Smith (chad.smith)
Changed in cloud-init:
assignee: nobody → Chad Smith (chad.smith)
status: New → In Progress
Chad Smith (chad.smith)
description: updated
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Chad, or anyone else affected,

Accepted cloud-init into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/19.1-1-gbaa47854-0ubuntu1~18.10.1 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 and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. 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.

Changed in cloud-init (Ubuntu Cosmic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-cosmic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Chad, 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/19.1-1-gbaa47854-0ubuntu1~18.04.1 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 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.

Changed in cloud-init (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Chad, 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/19.1-1-gbaa47854-0ubuntu1~16.04.1 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 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.

Changed in cloud-init (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Chad Smith (chad.smith) wrote :

SRU verification of ubuntu-advantage retained behavior.
xenial expected fail (known bug)
bionic expected success
cosmic expected fail (invalid platform)
disco expected fail (known bug)

description: updated
description: updated
tags: added: verification-done verification-done-bionic verification-done-cosmic verification-done-xenial
removed: verification-needed verification-needed-bionic verification-needed-cosmic verification-needed-xenial
tags: added: verification-done-disco
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 19.1-1-gbaa47854-0ubuntu1~18.10.1

---------------
cloud-init (19.1-1-gbaa47854-0ubuntu1~18.10.1) cosmic; urgency=medium

  * debian/patches/ubuntu-advantage-revert-tip.patch
    Revert ubuntu-advantage config module changes until ubuntu-advantage-tools
    19.1 publishes to Cosmic (LP: #1828641)
  * New upstream snapshot. (LP: #1828637)
    - Azure: Return static fallback address as if failed to find endpoint
      [Jason Zions (MSFT)]
    - release 19.1
    - freebsd: add chpasswd pkg in the image [Gonéri Le Bouder]
    - tests: add Eoan release [Paride Legovini]
    - cc_mounts: check if mount -a on no-change fstab path [Jason Zions (MSFT)]
    - replace remaining occurrences of LOG.warn
    - DataSourceAzure: Adjust timeout for polling IMDS [Anh Vo]
    - Azure: Changes to the Hyper-V KVP Reporter [Anh Vo]
    - git tests: no longer show warning about safe yaml. [Scott Moser]
    - tools/read-version: handle errors [Chad Miller]
    - net/sysconfig: only indicate available on known sysconfig distros
    - packages: update rpm specs for new bash completion path
    - test_azure: mock util.SeLinuxGuard where needed [Jason Zions (MSFT)]
    - setup.py: install bash completion script in new location
    - mount_cb: do not pass sync and rw options to mount [Gonéri Le Bouder]
    - cc_apt_configure: fix typo in apt documentation [Dominic Schlegel]
    - Revert "DataSource: move update_events from a class to an instance..."
    - Change DataSourceNoCloud to ignore file system label's case.
      [Risto Oikarinen]
    - cmd:main.py: Fix missing 'modules-init' key in modes dict
      [Antonio Romito]
    - ubuntu_advantage: rewrite cloud-config module
    - Azure: Treat _unset network configuration as if it were absent
      [Jason Zions (MSFT)]
    - DatasourceAzure: add additional logging for azure datasource [Anh Vo]
    - cloud_tests: fix apt_pipelining test-cases
    - Azure: Ensure platform random_seed is always serializable as JSON.
      [Jason Zions (MSFT)]
    - net/sysconfig: write out SUSE-compatible IPv6 config [Robert Schweikert]
    - tox: Update testenv for openSUSE Leap to 15.0 [Thomas Bechtold]
    - net: Fix ipv6 static routes when using eni renderer [Raphael Glon]
    - Add ubuntu_drivers config module
    - doc: Refresh Azure walinuxagent docs
    - tox: bump pylint version to latest (2.3.1)
    - DataSource: move update_events from a class to an instance attribute
    - net/sysconfig: Handle default route setup for dhcp configured NICs
      [Robert Schweikert]
    - DataSourceEc2: update RELEASE_BLOCKER to be more accurate

 -- Chad Smith <email address hidden> Sun, 12 May 2019 20:10:17 -0600

Changed in cloud-init (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been 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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 19.1-1-gbaa47854-0ubuntu1~18.04.1

---------------
cloud-init (19.1-1-gbaa47854-0ubuntu1~18.04.1) bionic; urgency=medium

  * debian/patches/ubuntu-advantage-revert-tip.patch
    Revert ubuntu-advantage config module changes until ubuntu-advantage-tools
    19.1 publishes to Bionic (LP: #1828641)
  * New upstream snapshot. (LP: #1828637)
    - Azure: Return static fallback address as if failed to find endpoint
      [Jason Zions (MSFT)]
    - release 19.1
    - freebsd: add chpasswd pkg in the image [Gonéri Le Bouder]
    - tests: add Eoan release [Paride Legovini]
    - cc_mounts: check if mount -a on no-change fstab path [Jason Zions (MSFT)]
    - replace remaining occurrences of LOG.warn
    - DataSourceAzure: Adjust timeout for polling IMDS [Anh Vo]
    - Azure: Changes to the Hyper-V KVP Reporter [Anh Vo]
    - git tests: no longer show warning about safe yaml. [Scott Moser]
    - tools/read-version: handle errors [Chad Miller]
    - net/sysconfig: only indicate available on known sysconfig distros
    - packages: update rpm specs for new bash completion path
    - test_azure: mock util.SeLinuxGuard where needed [Jason Zions (MSFT)]
    - setup.py: install bash completion script in new location
    - mount_cb: do not pass sync and rw options to mount [Gonéri Le Bouder]
    - cc_apt_configure: fix typo in apt documentation [Dominic Schlegel]
    - Revert "DataSource: move update_events from a class to an instance..."
    - Change DataSourceNoCloud to ignore file system label's case.
      [Risto Oikarinen]
    - cmd:main.py: Fix missing 'modules-init' key in modes dict
      [Antonio Romito]
    - ubuntu_advantage: rewrite cloud-config module
    - Azure: Treat _unset network configuration as if it were absent
      [Jason Zions (MSFT)]
    - DatasourceAzure: add additional logging for azure datasource [Anh Vo]
    - cloud_tests: fix apt_pipelining test-cases
    - Azure: Ensure platform random_seed is always serializable as JSON.
      [Jason Zions (MSFT)]
    - net/sysconfig: write out SUSE-compatible IPv6 config [Robert Schweikert]
    - tox: Update testenv for openSUSE Leap to 15.0 [Thomas Bechtold]
    - net: Fix ipv6 static routes when using eni renderer [Raphael Glon]
    - Add ubuntu_drivers config module
    - doc: Refresh Azure walinuxagent docs
    - tox: bump pylint version to latest (2.3.1)
    - DataSource: move update_events from a class to an instance attribute
    - net/sysconfig: Handle default route setup for dhcp configured NICs
      [Robert Schweikert]
    - DataSourceEc2: update RELEASE_BLOCKER to be more accurate

 -- Chad Smith <email address hidden> Fri, 10 May 2019 23:17:50 -0600

Changed in cloud-init (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 19.1-1-gbaa47854-0ubuntu1~16.04.1

---------------
cloud-init (19.1-1-gbaa47854-0ubuntu1~16.04.1) xenial; urgency=medium

  * debian/patches/ubuntu-advantage-revert-tip.patch
    Revert ubuntu-advantage config module changes until ubuntu-advantage-tools
    19.1 publishes to Xenial (LP: #1828641)
  * refresh patches:
   + debian/patches/azure-apply-network-config-false.patch
   + debian/patches/azure-use-walinux-agent.patch
   + debian/patches/ec2-classic-dont-reapply-networking.patch
  * refresh patches:
   + debian/patches/azure-apply-network-config-false.patch
   + debian/patches/azure-use-walinux-agent.patch
  * New upstream snapshot. (LP: #1828637)
    - Azure: Return static fallback address as if failed to find endpoint
      [Jason Zions (MSFT)]
    - release 19.1
    - freebsd: add chpasswd pkg in the image [Gonéri Le Bouder]
    - tests: add Eoan release [Paride Legovini]
    - cc_mounts: check if mount -a on no-change fstab path [Jason Zions (MSFT)]
    - replace remaining occurrences of LOG.warn
    - DataSourceAzure: Adjust timeout for polling IMDS [Anh Vo]
    - Azure: Changes to the Hyper-V KVP Reporter [Anh Vo]
    - git tests: no longer show warning about safe yaml. [Scott Moser]
    - tools/read-version: handle errors [Chad Miller]
    - net/sysconfig: only indicate available on known sysconfig distros
    - packages: update rpm specs for new bash completion path
    - test_azure: mock util.SeLinuxGuard where needed [Jason Zions (MSFT)]
    - setup.py: install bash completion script in new location
    - mount_cb: do not pass sync and rw options to mount [Gonéri Le Bouder]
    - cc_apt_configure: fix typo in apt documentation [Dominic Schlegel]
    - Revert "DataSource: move update_events from a class to an instance..."
    - Change DataSourceNoCloud to ignore file system label's case.
      [Risto Oikarinen]
    - cmd:main.py: Fix missing 'modules-init' key in modes dict
      [Antonio Romito]
    - ubuntu_advantage: rewrite cloud-config module
    - Azure: Treat _unset network configuration as if it were absent
      [Jason Zions (MSFT)]
    - DatasourceAzure: add additional logging for azure datasource [Anh Vo]
    - cloud_tests: fix apt_pipelining test-cases
    - Azure: Ensure platform random_seed is always serializable as JSON.
      [Jason Zions (MSFT)]
    - net/sysconfig: write out SUSE-compatible IPv6 config [Robert Schweikert]
    - tox: Update testenv for openSUSE Leap to 15.0 [Thomas Bechtold]
    - net: Fix ipv6 static routes when using eni renderer [Raphael Glon]
    - Add ubuntu_drivers config module
    - doc: Refresh Azure walinuxagent docs
    - tox: bump pylint version to latest (2.3.1)
    - DataSource: move update_events from a class to an instance attribute
    - net/sysconfig: Handle default route setup for dhcp configured NICs
      [Robert Schweikert]
    - DataSourceEc2: update RELEASE_BLOCKER to be more accurate

 -- Chad Smith <email address hidden> Fri, 10 May 2019 16:26:48 -0600

Changed in cloud-init (Ubuntu Xenial):
status: Fix Committed → Fix Released
Dan Watkins (oddbloke)
Changed in cloud-init (Ubuntu):
status: New → Invalid
Changed in cloud-init:
status: In Progress → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.