snapd (deb) fails to install snapd (snap) inside LXD on a buildd based image

Bug #1865503 reported by Sergio Schvezov
68
This bug affects 14 people
Affects Status Importance Assigned to Milestone
snapd
Triaged
High
Unassigned

Bug Description

This is part of the bootstrapping an image used for buildd's, which are going to be used across architectures for LXD for snapcraft. What follows is the rough steps to reproduce Snapcraft would do to ready the system.

Steps to reproduce:
- lxc remote add buildd https://cloud-images.ubuntu.com/buildd/daily --protocol simplestreams
- lxc launch buildd:20.04 snapcraft-core20-test
- alias srun="lxc exec snapcraft-core20-test"
- srun bash
- cat > /etc/systemd/network/10-eth0.network << EOF
[Match]
Name=eth0

[Network]
DHCP=ipv4
LinkLocalAddressing=ipv6

[DHCP]
RouteMetric=100
UseMTU=true
EOF
- exit
- lxc restart snapcraft-core20-test
- srun apt-get update
- srun apt install snapd
- srun snap install snapd

Observed failure:
error: cannot perform the following tasks:
- Setup snap "snapd" (6434) security profiles (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory

Output of journalctl -u systemd-udevd:
-- Logs begin at Mon 2020-03-02 13:24:51 UTC, end at Mon 2020-03-02 13:43:56 UTC. --
Mar 02 13:28:15 ubuntu systemd-udevd[53]: Failed to chown '/dev/net/tun' 0 0:
 Operation not permitted
Mar 02 13:28:15 ubuntu systemd-udevd[53]: Failed to apply permissions on stat
ic device nodes: Operation not permitted
Mar 02 13:28:15 ubuntu systemd-udevd[63]: ethtool: autonegotiation is unset or enabled, the speed and
 duplex are not writable.

Tags: core20
tags: added: core20
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This affects core20

Changed in snapd:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I have a feeling this comes from udev package, from /lib/udev/rules.d/50-default-rules:80

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I'll write a regression test for this.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I believe this is a bug in snapd. I have a local fix I need to spend some more time on.

Changed in snapd:
status: Confirmed → In Progress
assignee: nobody → Zygmunt Krynicki (zyga)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :
no longer affects: udev (Ubuntu)
description: updated
Revision history for this message
Ian Johnson (anonymouse67) wrote :

This is not yet fixed or In Progress, we need a new plan for how to fix this as Zygmunt's PR was NACK'd.

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

when do you plan to fix this bug? I have a lxc container which was installed maas 2.8 rack controller and plan to upgrade to 2.9.

As ubuntu 18 does not support maas 2.8 I had to upgrade it to focal but encounter with this issue.
Setup snap "maas" (11851) security profiles for auto-connections -error: cannot perform the following tasks:
- Setup snap "maas" (11851) security profiles (cannot setup udev for snap "maas": cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "maas" (11851) security profiles (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "maas" (11851) security profiles for auto-connections (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)

Revision history for this message
David A. Desrosiers (setuid) wrote :

I can confirm the same exact behavior with LXD 5.17/stable and MAAS 3.2.9:

# snap install maas --channel=3.2/stable
error: cannot perform the following tasks:
- Setup snap "maas" (29774) security profiles (cannot setup udev for snap "maas": cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "maas" (29774) security profiles (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "maas" (29774) security profiles for auto-connections (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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