sytemd-udev package upgrade breaks if udev is masked
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
The Anbox Cloud LXD images are based of the standard Ubuntu cloud images for LXD but have the systemd-
With the latest security patch on Ubuntu 22.04 upgrading the udev package fails:
...
Mar 07 21:33:48 ams-cg3qqttdjmc
Mar 07 21:33:48 ams-cg3qqttdjmc
Mar 07 21:33:48 ams-cg3qqttdjmc
Mar 07 21:33:48 ams-cg3qqttdjmc
Mar 07 21:33:48 ams-cg3qqttdjmc
Mar 07 21:33:48 ams-cg3qqttdjmc
Mar 07 21:33:48 ams-cg3qqttdjmc
Mar 07 21:33:49 ams-cg3qqttdjmc
Mar 07 21:33:49 ams-cg3qqttdjmc
Mar 07 21:33:49 ams-cg3qqttdjmc
Mar 07 21:33:49 ams-cg3qqttdjmc
Mar 07 21:33:49 ams-cg3qqttdjmc
Mar 07 21:33:49 ams-cg3qqttdjmc
Mar 07 21:33:49 ams-cg3qqttdjmc
Mar 07 21:33:49 ams-cg3qqttdjmc
We can workaround this by doing a patch release to our users next week but it would be a lot better if the package scripts check if the service unit is masked and if it is avoid restarting udev.service
The problem isn't introduced with the 249.11-0ubuntu3.7 but should exist for longer already. It just became a problem for us due to the security patch rolling in via unattended-upgrades
description: | updated |
Changed in systemd (Ubuntu): | |
importance: | Undecided → Low |
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-