MAAS rescue mode cannot run snap binaries

Bug #1671275 reported by Mathieu Trudel-Lapierre
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas (Ubuntu)
New
Undecided
Unassigned

Bug Description

I've tried to set up a test environment for my new snap. I've set up a qemu virtual machine, booted it in rescue mode, and I have snapd (and could manage to install my snap successfully), but running the snap fails with "Bad file descriptor" trying to create user data directory.

Something of the MAAS rescue mode environment is insufficient to running (at least classic-mode) snaps.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

root@square-hyena:~/snap/subiquity# sudo SNAPD_DEBUG=1 /snap/bin/subiquity --dry-run
2017/03/08 23:26:51.734342 cmd.go:111: DEBUG: restarting into "/snap/core/current/usr/bin/snap"
cannot create user data directory: /root/snap/subiquity/x1: Bad file descriptor

description: updated
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :
Download full text (3.4 KiB)

For further testing in case the issue was with the snap I used; it appears to fail for any snap:

ubuntu@vital-calf:~$ sudo snap login
[...]
Login successful
ubuntu@vital-calf:~$ wget http://people.canonical.com/~mtrudel/subiquity_0.20_amd64.snap
--2017-03-09 02:40:07-- http://people.canonical.com/~mtrudel/subiquity_0.20_amd64.snap
Resolving people.canonical.com (people.canonical.com)... 91.189.89.62
Connecting to people.canonical.com (people.canonical.com)|91.189.89.62|:80... ^C
ubuntu@vital-calf:~$ http_proxy="http://192.168.254.254:8000/" wget http://people.canonical.com/~mtrudel/subiquity_0.20_amd64.snap
--2017-03-09 02:40:28-- http://people.canonical.com/~mtrudel/subiquity_0.20_amd64.snap
Connecting to 192.168.254.254:8000... connected.
Proxy request sent, awaiting response... 200 OK
Length: 20377600 (19M)
Saving to: ‘subiquity_0.20_amd64.snap’

subiquity_0.20_amd64.snap 100%[=====================================================================================================>] 19.43M 730KB/s in 33s

2017-03-09 02:41:01 (605 KB/s) - ‘subiquity_0.20_amd64.snap’ saved [20377600/20377600]

ubuntu@vital-calf:~$ sudo snap find
sudo: unable to resolve host vital-calf
Name Version Developer Notes Summary
docker 1.11.2-9 docker-inc - The docker app deployment mechanism
lxd 2.8 canonical - System container manager and API
mongo32 3.2.7 niemeyer - MongoDB document-oriented database
rocketchat-server 0.53.0 rocketchat - Group chat server for 100s, installed in seconds.
ubuntu@vital-calf:~$ sudo snap find hello-world
sudo: unable to resolve host vital-calf
Name Version Developer Notes Summary
[...]
hello-world 6.3 canonical - The 'hello-world' of snaps
[...]
hello-classic-tomechangosubanana-1 2 tomechangosubanana classic say hello classic
[...]
ubuntu@vital-calf:~$ sudo snap install hello-world
sudo: unable to resolve host vital-calf
hello-world 6.3 from 'canonical' installed
ubuntu@vital-calf:~$ /snap/bin/hello-world
cannot create namespace group directory /run/snapd/ns: Bad file descriptor
ubuntu@vital-calf:~$ sudo /snap/bin/hello-world
sudo: unable to resolve host vital-calf
cannot create namespace group directory /run/snapd/ns: Bad file descriptor
ubuntu@vital-calf:~$ sudo snap install hello-classic-tomechangosubanana-1
sudo: unable to resolve host vital-calf
error: snap "hello-classic-tomechangosubanana-1" requires classic or confinement override
ubuntu@vital-calf:~$ sudo snap install --classic hello-classic-tomechangosubanana-1
sudo: unable to resolve host vital-calf
hello-classic-tomechangosubanana-1 2 from 'tomechangosubanana' installed
ubuntu@vital-calf:~$ /snap/bin/hello-classic-tomechangosubanana-1.hello
cannot create user data directory: /home/ubuntu/snap/hello-classic-tomechangosubanana-1/2: Bad file descriptor
ubuntu@vital-calf:~$ sudo snap install --classic --dangerous subiquity_0.20_amd64.snap
sudo: unable to resolve host vital-calf
subiquity 0.20 installed
ubuntu@vital...

Read more...

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Yes it is a dupe. Marking as such.

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.