For testing purposes, this can be reproduced this with standard LXD images by masking the systemd-udev.service unit, as you described.
Could you please confirm if from the Anbox perspective, for a workaround, is it OK to temporatily unmask/start the unit (due to restart), then upgrade the package, and stop/mask again?
...
Setting up udev (249.11-0ubuntu3.7) ...
Failed to restart udev.service: Unit udev.service failed to load properly, please adjust/correct and reload service manager: File exists
See system logs and 'systemctl status udev.service' for details.
invoke-rc.d: initscript udev, action "restart" failed.
○ udev.service
Loaded: error (Reason: Unit udev.service failed to load properly, please adjust/correct and reload service manager: File exists)
Active: inactive (dead)
Warning: The unit file, source configuration file or drop-ins of udev.service changed on disk. Run 'systemctl daemon-reload' to reload units.
dpkg: error processing package udev (--configure):
installed udev package post-installation script subprocess returned error exit status 1
dmesg: read kernel buffer failed: Operation not permitted
...
Hi Simon,
Thanks for the detailed report!
For testing purposes, this can be reproduced this with standard LXD images by masking the systemd- udev.service unit, as you described.
Could you please confirm if from the Anbox perspective, for a workaround, is it OK to temporatily unmask/start the unit (due to restart), then upgrade the package, and stop/mask again?
For example:
lxc launch ubuntu:jammy jammy-udev-masked
lxc exec jammy-udev-masked -- su - ubuntu
$ dpkg -s udev | grep Version:
Version: 249.11-0ubuntu3.6
sudo systemctl mask systemd- udevd.service udevd.service
sudo systemctl stop systemd-
sudo apt update && sudo apt install -y udev
...
Setting up udev (249.11-0ubuntu3.7) ...
Failed to restart udev.service: Unit udev.service failed to load properly, please adjust/correct and reload service manager: File exists
See system logs and 'systemctl status udev.service' for details.
invoke-rc.d: initscript udev, action "restart" failed.
○ udev.service
Loaded: error (Reason: Unit udev.service failed to load properly, please adjust/correct and reload service manager: File exists)
Active: inactive (dead)
Warning: The unit file, source configuration file or drop-ins of udev.service changed on disk. Run 'systemctl daemon-reload' to reload units.
dpkg: error processing package udev (--configure):
installed udev package post-installation script subprocess returned error exit status 1
dmesg: read kernel buffer failed: Operation not permitted
...
sudo systemctl unmask systemd- udevd.service
sudo apt install -f
sudo systemctl mask systemd- udevd.service udevd.service
sudo systemctl stop systemd-