← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1828641] Re: Xenial, Bionic, Cosmic revert ubuntu-advantage-tools config module changes from tip

 

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 <chad.smith@xxxxxxxxxxxxx>  Sun, 12 May 2019 20:10:17
-0600

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

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1828641

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

Status in cloud-init:
  In Progress
Status in cloud-init package in Ubuntu:
  New
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 Cosmic:
  Fix Released

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.

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


References