Cannot find snap-exec when fedora29 is the only installed base

Bug #1801663 reported by Zygmunt Krynicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
Low
Zygmunt Krynicki

Bug Description

On a system where snapd is installed from a distribution package (Fedora 29), using the "hello-fedora" and "fedora29" snaps (app, and base respectively) snapd incorrectly looks for snap-exec in the core snap that is not installed.

Base snaps should use the distribution provided snap-exec and snapctl in absence of the core snap.

Revision history for this message
Michael Vogt (mvo) wrote :

This should work - it sounds like a issue of "/usr/lib/snapd/snap-exec" vs "/usr/libexec/snapd/snap-exec" maybe?

Changed in snapd:
status: Confirmed → Incomplete
Revision history for this message
Zygmunt Krynicki (zyga) wrote :
Download full text (7.3 KiB)

Installing fedora29 from the beta channel and hello-fedora from stable on Fedora 29 Workstation, running snapd 2.36.1 I get the following behaviour:

[zyga@localhost ~]$ snap version
snap 2.36-1.fc29
snapd 2.36-1.fc29
series 16
fedora 29
kernel 4.18.17-300.fc29.x86_64

[zyga@localhost ~]$ sudo snap install fedora29 --beta
fedora29 (beta) 2018.11.06 from Zygmunt Krynicki (zygoon) installed

[zyga@localhost ~]$ sudo snap install hello-fedora
hello-fedora 0.1 from Zygmunt Krynicki (zygoon) installed

[zyga@localhost ~]$ snap run hello-fedora
cannot locate the core snap: No such file or directory

[zyga@localhost ~]$ SNAPD_DEBUG=1 snap run hello-fedora
2018/11/14 19:17:36.474709 cmd_linux.go:70: DEBUG: re-exec not supported on distro "fedora" yet
DEBUG: security tag: snap.hello-fedora.hello-fedora
DEBUG: executable: /usr/lib/snapd/snap-exec
DEBUG: confinement: non-classic
DEBUG: base snap: fedora29
DEBUG: ruid: 1000, euid: 0, suid: 0
DEBUG: rgid: 1000, egid: 0, sgid: 0
DEBUG: checking if the current process shares mount namespace with the init process
DEBUG: re-associating is not required
DEBUG: creating lock directory /run/snapd/lock (if missing)
DEBUG: opening lock directory /run/snapd/lock
DEBUG: opening lock file: /run/snapd/lock/.lock
DEBUG: sanity timeout initialized and set for three seconds
DEBUG: acquiring exclusive lock (scope (global), uid 0)
DEBUG: sanity timeout reset and disabled
DEBUG: ensuring that snap mount directory is shared
DEBUG: unsharing snap namespace directory
DEBUG: creating namespace group directory /run/snapd/ns
DEBUG: namespace group directory does not require intialization
DEBUG: releasing lock 4
DEBUG: snap-update-ns executable: /usr/libexec/snapd/snap-update-ns
DEBUG: opened snap-update-ns executable as file descriptor 3
DEBUG: creating lock directory /run/snapd/lock (if missing)
DEBUG: opening lock directory /run/snapd/lock
DEBUG: opening lock file: /run/snapd/lock/hello-fedora.lock
DEBUG: sanity timeout initialized and set for three seconds
DEBUG: acquiring exclusive lock (scope hello-fedora, uid 0)
DEBUG: sanity timeout reset and disabled
DEBUG: initializing mount namespace: hello-fedora
DEBUG: opening namespace group directory /run/snapd/ns
DEBUG: initializing new namespace group hello-fedora
DEBUG: forking support process for mount namespace capture
DEBUG: forked support process has pid 4090
DEBUG: forked support process has pid 0
DEBUG: changing apparmor hat of the support process for mount namespace capture
DEBUG: ensuring that parent process is still alive
DEBUG: waiting for a eventfd data from the parent process to continue
DEBUG: sanity timeout initialized and set for three seconds
DEBUG: unsharing the mount namespace
DEBUG: scratch directory for constructing namespace: /tmp/snap.rootfs_QsegOH
DEBUG: performing operation: (disabled) use debug build to see details
DEBUG: performing operation: (disabled) use debug build to see details
DEBUG: performing operation: (disabled) use debug build to see details
DEBUG: performing operation: (disabled) use debug build to see details
DEBUG: performing operation: (disabled) use debug build to see details
DEBUG: performing operation: (disabled) use debu...

Read more...

Changed in snapd:
status: Incomplete → In Progress
assignee: nobody → Zygmunt Krynicki (zyga)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This should be fixed with the following PR https://github.com/snapcore/snapd/pull/6123

Zygmunt Krynicki (zyga)
Changed in snapd:
milestone: none → 2.37
status: In Progress → Fix Committed
Zygmunt Krynicki (zyga)
Changed in snapd:
status: Fix Committed → Fix Released
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.