udev fails in trusty OpenVZ containers, when /etc/init/udev.conf is missing (OVH misconfig?!)

Bug #1377624 reported by Dimitri John Ledkov
50
This bug affects 6 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Opinion
Low
Unassigned
Trusty
Opinion
Low
Unassigned

Bug Description

If you experience below problems, most-likely you are on a system with `/etc/init/udev.conf` missing.

If it is missing, you must resurrect it with:

"""
$ apt-get download udev
$ sudo dpkg -i --force-confmiss udev_*.deb
"""

========================

I'm running 14.04 LTS in an OpenVZ container.

Upgrades failed today, due to failure to configure udev:
$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up udev (204-5ubuntu20.7) ...
 * udev requires hotplug support, not started
   ...fail!
invoke-rc.d: initscript udev, action "restart" failed.
dpkg: error processing package udev (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of systemd-services:
 systemd-services depends on udev (>= 175-0ubuntu23); however:
  Package udev is not configured yet.

dpkg: error processing package systemd-services (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpam-systemd:amd64:
 libpam-systemd:amd64 depends on systemd-services (= 204-5ubuntu20.7); however:
  Package systemd-services is not configured yet.

dpkg: error processing package libpam-systemd:amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 udev
 systemd-services
 libpam-systemd:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

Tags: trusty
tags: added: trusty
Revision history for this message
trinkity (trinkity) wrote :

this is my log:

Setting up udev (204-5ubuntu20.7) ...
 * udev requires hotplug support, not started
   ...fail!
invoke-rc.d: initscript udev, action "restart" failed.
dpkg: error processing package udev (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of systemd-services:
 systemd-services depends on udev (>= 175-0ubuntu23); however:
  Package udev is not configured yet.

dpkg: error processing package systemd-services (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpam-systemd:amd64:
 libpam-systemd:amd64 depends on systemd-services (= 204-5ubuntu20.7); however:
  Package systemd-services is not configured yet.

dpkg: error processing package libpam-systemd:amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 udev
 systemd-services
 libpam-systemd:amd64

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Changed in systemd (Ubuntu):
importance: Undecided → Medium
Revision history for this message
parvan (tdelude) wrote :

I also have the same issue.

Brand new install.
OVH VPS
Ubuntu 14.04 LTS in an OpenVZ container.

Revision history for this message
Andrzej Kłapeć (solidslash) wrote :

I'm also experiencing this issue on my 14.04 OVH VPS. It's running 2.6.32-042stab093.5 kernel, btw.

Changed in systemd (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Changed in systemd (Ubuntu Trusty):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Tiago Peralta (tperalta82) wrote :

Ugly Temporary fix:

After getting this error:

nano /etc/init.d/udev

After the ### END INIT INFO add:

exit 0

Save and exit.

apt-get -f install

Edit the file again, and remove the exit 0, save & exit

Works for me

Revision history for this message
Martin Pitt (pitti) wrote :

Oh, that means you don't run either upstart or systemd in your container? I'm sorry, we really don't support SysV init in Ubuntu.

Revision history for this message
Martin Pitt (pitti) wrote :

Also, it seems you don't have devtmpfs on /dev/ (which you won't get auto-mounted without a proper init system), which triggers this.

Changed in systemd (Ubuntu):
importance: Medium → Low
Changed in systemd (Ubuntu Trusty):
importance: Medium → Low
Changed in systemd (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
Changed in systemd (Ubuntu Trusty):
assignee: Martin Pitt (pitti) → nobody
summary: - udev requires hotplug support, thus upgrades fail
+ udev fails without devtmpfs and sysvinit
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: udev fails without devtmpfs and sysvinit

I am running such a container (it's OpenVZ based)

It is running upstart as pid 1 (in the container) and it is unmodified binary from trusty. (double verified with $ initctl version, which confirms running init is in-fact upstart)

udev upgrade fails in trusty in that container

here is the mount:
/vz/vms/51585/private on / type simfs (rw,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/cgroup type tmpfs (rw,relatime,size=4k,mode=755)
none on /run type tmpfs (rw,nosuid,noexec,relatime,size=104860k,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
none on /run/shm type tmpfs (rw,nosuid,nodev,relatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755)

Revision history for this message
Martin Pitt (pitti) wrote :

That still makes no sense -- udev has upstart scripts, so /etc/init.d/udev should never run under upstart. If you run "service udev start", what does that show? Is that calling the upstart job or the init.d script?

Do you get this with 14.10 or 15.04 too?

Changed in systemd (Ubuntu Trusty):
status: Confirmed → Incomplete
Changed in systemd (Ubuntu):
status: Confirmed → Incomplete
summary: - udev fails without devtmpfs and sysvinit
+ udev fails without devtmpfs and sysvinit in OpenVZ
Revision history for this message
parvan (tdelude) wrote : Re: udev fails without devtmpfs and sysvinit in OpenVZ

I tested the problem on an OVH VPS.
I couldn't get 14.10 to manifest an issue. I think it works.
I was unable to test 15.04.

Running "service udev start" results in this below.
 * udev requires hotplug support, not started
   ...fail!

I bypassed the issue last time by installing 12.04 and then upgrading to 14.04.
Also, 14.04 didn't give me a problem on my first OpenVS VPS install in September 2014.

Thank you for your time.

Revision history for this message
robert owings (f-info-l) wrote :

Not sure this is a bug.

The error:
Setting up udev (204-5ubuntu20.7) ...
 * udev requires hotplug support, not started
   ...fail!

occurs in /etc/init.d/udev when the script checks for the existence of "/sys/kernel/uevent_helper" which does't exist unless the config option "CONFIG_UEVENT_HELPER" was set at kernel compile time. (Open the .config file, search for CONFIG_UEVENT_HELPER and set it to "y". Save the .config file and recompile the kernel and boot it. The above error should not occur. )

If recompiling your kernel is not an option, suggest the following workaround:
edit /etc/init.d/udev
comment out the following lines (at approx line 128-131):
if [ ! -e /sys/kernel/uevent_helper ]; then
  log_failure_msg "udev requires hotplug support, not started"
  log_end_msg 1
fi

The script should then run without error.

Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: udev fails in trusty OpenVZ containers, when /etc/init/udev is missing (OVH misconfig?!)

@ Pitti thanks for the hint:
I've added -x to the udev postinst

$ sudo dpkg --configure udev
Setting up udev (204-5ubuntu20.9) ...
+ set -e
+ update_hwdb
+ udevadm hwdb --update
+ invoke-rc.d udev restart
 * udev requires hotplug support, not started
   ...fail!
invoke-rc.d: initscript udev, action "restart" failed.
dpkg: error processing package udev (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 udev

And clearly /etc/init/udev.conf was not on my system.

I'm suspecting OVH.co.uk provider miss-configuration.

$ sudo apt-get -o DPkg::options::=--force-confmiss --reinstall install udev:amd64

Does not work - I get:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  python-twisted-names
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for udev:amd64

(will file a bug about that)

So finally I did:

""""""""
WORKAROUND

$ apt-get download udev
$ sudo dpkg -i --force-confmiss udev_204-5ubuntu20.9_amd64.deb

""""""""

And that has resolved things:

$ apt-get download udev
Get:1 http://ubuntu.mirrors.ovh.net/ftp.ubuntu.com/ubuntu/ trusty-updates/main udev amd64 204-5ubuntu20.9 [734 kB]
Fetched 734 kB in 0s (14.5 MB/s)

$ sudo dpkg -i --force-confmiss udev_204-5ubuntu20.9_amd64.deb
(Reading database ... 26276 files and directories currently installed.)
Preparing to unpack udev_204-5ubuntu20.9_amd64.deb ...
Leaving 'diversion of /bin/udevadm to /bin/udevadm.upgrade by fake-udev'
Unpacking udev (204-5ubuntu20.9) over (204-5ubuntu20.9) ...
Setting up udev (204-5ubuntu20.9) ...

Configuration file `/etc/init/udev.conf', does not exist on system.
Installing new config file as you requested.
udev start/running, process 13434
Removing 'diversion of /bin/udevadm to /bin/udevadm.upgrade by fake-udev'
update-initramfs: deferring update (trigger activated)
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for initramfs-tools (0.103ubuntu4.2) ...

summary: - udev fails without devtmpfs and sysvinit in OpenVZ
+ udev fails in trusty OpenVZ containers, when /etc/init/udev is missing
+ (OVH misconfig?!)
Changed in systemd (Ubuntu):
status: Incomplete → Opinion
Changed in systemd (Ubuntu Trusty):
status: Incomplete → Opinion
description: updated
summary: - udev fails in trusty OpenVZ containers, when /etc/init/udev is missing
- (OVH misconfig?!)
+ udev fails in trusty OpenVZ containers, when /etc/init/udev.conf is
+ missing (OVH misconfig?!)
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.