[Bug 1893717] Re: Add Ubuntu Advantage service apt urls to valid mirrors

Chad Smith 1893717 at bugs.launchpad.net
Fri Sep 11 17:16:54 UTC 2020


** Description changed:

  === Begin SRU Template ===
  [Impact]
  Customers with Ubuntu Advantage services enabled on Trusty/Xenial/Bionic find APT config files disabled with comments after running `do-release-upgrade`.
  
  This requires either:
   1. manual intervention to uncomment and correct the apt suite for any enabled Ubuntu Advantage service stored in /etc/apt/sources.list.d/ubuntu-*.list.
  
   OR
  
   2. Providing AllowThirdParty=yes configuration override during do-
  release-upgrade to force upgrades of all third party ppa apt
  configuration urls.
  
  Adding these supported commercial URLs to mirror.cfg allows these urls to be
  treated as valid Ubuntu-proper apt URLs and would automatically update the
  apt config files for any enabled Ubuntu Advantage offering without
  manual intervention.
  
  [Test Case]
  
  # test procedure
  for release in trusty xenial bionic; do
   1. lxc launch daily image with $release-proposed enabled via cloud-config
   2. attach the machine to ua with a token and enable any available apt-based
      services
-  3. perform do-release-upgrade
-  4. check contents of /etc/apt/sources.list.d/ubuntu-*.list to ensure all
+  3. Download the <release>-proposed tarball to locally perform a "do-release-upgrade"
+  4. unzip that proposed tarball and run ./focal upgrade on the CLI
+   5. tar xzvf focal.tar.gz
+  6. 
+  4. check contents of /etc/apt/sources.list.d/ubuntu-*.list to ensure all
      UA-related apt URLs are still available
   5. apt-cache policy to check that permissions to said APT repositories are
      viable
  done
  
  # test script
  
  ```
  #!/bin/bash
  set -x
  
  cat > proposed.yaml <<EOF
  #cloud-config
  package_upgrade: true
  apt:
    sources:
      proposed.list:
         source: deb $MIRROR $RELEASE-proposed main universe
  EOF
  
  for release in trusty xenial bionic; do
    vm=test-sru-$release
    echo "--- Launch cloud-init with ${release}-proposed enabled"
    lxc launch ubuntu-daily:${release} ${vm} -c user.user-data="$(cat proposed.yaml)"
    echo "--- Wait for cloud-init to finish"
    if [ "${release}" = "trusty" ]; then
      lxc exec ${vm} -- cloud-init status --wait --long
    else
      while [ "N 2" != "$(lxc exec ${vm} -- runlevel)" ]; do
         echo "waiting on runlevel 2"
         sleep 5
      done
    fi
    echo "--- Attach Ubuntu-Advantage and enable services"
    lxc exec ${vm} -- ua attach ${UA_TOKEN}
    lxc exec ${vm} -- ua status
+   lxc exec ${vm} -- wget  http://archive.ubuntu.com/ubuntu/dists/$release-proposed/main/dist-upgrader-all/current/$release.tar.gz
    echo "--- perform do-release-upgrade to next release"
-   lxc exec ${vm} -- do-release-upgrade -f DistUpgradeViewNonInteractive
+   lxc exec ${vm} -- /${release} -f DistUpgradeViewNonInteractive
    echo "--- Validate UA APT sources after upgrade"
    lxc exec ${vm} -- apt-cache policy | grep esm.ubuntu.com
    for file in `ls /etc/apt/sources.list.d/ubuntu-*.list`; do
      echo "--- file: ${file}"
      cat  /etc/apt/sources.list.d/${file}
    done
    lxc exec ${vm} -- ua status
  done
  ```
  
  [Regression Potential]
  None; No automatic upgrade support has been previously offered across LTS upgrade paths for ubuntu-advantage services on Ubuntu Trusty or later.
  
  Anyone performing a do-release-upgrade would have had to manually update
  apt config files after the fact.
  
  === Original Description ===
  Ensure Apt mirror URLs supported by Ubuntu Advantage services are included as valid mirrors instead of being treated as third party repositories and getting disabled by do-release-upgrade.
  
  The following APT mirror URLs are supported for current and/or imminent
  Ubuntu Advantage apt-based services on Xenial and later:
  
  https://esm.ubuntu.com/ubuntu/
  https://esm.ubuntu.com/apps/ubuntu/
  https://esm.ubuntu.com/cc/ubuntu/
  https://esm.ubuntu.com/infra/ubuntu/
  https://esm.ubuntu.com/fips/ubuntu/
  https://esm.ubuntu.com/fips-updates/ubuntu/

