Bug 32659

Summary: udiskctl can't connect to dbus after it moved from /var/run/ to /run/
Product: Branch p8 Reporter: Ivan Zakharyaschev <imz>
Component: glib2Assignee: Andrey Cherepanov <cas>
Status: CLOSED FIXED QA Contact: qa-p8 <qa-p8>
Severity: normal    
Priority: P3 CC: aen, aris, evg, sem, shaba, shrek
Version: не указана   
Hardware: all   
OS: Linux   
Bug Depends on: 32358, 32444    
Bug Blocks:    

Description Ivan Zakharyaschev 2016-10-24 20:52:44 MSK
glib2-2.48.2-alt1

В связи с тем, что dbus-1.10.8-alt1 и псоледующие релизы с этим изменением попали в p8 (но пока ещё не glib2-2.50.1-alt2) -- http://git.altlinux.org/tasks/archive/done/_163/167319/logs/events.2.1.log -- эта проблема актуальна и для p8.

(Раньше не замечал, потому что пробовал regular-wmaker.iso на Sisyphus, но не starterkits на p8.)

+++ This bug was initially created as a clone of Bug #32444 +++

dbus-1.10.8-alt1
udev-229-alt6
udisks2-2.1.8-alt0.1

The new dbus-1.10.8-alt1 moved the socket from /var/run/ (where udiskctl expects it) to /run/ :

$ rpm -q dbus --changes-since=1.10.6
warning: Parsing non-standard test (>) for %|?{}:{}|.
* Sun Jul 24 2016 Valery Inozemtsev <shrek@altlinux.ru> 1.10.8-alt1
- 1.10.8
- moved /var/run/dbus to /run/dbus

In a systemd-system, this makes no difference (/run/ is bind-mounted to /var/run/ by /lib/systemd/system/var-run.mount IIUC), but in a SysVinit-system (like basealt-p8-wmaker-20160612-x86_64.iso), they are different: only /run/ is a tmpfs mounted by /etc/init.d/udevd :

prepare_filesystem()
{
...
        if test -d /run; then
                if ! mountpoint -q /run; then
                        mount $mount_n -t tmpfs -o mode=755,$tmpfs_options runfs /run
                        RETVAL=$[$RETVAL+$?]
                fi
                mkdir -p /run/udev 2>/dev/null
        fi
...
}

This results in:

$ udisksctl -h
Error connecting to the udisks daemon: Could not connect: Connection refused

After rm -rf /var/run/dbus (left over from the runs of previous releases of dbus):

$ udisksctl -h
Error connecting to the udisks daemon: Could not connect: No such file or directory

The real socket is now there:

$ l /run/dbus/
total 0
drwxr-xr-x 10 root root 240 Aug 28 05:59 ../
drwxr-xr-x  3 root root  80 Aug 28 05:59 ./
srwxrwxrwx  1 root root   0 Aug 28 05:59 system_bus_socket
drwxrwxrwt  2 root root  40 Aug 28 05:59 users/

Alternative suggestions:

1. bind-mount /run/ to /var/run/run/ in /etc/init.d/udevd , too (to be compatible with systemd-systems);

2. move the dnus socket back to /var/run/

3. teach all programs about the new location (not connect through the socket in /var/run/dbus/ , but rather use /run/dbus/ .
Comment 1 Yuri N. Sedunov 2016-10-25 16:19:56 MSK
#171370 BUILDING #1 [locked] p8 srpm=glib2-2.48.2-alt1.M80P.2.src.rpm