running a command for a snap in try mode fails on trusty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Fix Released
|
Undecided
|
Thomas Voß | ||
snap-confine |
Invalid
|
Undecided
|
Unassigned | ||
snap-confine (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When executing snapd's spread test suite, tests/main/try fails with:
+ echo 'Given a buildable snap which access confinement-
Given a buildable snap which access confinement-
+ echo 'When try is executed on that directory with devmode enabled'
When try is executed on that directory with devmode enabled
+ snap try /home/gopath/
test-snapd-tools 1.0 mounted from /home/gopath/
+ echo 'Then the snap command is able to access the protected resource'
Then the snap command is able to access the protected resource
+ test-snapd-
cannot snap-exec: cannot read info for "test-snapd-tools": cannot find installed snap "test-snapd-tools" at revision x3
mount reports:
qemu:ubuntu-
/dev/sda1 on / type ext4 (rw)
proc on /proc type proc (rw,noexec,
sysfs on /sys type sysfs (rw,noexec,
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,
tmpfs on /run type tmpfs (rw,noexec,
none on /run/lock type tmpfs (rw,noexec,
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,
none on /sys/fs/pstore type pstore (rw)
tracefs on /var/lib/
systemd on /sys/fs/
/var/lib/
/home/gopath/
/home/gopath/
/home/gopath/
snap list reports:
qemu:ubuntu-
Name Version Rev Developer Notes
core 16.04.1 6 canonical -
test-snapd-tools 1.0 x3 devmode,try
tags: | added: trusty |
Changed in snappy: | |
status: | In Progress → Fix Released |
The following setup gives me a working shell
> export SNAP_NAME= test-snapd- tools snapd/snap- confine snap.test- snapd-tools. head /bin/bash
> /usr/lib/
with the following /proc/self/ mountinfo:
qemu:ubuntu- 14.04-64 .../tests/main/try# cat /proc/self/ mountinfo 736824k, nr_inodes= 184206, mode=755 noexec, relatime - devpts devpts rw,gid= 5,mode= 620,ptmxmode= 000 nodev,noexec, relatime - proc proc rw nodev,noexec, relatime - sysfs sysfs rw cgroup/ systemd rw,nosuid, nodev,noexec, relatime - cgroup systemd rw,release_ agent=/ lib/systemd/ systemd- cgroups- agent,name= systemd cgroup/ cpuset rw,relatime - cgroup cgroup rw,cpuset cgroup/ cpuacct rw,relatime - cgroup cgroup rw,cpuacct cgroup/ blkio rw,relatime - cgroup cgroup rw,blkio cgroup/ memory rw,relatime - cgroup cgroup rw,memory cgroup/ devices rw,relatime - cgroup cgroup rw,devices cgroup/ freezer rw,relatime - cgroup cgroup rw,freezer cgroup/ net_cls rw,relatime - cgroup cgroup rw,net_cls cgroup/ perf_event rw,relatime - cgroup cgroup rw,perf_event cgroup/ net_prio rw,relatime - cgroup cgroup rw,net_prio cgroup/ hugetlb rw,relatime - cgroup cgroup rw,hugetlb fuse/connection s rw,relatime - fusectl none rw security rw,relatime - securityfs none rw rootfs_ aECzku rw,relatime - squashfs /dev/loop0 ro rootfs_ aECzku/ dev rw,relatime - devtmpfs udev rw,size= 736824k, nr_inodes= 184206, mode=755 rootfs_ aECzku/ dev/pts rw,nosuid, noexec, relatime - devpts devpts rw,gid= 5,mode= 620,ptmxmode= 000 rootfs_ aECzku/ etc rw,relatime - ext4 /dev/sda1 rw,data=ordered rootfs_ aECzku/ home rw,relatime - ext4 /dev/sda1 rw,data=ordered rootfs_ aECzku/ root rw,relatime - ext4 /dev/sda1 rw,data=ordered rootfs_ aECzku/ proc rw,nosuid, nodev,noexec, relatime - proc proc rw rootfs_ aECzku/ sys rw,nosuid, nodev,noexec, relatime - sysfs sysfs rw rootfs_ aECzku/ sys/fs/ cgroup rw,relatime - tmpfs none rw,size=4k,mode=755 rootfs_ aECzku/ sys/fs/ cgroup/ systemd rw,nosuid, nodev,noexec, ...
79 48 7:0 / / rw,relatime - squashfs /dev/loop0 ro
80 79 0:6 / /dev rw,relatime - devtmpfs udev rw,size=
81 80 0:14 / /dev/pts rw,nosuid,
82 79 8:1 /etc /etc rw,relatime - ext4 /dev/sda1 rw,data=ordered
83 79 8:1 /home /home rw,relatime - ext4 /dev/sda1 rw,data=ordered
84 79 8:1 /root /root rw,relatime - ext4 /dev/sda1 rw,data=ordered
85 79 0:4 / /proc rw,nosuid,
86 79 0:17 / /sys rw,nosuid,
87 86 0:19 / /sys/fs/cgroup rw,relatime - tmpfs none rw,size=4k,mode=755
88 87 0:25 / /sys/fs/
89 87 0:26 / /sys/fs/
90 87 0:27 / /sys/fs/cgroup/cpu rw,relatime - cgroup cgroup rw,cpu
91 87 0:28 / /sys/fs/
92 87 0:29 / /sys/fs/
93 87 0:30 / /sys/fs/
94 87 0:31 / /sys/fs/
95 87 0:32 / /sys/fs/
96 87 0:33 / /sys/fs/
97 87 0:34 / /sys/fs/
98 87 0:35 / /sys/fs/
99 87 0:36 / /sys/fs/
100 87 0:37 / /sys/fs/cgroup/pids rw,relatime - cgroup cgroup rw,pids
101 86 0:20 / /sys/fs/
102 86 0:7 / /sys/kernel/debug rw,relatime - debugfs none rw
103 86 0:12 / /sys/kernel/
104 86 0:24 / /sys/fs/pstore rw,relatime - pstore none rw
105 79 8:1 /tmp /tmp rw,relatime - ext4 /dev/sda1 rw,data=ordered
106 105 7:0 / /tmp/snap.
107 106 0:6 / /tmp/snap.
108 107 0:14 / /tmp/snap.
109 106 8:1 /etc /tmp/snap.
110 106 8:1 /home /tmp/snap.
111 106 8:1 /root /tmp/snap.
112 106 0:4 / /tmp/snap.
113 106 0:17 / /tmp/snap.
114 113 0:19 / /tmp/snap.
115 114 0:25 / /tmp/snap.