** Description changed:

  === Begin SRU Template ===
  [Impact]
  Customers with Ubuntu Advantage services enabled on Trusty/Xenial/Bionic find APT config files disabled with comments after running `do-release-upgrade`.
  
  This requires either:
   1. manual intervention to uncomment and correct the apt suite for any enabled Ubuntu Advantage service stored in /etc/apt/sources.list.d/ubuntu-*.list.
  
   OR
  
   2. Providing AllowThirdParty=yes configuration override during do-
  release-upgrade to force upgrades of all third party ppa apt
  configuration urls.
  
  Adding these supported commercial URLs to mirror.cfg allows these urls to be
  treated as valid Ubuntu-proper apt URLs and would automatically update the
  apt config files for any enabled Ubuntu Advantage offering without
  manual intervention.
  
  [Test Case]
  
  # test procedure
  for release in trusty xenial bionic; do
   1. lxc launch daily image with $release-proposed enabled via cloud-config
   2. attach the machine to ua with a token and enable any available apt-based
      services
   3. Download the <release>-proposed tarball to locally perform a "do-release-upgrade"
-  4. unzip that proposed tarball and run ./focal upgrade on the CLI
-   5. tar xzvf focal.tar.gz
-  6. 
-  4. check contents of /etc/apt/sources.list.d/ubuntu-*.list to ensure all
+  4. unzip that proposed tarball and run ./focal upgrade on the CLI
+  5. check contents of /etc/apt/sources.list.d/ubuntu-*.list to ensure all
      UA-related apt URLs are still available
-  5. apt-cache policy to check that permissions to said APT repositories are
+  6. apt-cache policy to check that permissions to said APT repositories are
      viable
  done
  
  # test script
  
  ```
  #!/bin/bash
  set -x
  
  cat > proposed.yaml <<EOF
  #cloud-config
  package_upgrade: true
  apt:
    sources:
      proposed.list:
         source: deb $MIRROR $RELEASE-proposed main universe
  EOF
  
  for release in trusty xenial bionic; do
    vm=test-sru-$release
    echo "--- Launch cloud-init with ${release}-proposed enabled"
    lxc launch ubuntu-daily:${release} ${vm} -c user.user-data="$(cat proposed.yaml)"
    echo "--- Wait for cloud-init to finish"
    if [ "${release}" = "trusty" ]; then
      lxc exec ${vm} -- cloud-init status --wait --long
    else
      while [ "N 2" != "$(lxc exec ${vm} -- runlevel)" ]; do
         echo "waiting on runlevel 2"
         sleep 5
      done
    fi
    echo "--- Attach Ubuntu-Advantage and enable services"
    lxc exec ${vm} -- ua attach ${UA_TOKEN}
    lxc exec ${vm} -- ua status
-   lxc exec ${vm} -- wget  http://archive.ubuntu.com/ubuntu/dists/$release-proposed/main/dist-upgrader-all/current/$release.tar.gz
+   lxc exec ${vm} -- wget  http://archive.ubuntu.com/ubuntu/dists/$release-proposed/main/dist-upgrader-all/current/$release.tar.gz
    echo "--- perform do-release-upgrade to next release"
    lxc exec ${vm} -- /${release} -f DistUpgradeViewNonInteractive
    echo "--- Validate UA APT sources after upgrade"
    lxc exec ${vm} -- apt-cache policy | grep esm.ubuntu.com
    for file in `ls /etc/apt/sources.list.d/ubuntu-*.list`; do
      echo "--- file: ${file}"
      cat  /etc/apt/sources.list.d/${file}
    done
    lxc exec ${vm} -- ua status
  done
  ```
  
  [Regression Potential]
  None; No automatic upgrade support has been previously offered across LTS upgrade paths for ubuntu-advantage services on Ubuntu Trusty or later.
  
  Anyone performing a do-release-upgrade would have had to manually update
  apt config files after the fact.
  
  === Original Description ===
  Ensure Apt mirror URLs supported by Ubuntu Advantage services are included as valid mirrors instead of being treated as third party repositories and getting disabled by do-release-upgrade.
  
  The following APT mirror URLs are supported for current and/or imminent
  Ubuntu Advantage apt-based services on Xenial and later:
  
  https://esm.ubuntu.com/ubuntu/
  https://esm.ubuntu.com/apps/ubuntu/
  https://esm.ubuntu.com/cc/ubuntu/
  https://esm.ubuntu.com/infra/ubuntu/
  https://esm.ubuntu.com/fips/ubuntu/
  https://esm.ubuntu.com/fips-updates/ubuntu/

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/1893717

