Comment 11 for bug 1857051

Revision history for this message
Chad Smith (chad.smith) wrote :

### Xenial AwS Ubuntu Pro instance test

test script:
#!/bin/bash

if [ $# != 1 ]; then
 echo "usage: $0 <AWS_IP_ADDR>"
 exit 1
fi
echo 1. Launch AWs Ubuntu PRO Xenial which auto-enables both esm-apps and esm-infra
VM_IP=$1
echo 2. Remove ubuntu-advantage-tools Alllowed-Origins config
ssh ubuntu@$VM_IP sudo rm -f /etc/apt/apt.conf.d/51ubuntu-advantage-esm
echo 3. Run unattended-upgrades to confirm Allowed origins does not find esm packages
ssh ubuntu@$VM_IP dpkg-query --show unattended-upgrades
ssh ubuntu@$VM_IP sudo unattended-upgrades --dry-run --verbose 2>&1 | egrep -i 'Allowed|esm'
echo 4. Install unattended-upgrades from -proposed suites
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 unattended-upgrades
EOF
scp setup_proposed.sh ubuntu@$VM_IP:.
ssh ubuntu@$VM_IP sudo bash ./setup_proposed.sh 2>&1 | grep unattended-upgrades
echo 5.Run unattended-upgrades to confirm -proposed Allowed origins does find esm packages
ssh ubuntu@$VM_IP sudo unattended-upgrades --dry-run --verbose 2>&1 | egrep -i 'Allowed|esm'
echo 6. Verify apt-cache policy shows matching origins and suites
ssh ubuntu@$VM_IP sudo apt-cache policy | grep -i esm

#### Verification output

csmith@uptown:~/src$ ./unattended-up.sh 3.84.44.110
1. Launch AWs Ubuntu PRO Trusty which auto-enables both esm-apps and esm-infra
2. Remove ubuntu-advantage-tools Alllowed-Origins config
The authenticity of host '3.84.44.110 (3.84.44.110)' can't be established.
ECDSA key fingerprint is SHA256:uO/pH0y4oazsq85AdXn33dZEtNRWTBu7y+Of/Kc1XOU.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '3.84.44.110' (ECDSA) to the list of known hosts.
3. Run unattended-upgrades to confirm Allowed origins does not find esm packages
unattended-upgrades 1.1ubuntu1.18.04.7~16.04.4
Allowed origins are: o=Ubuntu,a=xenial, o=Ubuntu,a=xenial-security, o=UbuntuESM,a=xenial
4. Install unattended-upgrades from -proposed suites
setup_proposed.sh 100% 203 3.5KB/s 00:00
  unattended-upgrades
Get:1 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 unattended-upgrades all 1.1ubuntu1.18.04.7~16.04.6 [42.1 kB]
Preparing to unpack .../unattended-upgrades_1.1ubuntu1.18.04.7~16.04.6_all.deb ...
Unpacking unattended-upgrades (1.1ubuntu1.18.04.7~16.04.6) over (1.1ubuntu1.18.04.7~16.04.4) ...
Setting up unattended-upgrades (1.1ubuntu1.18.04.7~16.04.6) ...
Replacing config file /etc/apt/apt.conf.d/50unattended-upgrades with new version
5.Run unattended-upgrades to confirm -proposed Allowed origins does find esm packages
Allowed origins are: o=Ubuntu,a=xenial, o=Ubuntu,a=xenial-security, o=UbuntuESMApps,a=xenial-apps-security, o=UbuntuESM,a=xenial-infra-security
/usr/bin/dpkg --status-fd 11 --unpack --auto-deconfigure /var/cache/apt/archives/krb5-locales_1.13.2+dfsg-5ubuntu2.1+esm1_all.deb
/usr/bin/dpkg --status-fd 11 --unpack --auto-deconfigure /var/cache/apt/archives/libk5crypto3_1.13.2+dfsg-5ubuntu2.1+esm1_amd64.deb
/usr/bin/dpkg --status-fd 11 --unpack --auto-deconfigure /var/cache/apt/archives/libkrb5support0_1.13.2+dfsg-5ubuntu2.1+esm1_amd64.deb /var/cache/apt/archives/libgssapi-krb5-2_1.13.2+dfsg-5ubuntu2.1+esm1_amd64.deb /var/cache/apt/archives/libkrb5-3_1.13.2+dfsg-5ubuntu2.1+esm1_amd64.deb
6. Verify apt-cache policy shows matching origins and suites
 500 https://esm.ubuntu.com/infra/ubuntu xenial-infra-updates/main amd64 Packages
     release v=16.04,o=UbuntuESM,a=xenial-infra-updates,n=xenial,l=UbuntuESM,c=main,b=amd64
     origin esm.ubuntu.com
 500 https://esm.ubuntu.com/infra/ubuntu xenial-infra-security/main amd64 Packages
     release v=16.04,o=UbuntuESM,a=xenial-infra-security,n=xenial,l=UbuntuESM,c=main,b=amd64
     origin esm.ubuntu.com
 500 https://esm.ubuntu.com/apps/ubuntu xenial-apps-updates/main amd64 Packages
     release v=16.04,o=UbuntuESMApps,a=xenial-apps-updates,n=xenial,l=UbuntuESMApps,c=main,b=amd64
     origin esm.ubuntu.com
 500 https://esm.ubuntu.com/apps/ubuntu xenial-apps-security/main amd64 Packages
     release v=16.04,o=UbuntuESMApps,a=xenial-apps-security,n=xenial,l=UbuntuESMApps,c=main,b=amd64
     origin esm.ubuntu.com