[Bug 1845037] Re: autopkgtest package "lxd" test has started failing

Julian Andres Klode 1845037 at bugs.launchpad.net
Wed Jun 30 08:11:08 UTC 2021


root at gainful-tarpon:~# cat <<EOF | su - ubuntu
autopkgtest-build-lxd ubuntu:bionic
echo ok done
EOF
Error: yaml: unmarshal errors:
  line 1: cannot unmarshal !!str `echo ok...` into api.InstancePut
Error: not found
root at gainful-tarpon:~# apt install autopkgtest
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dns-root-data dnsmasq-base ebtables liblxc-common liblxc1 libuv1 lxcfs uidmap xdelta3
Use 'apt autoremove' to remove them.
Suggested packages:
  schroot lxc lxd-client qemu-system qemu-utils
The following packages will be upgraded:
  autopkgtest
1 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
Need to get 127 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 autopkgtest all 5.3.1ubuntu1 [127 kB]
Fetched 127 kB in 0s (823 kB/s) 
(Reading database ... 60470 files and directories currently installed.)
Preparing to unpack .../autopkgtest_5.3.1ubuntu1_all.deb ...
Unpacking autopkgtest (5.3.1ubuntu1) over (5.3.1) ...
Setting up autopkgtest (5.3.1ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
root at gainful-tarpon:~# cat <<EOF | su - ubuntu
autopkgtest-build-lxd ubuntu:bionic
echo ok done
EOF
Creating autopkgtest-prepare-Um1
Starting autopkgtest-prepare-Um1

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

Title:
  autopkgtest package "lxd" test has started failing

Status in autopkgtest package in Ubuntu:
  Fix Released
Status in autopkgtest source package in Xenial:
  Fix Committed
Status in autopkgtest source package in Bionic:
  Fix Committed
Status in autopkgtest source package in Disco:
  Won't Fix
Status in autopkgtest source package in Eoan:
  Fix Released

Bug description:
  [impact]

  "lxd launch" behavior recently changed to parse any queued input on
  stdin and process it as a yaml file.

  Since the "autopkgtest-build-lxd" script calls "lxd launch", and input
  queued to stdin when calling "autopkgtest-build-lxd" will cause the
  internal call to lxd to fail, such as calling "autopkgtest-build-lxd"
  from inside a here document (see test case below).

  the failure is seen in (at least) the "lxd" autopkgtest from the autopkgtest package itself, e.g.:
  https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-disco/disco/amd64/a/autopkgtest/20190923_160817_66dbe@/log.gz

  [test case]

  root at autopkgtest:~# cat <<EOF | su - ubuntu
  > autopkgtest-build-lxd ubuntu:bionic
  > echo ok done
  > EOF
  Error: yaml: unmarshal errors:
    line 1: cannot unmarshal !!str `echo ok...` into api.ContainerPut

  run the autopkgtests for the package 'autopkgtest', or check autopkgtest.ubuntu.com, e.g.:
  http://autopkgtest.ubuntu.com/packages/a/autopkgtest/disco/amd64
  http://autopkgtest.ubuntu.com/packages/a/autopkgtest/disco/i386
  http://autopkgtest.ubuntu.com/packages/a/autopkgtest/eoan/amd64
  http://autopkgtest.ubuntu.com/packages/a/autopkgtest/eoan/i386

  the autopkgtest test case is failing only for disco and eoan, and only
  for amd64/i386 as the 'lxd' test is skipped for non-intel archs.

  the autopkgtest test case does not fail on bionic or xenial, because the tests there run with the lxd deb, which is still at the older version.
  http://autopkgtest.ubuntu.com/packages/a/autopkgtest/bionic/amd64

  However, the lxd snap can be installed in xenial or bionic, and the
  failure is reproducable when the lxd snap is installed, i.e.:

  $ sudo apt remove lxd
  $ sudo snap install lxd
  ...perform test case

  [regression potential]

  this only redirects stdin from /dev/null, for the call to 'lxc launch'
  inside autopkgtest-build-lxd; so the regression potential should be
  low.  Any regressions would almost certainly involve a failure during
  the call to autopkgtest-build-lxd, during the creation of the lxd
  container.

  [other info]

  this is reproducable with the current packages from disco-updates
  using a local qemu vm for testing.

  note that the autopkgtest fails only for disco and eoan, becuase on
  xenial and bionic the lxd deb is used, which still has the older
  behavior, however the lxd snap is available to install on both xenial
  and bionic, so this problem still exists for both those releases, as
  well as disco and eoan.

  also, this is not just a testcase failure - this is actual new
  behavior that can break existing users of the "autopkgtest-build-lxd"
  script in the manner described in the test case.

  I put the 'importance' of this as low because this bug will only be
  reproduced when calling autopkgtest-build-lxd from inside a here
  document passed to a shell, or otherwise called with input queued on
  stdin, which seems like an unusual way to call autopkgest-build-lxd,
  although still a perfectly valid way to use it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/1845037/+subscriptions



More information about the foundations-bugs mailing list