← Back to team overview

group.of.nepali.translators team mailing list archive

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

 

** Changed in: cloud-init (Ubuntu)
       Status: New => Invalid

** Changed in: cloud-init
       Status: In Progress => 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/1828641

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

Status in cloud-init:
  Fix Released
Status in cloud-init package in Ubuntu:
  Invalid
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