b) almost the same setup, but upgrading from precise to trusty with the
u-a-t proposed package, without going through the intermediary current
u-a-t from trusty-updates.

$ lxc launch ubuntu-daily:precise p1
$ lxc exec p1 ubuntu-advantage enable-esm  $u:$p
Running apt-get update...
Ubuntu ESM repository enabled.

# confirming
$ lxc exec p1 apt-cache policy|grep esm
 500 https://esm.ubuntu.com/ubuntu/ precise/main i386 Packages
     origin esm.ubuntu.com
 500 https://esm.ubuntu.com/ubuntu/ precise/main amd64 Packages
     origin esm.ubuntu.com
# enable precise-proposed, which do-release-upgrade will change to 
trusty-proposed
$ lxc exec p1 -- bash -c "echo deb http://archive.ubuntu.com/ubuntu 
precise-proposed main > /etc/apt/sources.list.d/precise-proposed.list"

# ssh in and create a pinning config so not all of trusty-proposed is used
root@p1:~# cat > /etc/apt/preferences.d/proposed-pinning <<EOF
> Package: *
> Pin: release a=trusty-proposed
> Pin-Priority: 400
>
> Package: ubuntu-advantage-tools
> Pin: release a=trusty-proposed
> Pin-Priority: 500
> EOF

# perform the upgrade
root@p1:~# sudo do-release-upgrade
...

# after reboot
# confirm only u-a-t was taken from trusty-proposed
$ lxc exec p1 grep trusty-proposed /var/log/dist-upgrade/screenlog.0
Get:11 http://archive.ubuntu.com trusty-proposed Release.gpg [916 B]
Get:19 http://archive.ubuntu.com trusty-proposed Release [64.9 kB]
Get:31 http://archive.ubuntu.com trusty-proposed/main amd64 Packages [4,598 B]
Get:44 http://archive.ubuntu.com trusty-proposed/main i386 Packages [2,792 B]
Get:60 http://archive.ubuntu.com trusty-proposed/main TranslationIndex [202 B]
Get:74 http://archive.ubuntu.com trusty-proposed/main Translation-en [2,932 B]
Get:87 http://archive.ubuntu.com/ubuntu/ trusty-proposed/main 
ubuntu-advantage-tools amd64 19.6~ubuntu14.04.3 [47.3 kB]
$

# confirm upgrade path: version from precise, direct to trusty-proposed
$ lxc exec p1 grep ubuntu-advantage-tools /var/log/dist-upgrade/apt-term.log
Preparing to unpack .../ubuntu-advantage-tools_19.6~ubuntu14.04.3_amd64.deb ...
Unpacking ubuntu-advantage-tools (19.6~ubuntu14.04.3) over (1) ...
Setting up ubuntu-advantage-tools (19.6~ubuntu14.04.3) ...

# confirm esm is enabled and shows a positive pinning value
$ lxc exec p1 apt-cache policy|grep esm
 500 https://esm.ubuntu.com/ubuntu/ trusty-security/main i386 Packages
     origin esm.ubuntu.com
 500 https://esm.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     origin esm.ubuntu.com
 500 https://esm.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages
     origin esm.ubuntu.com
 500 https://esm.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     origin esm.ubuntu.com

# finally, confirm we can ua attach and esm keeps working
$ lxc exec p1 ua attach $token
Updating 'esm-infra' apt sources list on changed directives.
Updating package lists
Updating package lists
This machine is now attached to 'panli...@gmail.com'

SERVICE       ENTITLED  STATUS    DESCRIPTION
cc-eal        yes       n/a       Common Criteria EAL2 Provisioning Packages
cis-audit     no        —         Center for Internet Security Audit Tools
esm-infra     yes       enabled   UA Infra: Extended Security Maintenance
fips          yes       n/a       NIST-certified FIPS modules
fips-updates  yes       n/a       Uncertified security updates to FIPS modules
livepatch     yes       n/a       Canonical Livepatch service

Enable services with: ua enable <service>

     Account: panli...@gmail.com
Subscription: panli...@gmail.com

# and esm pinning value is non negative, and using the new infra names
$ lxc exec p1 apt-cache policy|grep esm
 500 https://esm.ubuntu.com/ubuntu/ trusty-infra-updates/main i386 Packages
     origin esm.ubuntu.com
 500 https://esm.ubuntu.com/ubuntu/ trusty-infra-updates/main amd64 Packages
     origin esm.ubuntu.com
 500 https://esm.ubuntu.com/ubuntu/ trusty-infra-security/main i386 Packages
     origin esm.ubuntu.com
 500 https://esm.ubuntu.com/ubuntu/ trusty-infra-security/main amd64 Packages
     origin esm.ubuntu.com

-- 
You received this bug notification because you are a member of Ubuntu
Server, which is subscribed to ubuntu-advantage-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1850672

Title:
  "precise esm -> trusty -> trusty new client" upgrade disables ESM

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-advantage-script/+bug/1850672/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to