Comment 5 for bug 1936833

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote : Re: package ubuntu-advantage-tools 27.2.1~21.10.1 failed to install/upgrade: installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 1

You can reproduce this by running "schroot -c impish-amd64 -u root -d /" and then within the chroot, run "apt-get install -y ubuntu-advantage-tools cloud-init".

The problem is this bit of the postinst:

    if command -v "cloud-id" > /dev/null ; then
      cloud_id=$(cloud-id)
    fi

In this situation, cloud-id is present but errors. One option would be to change this to:

    cloud_id=$(cloud-id 2>/dev/null || true)

Or another would be to make the call to cloud-id conditional on the existence of /run/cloud-init/instance-data.json.

Either way this is currently blocking my efforts to work on a minimal layer for the live server ISO so it qualifies as pretty annoying :)