diff -Nru docker.io-1.12.6/debian/changelog docker.io-1.12.6/debian/changelog --- docker.io-1.12.6/debian/changelog 2017-02-01 13:42:20.000000000 +0000 +++ docker.io-1.12.6/debian/changelog 2017-03-10 17:40:22.000000000 +0000 @@ -1,3 +1,13 @@ +docker.io (1.12.6-0ubuntu3) zesty; urgency=medium + + * debian/tests/docker-in-lxd: Fix a latent version comparison bug that was + causing migration failures due to the script thinking it was dealing + with an old LXD (< 2.2) when it was really dealing with a recent LXD + (>= 2.10). The fix is to use `lxc info` to check if the network extension + is supported, rather than trying to compare version strings. + + -- Tyler Hicks Fri, 10 Mar 2017 17:40:22 +0000 + docker.io (1.12.6-0ubuntu2) zesty; urgency=medium * Remove isolation-machine restriction from adt smoke-test diff -Nru docker.io-1.12.6/debian/tests/docker-in-lxd docker.io-1.12.6/debian/tests/docker-in-lxd --- docker.io-1.12.6/debian/tests/docker-in-lxd 2017-01-12 22:50:50.000000000 +0000 +++ docker.io-1.12.6/debian/tests/docker-in-lxd 2017-03-10 17:40:17.000000000 +0000 @@ -32,11 +32,16 @@ echo ${SUBNET} } +# Detect LXD API extensions +lxd_extension() { + lxc info | grep -q "^\- ${1}$" +} + # Attempt to auto-configure ipv4, but only when really running under # autopkgtest. if [ -n "${AUTOPKGTEST_TMP:-}" ]; then lxd init --auto - if [ $(lxc version) '>' '2.2' ]; then + if lxd_extension "network"; then lxc network create adt-br0 lxc network attach-profile adt-br0 default eth0 else