Impish and hirsute tests performed with the following script:
--------------------------------
series=$1
name=test-$series

multipass launch --name $name $series
multipass exec $name -- ua version
multipass exec $name -- cloud-init status --wait
multipass exec $name -- sudo /bin/sh -c "printf 'error' > /usr/bin/cloud-id"
multipass exec $name -- sudo chmod 755 /usr/bin/cloud-id
multipass exec $name -- sudo dpkg-reconfigure ubuntu-advantage-tools
multipass exec $name -- echo $?

multipass exec $name -- sudo sh -c "cat <<EOF 
>/etc/apt/sources.list.d/ubuntu-$series-proposed.list
# Enable Ubuntu proposed archive
deb http://archive.ubuntu.com/ubuntu/ $series-proposed restricted main 
multiverse universe
EOF"
multipass exec $name -- sudo sh -c "apt update > /dev/null"
multipass exec $name -- sudo sh -c "apt install ubuntu-advantage-tools > 
/dev/null"
multipass exec $name -- ua version
multipass exec $name -- sudo dpkg-reconfigure ubuntu-advantage-tools
multipass exec $name -- echo $?
multipass delete $name
multipass purge
------------------------------------------------------------

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1938207

Title:
  ubuntu-advantage-tools.postinst and cloud-id are not robust against
  failure

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


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to