KVM/LXD tests do not run on checkbox-snappy

Bug #1917701 reported by Ike Panhc
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Resource
Expired
High
Unassigned

Bug Description

KVM/LXD tests do not run on checkbox-snappy with Ubuntu Core 20

[steps]
$ Install Ubuntu Core 20
$ snap install checkbox-snappy --devmode --channel=20/stable
$ checkbox-snappy.checkbox-cli # make sure KVM and LXD are selected

[expected]
KVM/LXD tested and passed

[actual]
Tests do not run with

job cannot be started: resource expression "package.name == 'qemu-system'" evaluates to false
job cannot be started: resource expression "executable.name == 'lxc'" evaluates to false

https://kernel.ubuntu.com/~ikepanhc/uc20-checkbox/submission_2021-03-03T14.39.06.645877.html

[details]
$ snap list
Name Version Rev Tracking Publisher Notes
checkbox-snappy 20.16 2108 20/stable ce-certification-qa devmode
checkbox20 1.20 428 latest/stable ce-certification-qa -
core20 20210216 958 latest/edge canonical✓ base
pc 20-0.4 115 20/edge canonical✓ gadget
pc-kernel 5.4.0-66.74.1 722 20/edge canonical✓ kernel
snapd 2.49+git549.g07e33f2 11343 latest/edge canonical✓ snapd

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

On UC we basically have to update job definitions where requirements are using deb package names.

W/O a snap equivalent for qemu-system I'd only check for this one on classic.
About missing lxc, base on your snap list, the lxd snap is missing.

affects: checkbox-snappy → plainbox-provider-checkbox
Changed in plainbox-provider-checkbox:
milestone: none → 0.58.0
status: New → Triaged
Revision history for this message
Ike Panhc (ikepanhc) wrote :

lxc test still fails after lxd installed.

https://kernel.ubuntu.com/~ikepanhc/uc20-checkbox/submission_2021-03-08T04.41.55.727314.html#3-2-log

$ snap list
Name Version Rev Tracking Publisher Notes
checkbox-snappy 20.16 2108 20/stable ce-certification-qa devmode
checkbox20 1.20 428 latest/stable ce-certification-qa -
core18 20210128 1988 latest/stable canonical✓ base
core20 20210216 958 latest/edge canonical✓ base
lxd 4.11 19566 latest/stable canonical✓ -
pc 20-0.4 115 20/edge canonical✓ gadget
pc-kernel 5.4.0-66.74.1 722 20/edge canonical✓ kernel
snapd 2.49+git632.gfed3a36 11394 latest/edge canonical✓ snapd

Revision history for this message
Jeff Lane  (bladernr) wrote :

It's looking for the executable 'lxc' and not finding it.

can you run the following command?
find -H $(echo "$PATH" | sed -e 's/:/ /g') -maxdepth 1 -xtype f -executable -printf "name: %f\nlocation: %h\n\n" |grep -A1 lxc

Changed in plainbox-provider-checkbox:
status: Triaged → Incomplete
Revision history for this message
Ike Panhc (ikepanhc) wrote :

They are all symlink to /usr/bin/snap then to /snap/snapd/current/usr/bin/snap

$ find -H $(echo "$PATH" | sed -e 's/:/ /g') -maxdepth 1 -xtype f -executable -printf "name: %f\nlocation: %h\n\n" |grep -A1 lxc
find: '/usr/local/sbin': No such file or directory
find: '/usr/local/bin': No such file or directory
find: '/usr/local/games': No such file or directory
name: lxd.lxc
location: /snap/bin
--
name: lxd.lxc-to-lxd
location: /snap/bin
--
name: lxc
location: /snap/bin
$ ls -al /snap/bin
total 8
drwxr-xr-x 2 root root 4096 Mar 8 04:39 .
drwxr-xr-x 11 root root 4096 Mar 8 04:39 ..
lrwxrwxrwx 1 root root 13 Mar 8 04:36 checkbox-snappy.checkbox-cli -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:36 checkbox-snappy.client-cert-iot-ubuntucore -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:36 checkbox-snappy.configure -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:36 checkbox-snappy.hw-collection -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:36 checkbox-snappy.shell -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:36 checkbox-snappy.sru -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:36 checkbox-snappy.test-runner -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:36 checkbox-snappy.test-runner-edgex -> /usr/bin/snap
lrwxrwxrwx 1 root root 7 Mar 8 04:39 lxc -> lxd.lxc
lrwxrwxrwx 1 root root 13 Mar 8 04:39 lxd -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:39 lxd.benchmark -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:39 lxd.buginfo -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:39 lxd.check-kernel -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:39 lxd.lxc -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:39 lxd.lxc-to-lxd -> /usr/bin/snap
lrwxrwxrwx 1 root root 13 Mar 8 04:39 lxd.migrate -> /usr/bin/snap

Changed in plainbox-provider-checkbox:
status: Incomplete → New
Revision history for this message
Jeff Lane  (bladernr) wrote :

Thanks Ike. I've moved this to plainbox-provider-resource based on that info. Looks like the real issue is that the executable resource is not properly providng the lxc executable (or it's due to how the symlinking works) and that's causing the LXD test to be skipped.

affects: plainbox-provider-checkbox → plainbox-provider-resource
Changed in plainbox-provider-resource:
milestone: 0.58.0 → none
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Maksim Beliaev (beliaev-maksim) wrote :

Bug was migrated to GitHub: https://github.com/canonical/checkbox/issues/82.
Bug is no more monitored here.

Changed in plainbox-provider-resource:
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.