Title:
  Add Ubuntu Advantage service apt urls to valid mirrors

Status in ubuntu-release-upgrader package in Ubuntu:
  Fix Released
Status in ubuntu-release-upgrader source package in Xenial:
  In Progress
Status in ubuntu-release-upgrader source package in Bionic:
  In Progress
Status in ubuntu-release-upgrader source package in Focal:
  In Progress
Status in ubuntu-release-upgrader source package in Groovy:
  Fix Released

Bug description:
  === Begin SRU Template ===
  [Impact]
  Customers with Ubuntu Advantage services enabled on Trusty/Xenial/Bionic find APT config files disabled with comments after running `do-release-upgrade`.

  This requires either:
   1. manual intervention to uncomment and correct the apt suite for any enabled Ubuntu Advantage service stored in /etc/apt/sources.list.d/ubuntu-*.list.

   OR

   2. Providing AllowThirdParty=yes configuration override during do-
  release-upgrade to force upgrades of all third party ppa apt
  configuration urls.

  Adding these supported commercial URLs to mirror.cfg allows these urls to be
  treated as valid Ubuntu-proper apt URLs and would automatically update the
  apt config files for any enabled Ubuntu Advantage offering without
  manual intervention.

  [Test Case]

  # test procedure
  for release in trusty xenial bionic; do
   1. lxc launch daily image with $release-proposed enabled via cloud-config
   2. attach the machine to ua with a token and enable any available apt-based
      services
   3. Download the <release>-proposed tarball to locally perform a "do-release-upgrade"
   4. unzip that proposed tarball and run ./focal upgrade on the CLI
   5. check contents of /etc/apt/sources.list.d/ubuntu-*.list to ensure all
      UA-related apt URLs are still available
   6. apt-cache policy to check that permissions to said APT repositories are
      viable
  done

  # test script

  ```
  #!/bin/bash
  set -x

  cat > proposed.yaml <<EOF
  #cloud-config
  package_upgrade: true
  apt:
    sources:
      proposed.list:
         source: deb $MIRROR $RELEASE-proposed main universe
  EOF

  for release in trusty xenial bionic; do
    vm=test-sru-$release
    echo "--- Launch cloud-init with ${release}-proposed enabled"
    lxc launch ubuntu-daily:${release} ${vm} -c user.user-data="$(cat proposed.yaml)"
    echo "--- Wait for cloud-init to finish"
    if [ "${release}" = "trusty" ]; then
      lxc exec ${vm} -- cloud-init status --wait --long
    else
      while [ "N 2" != "$(lxc exec ${vm} -- runlevel)" ]; do
         echo "waiting on runlevel 2"
         sleep 5
      done
    fi
    echo "--- Attach Ubuntu-Advantage and enable services"
    lxc exec ${vm} -- ua attach ${UA_TOKEN}
    lxc exec ${vm} -- ua status
    lxc exec ${vm} -- wget  http://archive.ubuntu.com/ubuntu/dists/$release-proposed/main/dist-upgrader-all/current/$release.tar.gz
    echo "--- perform do-release-upgrade to next release"
    lxc exec ${vm} -- /${release} -f DistUpgradeViewNonInteractive
    echo "--- Validate UA APT sources after upgrade"
    lxc exec ${vm} -- apt-cache policy | grep esm.ubuntu.com
    for file in `ls /etc/apt/sources.list.d/ubuntu-*.list`; do
      echo "--- file: ${file}"
      cat  /etc/apt/sources.list.d/${file}
    done
    lxc exec ${vm} -- ua status
  done
  ```

  [Regression Potential]
  None; No automatic upgrade support has been previously offered across LTS upgrade paths for ubuntu-advantage services on Ubuntu Trusty or later.

  Anyone performing a do-release-upgrade would have had to manually
  update apt config files after the fact.

  === Original Description ===
  Ensure Apt mirror URLs supported by Ubuntu Advantage services are included as valid mirrors instead of being treated as third party repositories and getting disabled by do-release-upgrade.

  The following APT mirror URLs are supported for current and/or
  imminent Ubuntu Advantage apt-based services on Xenial and later:

  https://esm.ubuntu.com/ubuntu/
  https://esm.ubuntu.com/apps/ubuntu/
  https://esm.ubuntu.com/cc/ubuntu/
  https://esm.ubuntu.com/infra/ubuntu/
  https://esm.ubuntu.com/fips/ubuntu/
  https://esm.ubuntu.com/fips-updates/ubuntu/

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1893717/+subscriptions



More information about the foundations-bugs mailing list