trusty: snapd deb package does not start systemd
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Medium
|
Michael Vogt |
Bug Description
Installation snapd package on hwe kernel in Azure trusty Canonical Ubuntu vms does not start systemd. Likely some permissions errors. Seeing the following error messages (but no non-zero exit code). And systemd is service not started.
"""
All runlevel operations denied by policy
invoke-rc.d: policy-rc.d denied execution of start.
...
All runlevel operations denied by policy
invoke-rc.d: policy-rc.d denied execution of start.
All runlevel operations denied by policy
...
"""
$ uname -r
4.4.0-173-generic
$ sudo apt-get install --assume-yes snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
amd64-microcode cgroup-lite crda intel-microcode iucode-tool iw liblzo2-2
libnl-3-200 libnl-genl-3-200 libseccomp2 libsystemd-journal0 linux-firmware
linux-
linux-
linux-
linux-
squashfs-tools systemd thermald wireless-regdb
Suggested packages:
fdutils linux-lts-
linux-
The following NEW packages will be installed:
amd64-microcode cgroup-lite crda intel-microcode iucode-tool iw liblzo2-2
libnl-3-200 libnl-genl-3-200 libseccomp2 libsystemd-journal0 linux-firmware
linux-
linux-
linux-
linux-
squashfs-tools systemd thermald wireless-regdb
0 upgraded, 25 newly installed, 0 to remove and 8 not upgraded.
Need to get 117 MB of archives.
After this operation, 514 MB of additional disk space will be used.
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 https:/
Get:11 https:/
Get:12 https:/
Get:13 http://
Get:14 http://
Get:15 http://
Get:16 http://
Get:17 http://
Get:18 http://
Get:19 https:/
Get:20 https:/
Get:21 https:/
Get:22 https:/
Get:23 https:/
Get:24 https:/
Get:25 https:/
Fetched 117 MB in 10s (11.2 MB/s)
Selecting previously unselected package liblzo2-2:amd64.
(Reading database ... 29110 files and directories currently installed.)
Preparing to unpack .../liblzo2-
Unpacking liblzo2-2:amd64 (2.06-1.2ubuntu1.1) ...
Selecting previously unselected package libnl-3-200:amd64.
Preparing to unpack .../libnl-
Unpacking libnl-3-200:amd64 (3.2.21-1ubuntu4.1) ...
Selecting previously unselected package libnl-genl-
Preparing to unpack .../libnl-
Unpacking libnl-genl-
Selecting previously unselected package libseccomp2:amd64.
Preparing to unpack .../libseccomp2
Unpacking libseccomp2:amd64 (2.4.1-
Selecting previously unselected package libsystemd-
Preparing to unpack .../libsystemd-
Unpacking libsystemd-
Selecting previously unselected package iucode-tool.
Preparing to unpack .../iucode-
Unpacking iucode-tool (1.0.1-1) ...
Selecting previously unselected package intel-microcode.
Preparing to unpack .../intel-
Unpacking intel-microcode (3.20191115.
Selecting previously unselected package wireless-regdb.
Preparing to unpack .../wireless-
Unpacking wireless-regdb (2013.02.
Selecting previously unselected package crda.
Preparing to unpack .../crda_
Unpacking crda (1.1.2-1ubuntu2) ...
Selecting previously unselected package iw.
Preparing to unpack .../archives/
Unpacking iw (3.4-1) ...
Selecting previously unselected package linux-firmware.
Preparing to unpack .../linux-
Unpacking linux-firmware (1.127.24) ...
Selecting previously unselected package linux-modules-
Preparing to unpack .../linux-
Unpacking linux-modules-
Selecting previously unselected package linux-image-
Preparing to unpack .../linux-
Unpacking linux-image-
Selecting previously unselected package linux-modules-
Preparing to unpack .../linux-
Unpacking linux-modules-
Selecting previously unselected package amd64-microcode.
Preparing to unpack .../amd64-
Unpacking amd64-microcode (3.20180524.
Selecting previously unselected package linux-image-
Preparing to unpack .../linux-
Unpacking linux-image-
Selecting previously unselected package linux-headers-
Preparing to unpack .../linux-
Unpacking linux-headers-
Selecting previously unselected package linux-headers-
Preparing to unpack .../linux-
Unpacking linux-headers-
Selecting previously unselected package linux-headers-
Preparing to unpack .../linux-
Unpacking linux-headers-
Selecting previously unselected package linux-generic-
Preparing to unpack .../linux-
Unpacking linux-generic-
Selecting previously unselected package cgroup-lite.
Preparing to unpack .../cgroup-
Unpacking cgroup-lite (1.9) ...
Selecting previously unselected package squashfs-tools.
Preparing to unpack .../squashfs-
Unpacking squashfs-tools (1:4.2+
Selecting previously unselected package systemd.
Preparing to unpack .../systemd_
Unpacking systemd (204-5ubuntu20.31) ...
Selecting previously unselected package snapd.
Preparing to unpack .../snapd_
Unpacking snapd (2.38~14.04) ...
Selecting previously unselected package thermald.
Preparing to unpack .../thermald_
Unpacking thermald (1.4.3-5~14.04.4) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Setting up liblzo2-2:amd64 (2.06-1.2ubuntu1.1) ...
Setting up libnl-3-200:amd64 (3.2.21-1ubuntu4.1) ...
Setting up libnl-genl-
Setting up libseccomp2:amd64 (2.4.1-
Setting up libsystemd-
Setting up iucode-tool (1.0.1-1) ...
Setting up intel-microcode (3.20191115.
update-initramfs: deferring update (trigger activated)
intel-microcode: microcode will be updated at next boot
Setting up wireless-regdb (2013.02.
Setting up crda (1.1.2-1ubuntu2) ...
Setting up iw (3.4-1) ...
Setting up linux-firmware (1.127.24) ...
update-initramfs: Generating /boot/initrd.
update-initramfs: Generating /boot/initrd.
Setting up linux-modules-
Setting up linux-image-
I: /vmlinuz.old is now a symlink to boot/vmlinuz-
I: /initrd.img.old is now a symlink to boot/initrd.
I: /vmlinuz is now a symlink to boot/vmlinuz-
I: /initrd.img is now a symlink to boot/initrd.
Setting up linux-modules-
Setting up amd64-microcode (3.20180524.
update-initramfs: deferring update (trigger activated)
Setting up linux-image-
Setting up linux-headers-
Setting up linux-headers-
Setting up linux-headers-
Setting up linux-generic-
Setting up cgroup-lite (1.9) ...
All runlevel operations denied by policy
invoke-rc.d: policy-rc.d denied execution of start.
Setting up squashfs-tools (1:4.2+
Setting up systemd (204-5ubuntu20.31) ...
Initializing machine ID from D-Bus machine ID.
All runlevel operations denied by policy
invoke-rc.d: policy-rc.d denied execution of start.
Setting up thermald (1.4.3-5~14.04.4) ...
All runlevel operations denied by policy
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for ureadahead (0.100.0-16) ...
Setting up snapd (2.38~14.04) ...
Processing triggers for libc-bin (2.19-0ubuntu6.
Processing triggers for initramfs-tools (0.103ubuntu4.11) ...
update-initramfs: Generating /boot/initrd.
Processing triggers for linux-image-
/etc/kernel/
update-initramfs: Generating /boot/initrd.
/etc/kernel/
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-
Found kernel: /boot/vmlinuz-
Found kernel: /boot/vmlinuz-
Replacing config file /run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done
/etc/kernel/
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
done
$ sudo service systemd status
systemd stop/waiting
$ sudo systemctl status snapd
Failed to get D-Bus connection: No connection to service manager.
$ snap version
snap 2.38~14.04
snapd unavailable
series -
Changed in snapd: | |
status: | New → Incomplete |
Changed in snapd: | |
assignee: | nobody → Michael Vogt (mvo) |
Changed in snapd: | |
status: | New → Triaged |
importance: | Undecided → Medium |
This is curious. The error message indicates that the "policy-rc.d" mechanism is used to prevent daemons from starting. And indeed: policy- rc.d
```
# cat /usr/sbin/
#!/bin/sh
echo "All runlevel operations denied by policy" >&2
exit 101
```
However this file is not owned by any package: policy- rc.d policy- rc.d
```
# dpkg -S /usr/sbin/
dpkg-query: no path found matching pattern /usr/sbin/
```
and nothing in /var/lib/dpkg/info seems to create policy-rc.d.
The file was last modified "Feb 11" but nothing else in {,/usr}/{,s}bin has a similar timestamp. policy- rc.d policy- rc.d'
```
# stat /usr/sbin/
File: '/usr/sbin/
Size: 71 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 2413 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2020-02-19 10:51:55.427337996 +0000
Modify: 2020-02-11 14:54:19.833694933 +0000
Change: 2020-02-11 14:54:19.837694937 +0000
Birth: -
root@snapdtrusty:~# find /{,usr}/{,s}bin/ -printf '%p %t\n' |grep "Feb 11" policy- rc.d Tue Feb 11 14:54:19.0833694933 2020
/usr/sbin/
root@snapdtrusty:~# find /{,usr}/{,s}bin/ -printf '%p %t\n' |wc -l
1169
But: ubuntu- advantage Tue Feb 11 15:04:04.0982248752 2020
# find /usr -printf '%p %t\n' |grep "Feb 11"
/usr/lib/
...
So maybe a side-effect of the ubuntu-advantage install or the script that did that install forgot to cleanup something?
```