Add Ubuntu Advantage service apt urls to valid mirrors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-release-upgrader (Ubuntu) |
Fix Released
|
Undecided
|
Chad Smith | ||
Xenial |
Fix Released
|
Undecided
|
Chad Smith | ||
Bionic |
Fix Released
|
Undecided
|
Chad Smith | ||
Focal |
Fix Released
|
Undecided
|
Chad Smith | ||
Groovy |
Fix Released
|
Undecided
|
Chad Smith |
Bug Description
=== Begin SRU Template ===
[Impact]
Customers with Ubuntu Advantage services enabled on Trusty/
This requires either:
1. manual intervention to uncomment and correct the apt suite for any enabled Ubuntu Advantage service stored in /etc/apt/
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 for the given $release enabling ubuntu-
2. attach the machine to ua with a token and enable any available apt-based
services
3. Download the <upgrade-
4. unzip that proposed tarball
5. Add ubuntu-
6. and run ./${upgraderelease} upgrade on the CLI
7. check contents of /etc/apt/
UA-related apt URLs are still available
8. apt-cache policy to check that permissions to said APT repositories are live
done
# test script
```
#!/bin/bash
#
# SRU Verification ubuntu-
# Test procedure:
# - launch container Trusty, Xenial or Bionic
# - Attach container to UA subscription (which activates a number of commerical PPAs
# - download and run -proposed ubuntu-
# - Assert successful upgrade
# - Confirm valid mirrors not disabled
# - Confirm third party non-commercial PPA URLs still disabled
# - Confirm third party UA commercial URLs still disabled
# (due to expected feature gap)
# - Confirm UA status reports esm-infra still disabled (known feature gap)
set -e
UA_TOKEN=$1
if [ -z "$1" ]; then
echo "Usage: $0 <contractTOKEN>"
exit 1
fi
# sources:
# ua.proposed:
# source: deb http://
# keyid: 6E34E7116C0BC933
# sources:
# ua.proposed:
# source: deb http://
# keyid: 94E187AD53A59D1
cat > test-uru.yaml <<EOF
#cloud-config
package_update: true
package_upgrade: true
apt:
sources:
ua.daily:
source: deb http://
keyid: 94E187AD53A59D1
EOF
# ua.list:
# source: deb http://
# keyid: 94E187AD53A59D1
cat > checkaptpolicy.sh <<EOF
#!/bin/bash
set -x
RELEASE=
echo -n "Current release: $RELEASE"
echo "Assert no disabled valid mirrors in /eta/apt/
! grep disable /etc/apt/
echo "Checking commercial Ubuntu Advantage PPAs apt policy and config"
apt-cache policy | grep esm.ubuntu.com
for file in \`ls /etc/apt/
echo "--- file: \${file}"
cat \${file}
done
EOF
chmod 755 checkaptpolicy.sh
declare -A NEXTDIST=( [bionic]=focal [xenial]=bionic [trusty]=xenial )
wait_for_boot() {
local vm=$1 release=$2
echo "--- Wait for cloud-init to finish"
sleep 5
if [ "${release}" = "trusty" ]; then
while [ "N 2" != "$(lxc exec ${vm} -- runlevel)" ]; do
echo "waiting on runlevel 2"
sleep 5
done
status=$(lxc exec ${vm} -- test -f /var/run/
while [ "done" != "${status}" ]; do
echo -n '.'
sleep 5
done
else
lxc exec ${vm} -- cloud-init status --wait --long
fi
}
for release in xenial; do
vm=test-
echo "--- Launch cloud-init with ua-client-
lxc launch ubuntu-
upgradereleas
if [ "${release}" != "trusty" ]; then
dist_
fi
wait_for_boot ${vm} ${release}
echo "--- Attach Ubuntu-Advantage, enabling services"
lxc exec ${vm} -- ua attach ${UA_TOKEN}
lxc exec ${vm} -- ua status --wait | tee ua-status.orig
lxc file push checkaptpolicy.sh ${vm}/
lxc exec ${vm} -- /checkaptpolicy.sh > policy.orig
lxc exec ${vm} -- wget http://
lxc exec ${vm} -- tar xzvf $upgraderelease
echo "--- Add proposed PPA to valid mirrors to exercise ua-tools do-release-upgrade"
lxc file pull ${vm}/root/
echo "http://
lxc file push mirrors.cfg ${vm}/root/
lxc exec ${vm} -- /root/$
lxc exec ${vm} -- reboot || true
sleep 10
lxc exec ${vm} grep disable /etc/apt/
lxc exec ${vm} -- ua status --wait | tee ua-status.upgrade
if [ ! -z "${dist_
echo "--- Expect do-release-upgrade disable reason to be '$dist_
lxc exec ${vm} grep "${dist_
fi
echo "--- Expect no diffs from original and upgraded ua status"
status_
[ -z "$status_diff" ] && echo "SUCCESS: no diff" || echo -e "FAILURE: unexpected diff\n$
echo "--- Ensure UA re-enabled esm across upgrade"
lxc exec ${vm} -- egrep 'lts|change' /var/log/
echo "--- Ensure UA status reports ESM enabled after upgrade"
egrep 'esm-infra.
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:/
https:/
https:/
https:/
https:/
https:/
Related branches
- Brian Murray (community): Approve
- git-ubuntu developers: Pending requested
-
Diff: 74 lines (+23/-3)4 files modifiedDistUpgrade/DistUpgradeController.py (+9/-1)
data/mirrors.cfg (+2/-0)
debian/changelog (+10/-0)
utils/update_mirrors.py (+2/-2)
- Brian Murray (community): Approve
-
Diff: 150 lines (+55/-19)6 files modifiedDistUpgrade/DistUpgradeController.py (+8/-0)
DistUpgrade/DistUpgradeQuirks.py (+25/-15)
data/DistUpgrade.cfg.bionic (+1/-1)
data/mirrors.cfg (+2/-0)
debian/changelog (+17/-1)
utils/update_mirrors.py (+2/-2)
- Brian Murray (community): Approve
- git-ubuntu developers: Pending requested
-
Diff: 72 lines (+22/-2)4 files modifiedDistUpgrade/DistUpgradeController.py (+8/-0)
data/mirrors.cfg (+2/-0)
debian/changelog (+10/-0)
utils/update_mirrors.py (+2/-2)
- Brian Murray: Pending requested
-
Diff: 72 lines (+21/-2)4 files modifiedDistUpgrade/DistUpgradeController.py (+7/-0)
data/mirrors.cfg (+2/-0)
debian/changelog (+10/-0)
utils/update_mirrors.py (+2/-2)
- Brian Murray: Approve
-
Diff: 1691 lines (+142/-129)130 files modifiedDistUpgrade/DistUpgradeVersion.py (+1/-1)
data/mirrors.cfg (+5/-0)
debian/changelog (+8/-0)
po/af.po (+1/-1)
po/am.po (+1/-1)
po/an.po (+1/-1)
po/ar.po (+1/-1)
po/ast.po (+1/-1)
po/az.po (+1/-1)
po/be.po (+1/-1)
po/bg.po (+1/-1)
po/bn.po (+1/-1)
po/bo.po (+1/-1)
po/br.po (+1/-1)
po/bs.po (+1/-1)
po/ca.po (+1/-1)
po/ca@valencia.po (+1/-1)
po/ce.po (+1/-1)
po/ceb.po (+1/-1)
po/ckb.po (+1/-1)
po/crh.po (+1/-1)
po/cs.po (+1/-1)
po/csb.po (+1/-1)
po/cv.po (+1/-1)
po/cy.po (+1/-1)
po/da.po (+1/-1)
po/de.po (+1/-1)
po/dv.po (+1/-1)
po/el.po (+1/-1)
po/en_AU.po (+1/-1)
po/en_CA.po (+1/-1)
po/en_GB.po (+1/-1)
po/eo.po (+1/-1)
po/es.po (+1/-1)
po/et.po (+1/-1)
po/eu.po (+1/-1)
po/fa.po (+1/-1)
po/fi.po (+1/-1)
po/fil.po (+1/-1)
po/fo.po (+1/-1)
po/fr.po (+1/-1)
po/fr_CA.po (+1/-1)
po/fur.po (+1/-1)
po/fy.po (+1/-1)
po/ga.po (+1/-1)
po/gd.po (+1/-1)
po/gl.po (+1/-1)
po/gu.po (+1/-1)
po/gv.po (+1/-1)
po/he.po (+1/-1)
po/hi.po (+1/-1)
po/hr.po (+1/-1)
po/hu.po (+1/-1)
po/hy.po (+1/-1)
po/ia.po (+1/-1)
po/id.po (+1/-1)
po/is.po (+1/-1)
po/it.po (+1/-1)
po/ja.po (+1/-1)
po/jv.po (+1/-1)
po/ka.po (+1/-1)
po/kk.po (+1/-1)
po/km.po (+1/-1)
po/kn.po (+1/-1)
po/ko.po (+1/-1)
po/ku.po (+1/-1)
po/ky.po (+1/-1)
po/lb.po (+1/-1)
po/ln.po (+1/-1)
po/lo.po (+1/-1)
po/lt.po (+1/-1)
po/lv.po (+1/-1)
po/mhr.po (+1/-1)
po/mjw.po (+1/-1)
po/mk.po (+1/-1)
po/ml.po (+1/-1)
po/mn.po (+1/-1)
po/mnw.po (+1/-1)
po/mr.po (+1/-1)
po/ms.po (+1/-1)
po/mus.po (+1/-1)
po/my.po (+1/-1)
po/nb.po (+1/-1)
po/nds.po (+1/-1)
po/ne.po (+1/-1)
po/nl.po (+1/-1)
po/nn.po (+1/-1)
po/oc.po (+1/-1)
po/om.po (+1/-1)
po/pa.po (+1/-1)
po/pam.po (+1/-1)
po/pl.po (+1/-1)
po/ps.po (+1/-1)
po/pt.po (+1/-1)
po/pt_BR.po (+1/-1)
po/qu.po (+1/-1)
po/ro.po (+1/-1)
po/ru.po (+1/-1)
po/rw.po (+1/-1)
po/sc.po (+1/-1)
po/sco.po (+1/-1)
po/sd.po (+1/-1)
po/se.po (+1/-1)
po/shn.po (+1/-1)
po/si.po (+1/-1)
po/sk.po (+1/-1)
po/sl.po (+1/-1)
po/sq.po (+1/-1)
po/sr.po (+1/-1)
po/sv.po (+1/-1)
po/szl.po (+1/-1)
po/ta.po (+1/-1)
po/ta_LK.po (+1/-1)
po/te.po (+1/-1)
po/tg.po (+1/-1)
po/th.po (+1/-1)
po/tl.po (+1/-1)
po/tr.po (+1/-1)
po/ubuntu-release-upgrader.pot (+1/-1)
po/ug.po (+1/-1)
po/uk.po (+1/-1)
po/ur.po (+1/-1)
po/uz.po (+1/-1)
po/vi.po (+1/-1)
po/xh.po (+1/-1)
po/zh_CN.po (+1/-1)
po/zh_HK.po (+1/-1)
po/zh_TW.po (+1/-1)
po/zu.po (+1/-1)
utils/update_mirrors.py (+2/-2)
- Brian Murray: Approve
- Andreas Hasenack: Pending requested
-
Diff: 29 lines (+8/-0)2 files modifieddata/mirrors.cfg (+5/-0)
debian/changelog (+3/-0)
Changed in ubuntu-release-upgrader (Ubuntu Groovy): | |
status: | New → Fix Released |
Changed in ubuntu-release-upgrader (Ubuntu Focal): | |
status: | New → In Progress |
assignee: | nobody → Chad Smith (chad.smith) |
Changed in ubuntu-release-upgrader (Ubuntu Xenial): | |
assignee: | nobody → Chad Smith (chad.smith) |
Changed in ubuntu-release-upgrader (Ubuntu Bionic): | |
assignee: | nobody → Chad Smith (chad.smith) |
Changed in ubuntu-release-upgrader (Ubuntu Groovy): | |
assignee: | nobody → Chad Smith (chad.smith) |
description: | updated |
description: | updated |
Changed in ubuntu-release-upgrader (Ubuntu Xenial): | |
status: | New → In Progress |
Changed in ubuntu-release-upgrader (Ubuntu Bionic): | |
status: | New → In Progress |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
tags: |
added: verification-done-bionic verification-done-focal removed: verification-needed-bionic verification-needed-focal |
description: | updated |
description: | updated |
tags: |
added: verification-done verification-done-xenial removed: verification-needed verification-needed-xenial |
I've uploaded this for Groovy Gorilla.