Discussion:
Timed out waiting for device dev-disk-by...
(too old to reply)
Thomas Meyer
2014-09-29 18:29:03 UTC
Permalink
Hi,

I get a timeout in the Fedora 21 alpha:

[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-008af19d\x2d2562\x2d49bd\x2d8907\x2d721ea08f3e14.device.

But all devices are available from early kernel start:
# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 11 Sep 29 20:17 008af19d-2562-49bd-8907-721ea08f3e14 -> ../../ubda1
lrwxrwxrwx 1 root root 11 Sep 29 20:17 e2bffa45-d84f-47bc-81ba-e7a395751fa6 -> ../../ubda3
lrwxrwxrwx 1 root root 11 Sep 29 20:17 f452f020-a446-41ed-93c0-ee5ce56d6ea4 -> ../../ubda2

It feels like some event notification is lost in the boot process or something like this?!

What exactly makes the device unit go into the state active/plugged?

This is a boot of the Fedora 21 alpha under user mode linux.

Any ideas what could be wrong here?

with kind regards
thomas
Richard Weinberger
2014-09-29 20:20:49 UTC
Permalink
Post by Thomas Meyer
Hi,
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-008af19d\x2d2562\x2d49bd\x2d8907\x2d721ea08f3e14.device.
# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 11 Sep 29 20:17 008af19d-2562-49bd-8907-721ea08f3e14 -> ../../ubda1
lrwxrwxrwx 1 root root 11 Sep 29 20:17 e2bffa45-d84f-47bc-81ba-e7a395751fa6 -> ../../ubda3
lrwxrwxrwx 1 root root 11 Sep 29 20:17 f452f020-a446-41ed-93c0-ee5ce56d6ea4 -> ../../ubda2
It feels like some event notification is lost in the boot process or something like this?!
What exactly makes the device unit go into the state active/plugged?
This is a boot of the Fedora 21 alpha under user mode linux.
Any ideas what could be wrong here?
Please always CC me and/or the UML mailinglist in case of UML related issues.
I'm very interested in having UML work with systemd.
--
Thanks,
//richard
Thomas Meyer
2014-09-30 18:27:36 UTC
Permalink
Post by Richard Weinberger
Post by Thomas Meyer
Hi,
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-008af19d\x2d2562\x2d49bd\x2d8907\x2d721ea08f3e14.device.
# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 11 Sep 29 20:17 008af19d-2562-49bd-8907-721ea08f3e14 -> ../../ubda1
lrwxrwxrwx 1 root root 11 Sep 29 20:17 e2bffa45-d84f-47bc-81ba-e7a395751fa6 -> ../../ubda3
lrwxrwxrwx 1 root root 11 Sep 29 20:17 f452f020-a446-41ed-93c0-ee5ce56d6ea4 -> ../../ubda2
It feels like some event notification is lost in the boot process or something like this?!
What exactly makes the device unit go into the state active/plugged?
This is a boot of the Fedora 21 alpha under user mode linux.
Any ideas what could be wrong here?
Please always CC me and/or the UML mailinglist in case of UML related issues.
I'm very interested in having UML work with systemd.
Okay Richard, will do so in future.

Some more info about the above systemd wait (with
systemd.log_level=debug and DEBUG_KOBJECT)

Systemd starts and installs a job for each device tagged with "systemd":
Sep 30 18:07:58 localhost systemd[1]: Installed new job dev-ubdb3.device/start as 34
Sep 30 18:07:58 localhost systemd[1]: Installed new job systemd-***@dev-ubdb3.service/start as 35

Sep 30 18:07:58 localhost systemd[1]: Enqueued job initrd.target/start as 1
Sep 30 18:07:58 localhost systemd[1]: Loaded units and determined initial transaction in 837.189ms.
Sep 30 18:07:58 localhost systemd[1]: Received SIGCHLD from PID 32 (n/a).

Device unit is waiting:
Sep 30 18:07:58 localhost systemd[1]: Expecting device dev-ubdb3.device...

udev coldplug:
Sep 30 18:08:02 localhost systemd[360]: Executing: /bin/dracut-pre-trigger
Sep 30 18:08:02 localhost dracut-pre-trigger[360]: rd.dm=0: removing DM RAID activation
Sep 30 18:08:02 localhost systemd-udevd[358]: starting version 215
Sep 30 18:08:02 localhost dracut-pre-trigger[360]: rd.md.imsm=0: no MD RAID for imsm/isw raids
Sep 30 18:08:03 localhost dracut-pre-trigger[360]: rd.md.ddf=0: no MD RAID for SNIA ddf raids
Sep 30 18:08:03 localhost dracut-pre-trigger[360]: rd.md=0: removing MD RAID activation
Sep 30 18:08:04 localhost kernel: kobject: 'alarmtimer' (00000000930ef220): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'alarmtimer' (00000000930ef220): fill_kobj_path: path = '/devices/platform/alarmtimer'
Sep 30 18:08:04 localhost kernel: kobject: 'uml-blkdev.1' (00000000605a1700): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'uml-blkdev.1' (00000000605a1700): fill_kobj_path: path = '/devices/platform/uml-blkdev.1'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb' (000000008c030480): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb' (000000008c030480): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb1' (0000000093205838): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb1' (0000000093205838): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb1'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb2' (0000000093205638): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb2' (0000000093205638): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb2'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb3' (0000000093205438): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb3' (0000000093205438): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb3'

So here the udev coldplug triggers the kernel kobject_uevent for 'ubdb3'.
I don't understand why the systemd unit doesn't change to PLUGGED here! It should?! Or shouldn't it?

systemd dump:
Sep 30 18:13:44 servername systemd[1]: -> Unit dev-ubdb3.device:
Sep 30 18:13:44 servername systemd[1]: Description: dev-ubdb3.device
Sep 30 18:13:44 servername systemd[1]: Instance: n/a
Sep 30 18:13:44 servername systemd[1]: Unit Load State: loaded
Sep 30 18:13:44 servername systemd[1]: Unit Active State: inactive
Sep 30 18:13:44 servername systemd[1]: Inactive Exit Timestamp: n/a
Sep 30 18:13:44 servername systemd[1]: Active Enter Timestamp: n/a
Sep 30 18:13:44 servername systemd[1]: Active Exit Timestamp: n/a
Sep 30 18:13:44 servername systemd[1]: Inactive Enter Timestamp: n/a
Sep 30 18:13:44 servername systemd[1]: Need Daemon Reload: no
Sep 30 18:13:44 servername systemd[1]: Transient: no
Sep 30 18:13:44 servername systemd[1]: Slice: n/a
Sep 30 18:13:44 servername systemd[1]: CGroup: n/a
Sep 30 18:13:44 servername systemd[1]: CGroup realized: no
Sep 30 18:13:44 servername systemd[1]: CGroup mask: 0x0
Sep 30 18:13:44 servername systemd[1]: CGroup members mask: 0x0
Sep 30 18:13:44 servername systemd[1]: Name: dev-ubdb3.device
Sep 30 18:13:44 servername systemd[1]: DropIn Path: /run/systemd/generator/dev-ubdb3.device.d/timeout.conf
Sep 30 18:13:44 servername systemd[1]: Condition Timestamp: Tue 2014-09-30 18:07:48 UTC
Sep 30 18:13:44 servername systemd[1]: Condition Result: yes
Sep 30 18:13:44 servername systemd[1]: Wants: sysroot.mount
Sep 30 18:13:44 servername systemd[1]: WantedBy: initrd.target
Sep 30 18:13:44 servername systemd[1]: BoundBy: sysroot.mount
Sep 30 18:13:44 servername systemd[1]: BoundBy: systemd-***@dev-ubdb3.service
Sep 30 18:13:44 servername systemd[1]: Before: sysroot.mount
Sep 30 18:13:44 servername systemd[1]: Before: systemd-***@dev-ubdb3.service
Sep 30 18:13:44 servername systemd[1]: Before: initrd.target
Sep 30 18:13:44 servername systemd[1]: ReferencedBy: initrd.target
Sep 30 18:13:44 servername systemd[1]: ReferencedBy: sysroot.mount
Sep 30 18:13:44 servername systemd[1]: ReferencedBy: systemd-***@dev-ubdb3.service
Sep 30 18:13:44 servername systemd[1]: StopWhenUnneeded: no
Sep 30 18:13:44 servername systemd[1]: RefuseManualStart: no
Sep 30 18:13:44 servername systemd[1]: RefuseManualStop: no
Sep 30 18:13:44 servername systemd[1]: DefaultDependencies: yes
Sep 30 18:13:44 servername systemd[1]: OnFailureJobMode: replace
Sep 30 18:13:44 servername systemd[1]: IgnoreOnIsolate: yes
Sep 30 18:13:44 servername systemd[1]: IgnoreOnSnapshot: yes
Sep 30 18:13:44 servername systemd[1]: Device State: dead
Sep 30 18:13:44 servername systemd[1]: Sysfs Path: n/a
Sep 30 18:13:44 servername systemd[1]: -> Job 34:
Sep 30 18:13:44 servername systemd[1]: Action: dev-ubdb3.device -> start
Sep 30 18:13:44 servername systemd[1]: State: running
Sep 30 18:13:44 servername systemd[1]: Forced: no
Sep 30 18:13:44 servername systemd[1]: Irreversible: no

As far as I understand the code the device unit transits to PLUGGED when
a sysfs path is available, but this seems not to be the case here:
Sysfs Path: n/a

kobj ubdb3 (different boot, therefor changed addresses):
p *(struct kobject*) 0x0000000091e15638
$3 = {name = 0x91e13160 "ubdb3",
entry = {next = 0x91e15440, prev = 0x91e15840},
parent = 0x91e17c80,
kset = 0x91c063c0,
ktype = 0x605e81a0 <device_ktype>,
sd = 0x91e1b118,
kref = {refcount = {counter = 4}},
state_initialized = 1,
state_in_sysfs = 1,
state_add_uevent_sent = 1,
state_remove_uevent_sent = 0,
uevent_suppress = 0}

help is appreciated.

with kind regards
thomas
Alexander E. Patrakov
2014-09-30 18:47:08 UTC
Permalink
Post by Thomas Meyer
Post by Richard Weinberger
Post by Thomas Meyer
Hi,
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-008af19d\x2d2562\x2d49bd\x2d8907\x2d721ea08f3e14.device.
# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 11 Sep 29 20:17 008af19d-2562-49bd-8907-721ea08f3e14 -> ../../ubda1
lrwxrwxrwx 1 root root 11 Sep 29 20:17 e2bffa45-d84f-47bc-81ba-e7a395751fa6 -> ../../ubda3
lrwxrwxrwx 1 root root 11 Sep 29 20:17 f452f020-a446-41ed-93c0-ee5ce56d6ea4 -> ../../ubda2
It feels like some event notification is lost in the boot process or something like this?!
What exactly makes the device unit go into the state active/plugged?
This is a boot of the Fedora 21 alpha under user mode linux.
Any ideas what could be wrong here?
Please always CC me and/or the UML mailinglist in case of UML related issues.
I'm very interested in having UML work with systemd.
Okay Richard, will do so in future.
Some more info about the above systemd wait (with
systemd.log_level=debug and DEBUG_KOBJECT)
Sep 30 18:07:58 localhost systemd[1]: Installed new job dev-ubdb3.device/start as 34
Sep 30 18:07:58 localhost systemd[1]: Enqueued job initrd.target/start as 1
Sep 30 18:07:58 localhost systemd[1]: Loaded units and determined initial transaction in 837.189ms.
Sep 30 18:07:58 localhost systemd[1]: Received SIGCHLD from PID 32 (n/a).
Sep 30 18:07:58 localhost systemd[1]: Expecting device dev-ubdb3.device...
Sep 30 18:08:02 localhost systemd[360]: Executing: /bin/dracut-pre-trigger
Sep 30 18:08:02 localhost dracut-pre-trigger[360]: rd.dm=0: removing DM RAID activation
Sep 30 18:08:02 localhost systemd-udevd[358]: starting version 215
Sep 30 18:08:02 localhost dracut-pre-trigger[360]: rd.md.imsm=0: no MD RAID for imsm/isw raids
Sep 30 18:08:03 localhost dracut-pre-trigger[360]: rd.md.ddf=0: no MD RAID for SNIA ddf raids
Sep 30 18:08:03 localhost dracut-pre-trigger[360]: rd.md=0: removing MD RAID activation
Sep 30 18:08:04 localhost kernel: kobject: 'alarmtimer' (00000000930ef220): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'alarmtimer' (00000000930ef220): fill_kobj_path: path = '/devices/platform/alarmtimer'
Sep 30 18:08:04 localhost kernel: kobject: 'uml-blkdev.1' (00000000605a1700): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'uml-blkdev.1' (00000000605a1700): fill_kobj_path: path = '/devices/platform/uml-blkdev.1'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb' (000000008c030480): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb' (000000008c030480): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb1' (0000000093205838): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb1' (0000000093205838): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb1'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb2' (0000000093205638): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb2' (0000000093205638): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb2'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb3' (0000000093205438): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb3' (0000000093205438): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb3'
So here the udev coldplug triggers the kernel kobject_uevent for 'ubdb3'.
I don't understand why the systemd unit doesn't change to PLUGGED here! It should?! Or shouldn't it?
Imho the problem is not specific to UML. Something similar has been
triggered on my desktop PC, and nobody replied:

https://www.mail-archive.com/systemd-***@lists.freedesktop.org/msg22490.html

If this triggers again, I will provide dumps.
--
Alexander E. Patrakov
Andrei Borzenkov
2014-10-04 05:00:47 UTC
Permalink
В Wed, 01 Oct 2014 00:47:08 +0600
Post by Alexander E. Patrakov
Post by Thomas Meyer
Hi,
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-008af19d\x2d2562\x2d49bd\x2d8907\x2d721ea08f3e14.device.
...
Post by Alexander E. Patrakov
Imho the problem is not specific to UML. Something similar has been
If this triggers again, I will provide dumps.
Well, your problem seems to be entirely different. Here device links
are created but systemd does not get notification about them. In your
case device links are missing which usually means something wrong with
udev rules.
Tomasz Torcz
2014-09-30 19:44:59 UTC
Permalink
Post by Thomas Meyer
Post by Thomas Meyer
Hi,
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-008af19d\x2d2562\x2d49bd\x2d8907\x2d721ea08f3e14.device.
What exactly makes the device unit go into the state active/plugged?
This is a boot of the Fedora 21 alpha under user mode linux.
Some more info about the above systemd wait (with
systemd.log_level=debug and DEBUG_KOBJECT)
Sep 30 18:07:58 localhost systemd[1]: Installed new job dev-ubdb3.device/start as 34
Sep 30 18:07:58 localhost systemd[1]: Enqueued job initrd.target/start as 1
Sep 30 18:07:58 localhost systemd[1]: Loaded units and determined initial transaction in 837.189ms.
Sep 30 18:07:58 localhost systemd[1]: Received SIGCHLD from PID 32 (n/a).
Sep 30 18:07:58 localhost systemd[1]: Expecting device dev-ubdb3.device...
Sep 30 18:08:02 localhost systemd[360]: Executing: /bin/dracut-pre-trigger
Sep 30 18:08:02 localhost dracut-pre-trigger[360]: rd.dm=0: removing DM RAID activation
Sep 30 18:08:02 localhost systemd-udevd[358]: starting version 215
Sep 30 18:08:02 localhost dracut-pre-trigger[360]: rd.md.imsm=0: no MD RAID for imsm/isw raids
Sep 30 18:08:03 localhost dracut-pre-trigger[360]: rd.md.ddf=0: no MD RAID for SNIA ddf raids
Sep 30 18:08:03 localhost dracut-pre-trigger[360]: rd.md=0: removing MD RAID activation
Sep 30 18:08:04 localhost kernel: kobject: 'alarmtimer' (00000000930ef220): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'alarmtimer' (00000000930ef220): fill_kobj_path: path = '/devices/platform/alarmtimer'
Sep 30 18:08:04 localhost kernel: kobject: 'uml-blkdev.1' (00000000605a1700): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'uml-blkdev.1' (00000000605a1700): fill_kobj_path: path = '/devices/platform/uml-blkdev.1'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb' (000000008c030480): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb' (000000008c030480): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb1' (0000000093205838): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb1' (0000000093205838): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb1'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb2' (0000000093205638): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb2' (0000000093205638): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb2'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb3' (0000000093205438): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb3' (0000000093205438): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb3'
Check the udev database at this moment. In my understanding, to have device deemed
ready by systemd, two things must happen for device entry:
– TAGS variable must contain ”systemd”
– SYSTEMD_READY must be ”1”

I don't have UML installation handy to check, but maybe there is missing
rule? Rule which is supposed to flip SYSTEMD_READY to ”1”?
Some default devices are tagged in 99-systemd.rules; if UML-specific devs
are missing, please send a patch.
--
Tomasz Torcz "Funeral in the morning, IDE hacking
xmpp: ***@chrome.pl in the afternoon and evening." - Alan Cox
Thomas Meyer
2014-09-30 20:18:04 UTC
Permalink
Post by Tomasz Torcz
Post by Thomas Meyer
Post by Thomas Meyer
Hi,
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-008af19d\x2d2562\x2d49bd\x2d8907\x2d721ea08f3e14.device.
What exactly makes the device unit go into the state active/plugged?
This is a boot of the Fedora 21 alpha under user mode linux.
Some more info about the above systemd wait (with
systemd.log_level=debug and DEBUG_KOBJECT)
Sep 30 18:07:58 localhost systemd[1]: Installed new job dev-ubdb3.device/start as 34
Sep 30 18:07:58 localhost systemd[1]: Enqueued job initrd.target/start as 1
Sep 30 18:07:58 localhost systemd[1]: Loaded units and determined initial transaction in 837.189ms.
Sep 30 18:07:58 localhost systemd[1]: Received SIGCHLD from PID 32 (n/a).
Sep 30 18:07:58 localhost systemd[1]: Expecting device dev-ubdb3.device...
Sep 30 18:08:02 localhost systemd[360]: Executing: /bin/dracut-pre-trigger
Sep 30 18:08:02 localhost dracut-pre-trigger[360]: rd.dm=0: removing DM RAID activation
Sep 30 18:08:02 localhost systemd-udevd[358]: starting version 215
Sep 30 18:08:02 localhost dracut-pre-trigger[360]: rd.md.imsm=0: no MD RAID for imsm/isw raids
Sep 30 18:08:03 localhost dracut-pre-trigger[360]: rd.md.ddf=0: no MD RAID for SNIA ddf raids
Sep 30 18:08:03 localhost dracut-pre-trigger[360]: rd.md=0: removing MD RAID activation
Sep 30 18:08:04 localhost kernel: kobject: 'alarmtimer' (00000000930ef220): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'alarmtimer' (00000000930ef220): fill_kobj_path: path = '/devices/platform/alarmtimer'
Sep 30 18:08:04 localhost kernel: kobject: 'uml-blkdev.1' (00000000605a1700): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'uml-blkdev.1' (00000000605a1700): fill_kobj_path: path = '/devices/platform/uml-blkdev.1'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb' (000000008c030480): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb' (000000008c030480): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb1' (0000000093205838): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb1' (0000000093205838): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb1'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb2' (0000000093205638): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb2' (0000000093205638): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb2'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb3' (0000000093205438): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb3' (0000000093205438): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb3'
Check the udev database at this moment. In my understanding, to have device deemed
– TAGS variable must contain ”systemd”
I think the tag is okay:

# udevadm info -q all -p /devices/platform/uml-blkdev.1/block/ubdb/ubdb3
P: /devices/platform/uml-blkdev.1/block/ubdb/ubdb3
N: ubdb3
S: disk/by-label/ANACONDA
S: disk/by-path/platform-uml-blkdev.1-part3
S: disk/by-uuid/d3f89867-087c-3f26-a261-477750d18179
E: DEVLINKS=/dev/disk/by-label/ANACONDA /dev/disk/by-path/platform-uml-blkdev.1-part3 /dev/disk/by-uuid/d3f89867-087c-3f26-a261-477750d18179
E: DEVNAME=/dev/ubdb3
E: DEVPATH=/devices/platform/uml-blkdev.1/block/ubdb/ubdb3
E: DEVTYPE=partition
E: ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM
E: ID_FS_BOOT_SYSTEM_ID=EL\x20TORITO\x20SPECIFICATION
E: ID_FS_LABEL=ANACONDA
E: ID_FS_LABEL_ENC=ANACONDA
E: ID_FS_SYSTEM_ID=LINUX
E: ID_FS_TYPE=hfsplus
E: ID_FS_USAGE=filesystem
E: ID_FS_UUID=d3f89867-087c-3f26-a261-477750d18179
E: ID_FS_UUID_ENC=d3f89867-087c-3f26-a261-477750d18179
E: ID_FS_VERSION=Joliet Extension
E: ID_PART_ENTRY_DISK=98:16
E: ID_PART_ENTRY_NUMBER=3
E: ID_PART_ENTRY_OFFSET=193456
E: ID_PART_ENTRY_SCHEME=dos
E: ID_PART_ENTRY_SIZE=50656
E: ID_PART_ENTRY_TYPE=0x0
E: ID_PART_ENTRY_UUID=314777b5-03
E: ID_PART_TABLE_TYPE=dos
E: ID_PART_TABLE_UUID=314777b5
E: ID_PATH=platform-uml-blkdev.1
E: ID_PATH_TAG=platform-uml-blkdev_1
E: MAJOR=98
E: MINOR=19
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=29249846

Maybe systemd/udev get's confused by the point in this name?!
uml-blkdev.1
Post by Tomasz Torcz
– SYSTEMD_READY must be ”1”
I don't have UML installation handy to check, but maybe there is missing
rule? Rule which is supposed to flip SYSTEMD_READY to ”1”?
Some default devices are tagged in 99-systemd.rules; if UML-specific devs
are missing, please send a patch.
Andrei Borzenkov
2014-10-01 02:38:41 UTC
Permalink
В Tue, 30 Sep 2014 22:18:04 +0200
Post by Thomas Meyer
Post by Tomasz Torcz
Post by Thomas Meyer
Post by Thomas Meyer
Hi,
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-008af19d\x2d2562\x2d49bd\x2d8907\x2d721ea08f3e14.device.
What exactly makes the device unit go into the state active/plugged?
This is a boot of the Fedora 21 alpha under user mode linux.
Some more info about the above systemd wait (with
systemd.log_level=debug and DEBUG_KOBJECT)
Sep 30 18:07:58 localhost systemd[1]: Installed new job dev-ubdb3.device/start as 34
Sep 30 18:07:58 localhost systemd[1]: Enqueued job initrd.target/start as 1
Sep 30 18:07:58 localhost systemd[1]: Loaded units and determined initial transaction in 837.189ms.
Sep 30 18:07:58 localhost systemd[1]: Received SIGCHLD from PID 32 (n/a).
Sep 30 18:07:58 localhost systemd[1]: Expecting device dev-ubdb3.device...
Sep 30 18:08:02 localhost systemd[360]: Executing: /bin/dracut-pre-trigger
Sep 30 18:08:02 localhost dracut-pre-trigger[360]: rd.dm=0: removing DM RAID activation
Sep 30 18:08:02 localhost systemd-udevd[358]: starting version 215
Sep 30 18:08:02 localhost dracut-pre-trigger[360]: rd.md.imsm=0: no MD RAID for imsm/isw raids
Sep 30 18:08:03 localhost dracut-pre-trigger[360]: rd.md.ddf=0: no MD RAID for SNIA ddf raids
Sep 30 18:08:03 localhost dracut-pre-trigger[360]: rd.md=0: removing MD RAID activation
Sep 30 18:08:04 localhost kernel: kobject: 'alarmtimer' (00000000930ef220): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'alarmtimer' (00000000930ef220): fill_kobj_path: path = '/devices/platform/alarmtimer'
Sep 30 18:08:04 localhost kernel: kobject: 'uml-blkdev.1' (00000000605a1700): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'uml-blkdev.1' (00000000605a1700): fill_kobj_path: path = '/devices/platform/uml-blkdev.1'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb' (000000008c030480): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb' (000000008c030480): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb1' (0000000093205838): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb1' (0000000093205838): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb1'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb2' (0000000093205638): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb2' (0000000093205638): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb2'
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb3' (0000000093205438): kobject_uevent_env
Sep 30 18:08:04 localhost kernel: kobject: 'ubdb3' (0000000093205438): fill_kobj_path: path = '/devices/platform/uml-blkdev.1/block/ubdb/ubdb3'
Check the udev database at this moment. In my understanding, to have device deemed
– TAGS variable must contain ”systemd”
# udevadm info -q all -p /devices/platform/uml-blkdev.1/block/ubdb/ubdb3
P: /devices/platform/uml-blkdev.1/block/ubdb/ubdb3
N: ubdb3
S: disk/by-label/ANACONDA
S: disk/by-path/platform-uml-blkdev.1-part3
S: disk/by-uuid/d3f89867-087c-3f26-a261-477750d18179
E: DEVLINKS=/dev/disk/by-label/ANACONDA /dev/disk/by-path/platform-uml-blkdev.1-part3 /dev/disk/by-uuid/d3f89867-087c-3f26-a261-477750d18179
According to your original post it complaints about device with UUID
008af19d-2562-49bd-8907-721ea08f3e14. Please show information about
*this* device, not some random one.
Post by Thomas Meyer
E: DEVNAME=/dev/ubdb3
E: DEVPATH=/devices/platform/uml-blkdev.1/block/ubdb/ubdb3
E: DEVTYPE=partition
E: ID_FS_APPLICATION_ID=GENISOIMAGE\x20ISO\x209660\x2fHFS\x20FILESYSTEM\x20CREATOR\x20\x28C\x29\x201993\x20E.YOUNGDALE\x20\x28C\x29\x201997-2006\x20J.PEARSON\x2fJ.SCHILLING\x20\x28C\x29\x202006-2007\x20CDRKIT\x20TEAM
E: ID_FS_BOOT_SYSTEM_ID=EL\x20TORITO\x20SPECIFICATION
E: ID_FS_LABEL=ANACONDA
E: ID_FS_LABEL_ENC=ANACONDA
E: ID_FS_SYSTEM_ID=LINUX
E: ID_FS_TYPE=hfsplus
E: ID_FS_USAGE=filesystem
E: ID_FS_UUID=d3f89867-087c-3f26-a261-477750d18179
E: ID_FS_UUID_ENC=d3f89867-087c-3f26-a261-477750d18179
E: ID_FS_VERSION=Joliet Extension
E: ID_PART_ENTRY_DISK=98:16
E: ID_PART_ENTRY_NUMBER=3
E: ID_PART_ENTRY_OFFSET=193456
E: ID_PART_ENTRY_SCHEME=dos
E: ID_PART_ENTRY_SIZE=50656
E: ID_PART_ENTRY_TYPE=0x0
E: ID_PART_ENTRY_UUID=314777b5-03
E: ID_PART_TABLE_TYPE=dos
E: ID_PART_TABLE_UUID=314777b5
E: ID_PATH=platform-uml-blkdev.1
E: ID_PATH_TAG=platform-uml-blkdev_1
E: MAJOR=98
E: MINOR=19
E: SUBSYSTEM=block
E: USEC_INITIALIZED=29249846
Maybe systemd/udev get's confused by the point in this name?!
uml-blkdev.1
Post by Tomasz Torcz
– SYSTEMD_READY must be ”1”
I don't have UML installation handy to check, but maybe there is missing
rule? Rule which is supposed to flip SYSTEMD_READY to ”1”?
Some default devices are tagged in 99-systemd.rules; if UML-specific devs
are missing, please send a patch.
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Timofey Titovets
2014-10-25 21:30:13 UTC
Permalink
Completed TODO: remove multi-seat-x

From 57b2655d2041d2bb2e9b25bef577ead9b27ce6ee Mon Sep 17 00:00:00 2001
From: Timofey Titovets <***@gmail.com>
Date: Sun, 26 Oct 2014 00:17:24 +0300
Subject: [PATCH] login: remove multi-seat-x

---
Makefile.am | 14 ------
TODO | 2 -
configure.ac | 8 ----
src/login/multi-seat-x.c | 108
-----------------------------------------------
4 files changed, 132 deletions(-)
delete mode 100644 src/login/multi-seat-x.c

diff --git a/Makefile.am b/Makefile.am
index fae946a..fc86b45 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5400,20 +5400,6 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.login1.busname

-if ENABLE_MULTI_SEAT_X
-
-systemd_multi_seat_x_SOURCES = \
- src/login/multi-seat-x.c
-
-systemd_multi_seat_x_LDADD = \
- libsystemd-label.la \
- libsystemd-shared.la
-
-rootlibexec_PROGRAMS += \
- systemd-multi-seat-x
-
-endif
-
dist_udevrules_DATA += \
src/login/70-uaccess.rules \
src/login/70-power-switch.rules
diff --git a/TODO b/TODO
index ed00661..195ca55 100644
--- a/TODO
+++ b/TODO
@@ -102,8 +102,6 @@ Features:

* maybe introduce AssertXYZ= similar to ConditionXYZ= that causes a
unit to fail (instead of skipping it) if some condition is not true...

-* remove multi-seat-x now
-
* refcounting in sd-resolve is borked

* exponential backoff in timesyncd and resolved when we cannot reach a
server
diff --git a/configure.ac b/configure.ac
index c3b4ea3..f69eb82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1063,14 +1063,6 @@ fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])

#
------------------------------------------------------------------------------
-have_multi_seat_x=no
-AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x],
[do not build multi-seat-x]))
-if test "x$enable_multi_seat_x" != "xno"; then
- have_multi_seat_x=yes
-fi
-AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
-
-#
------------------------------------------------------------------------------
have_terminal=no
AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable
terminal support]))
if test "x$enable_terminal" = "xyes"; then
diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c
deleted file mode 100644
index 83760d4..0000000
--- a/src/login/multi-seat-x.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
- This file is part of systemd.
-
- Copyright 2011 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#include <string.h>
-#include <unistd.h>
-
-#include "util.h"
-#include "mkdir.h"
-
-int main(int argc, char *argv[]) {
-
- int i;
- const char *seat = NULL;
- char **new_argv;
- _cleanup_free_ char *path = NULL;
- int r;
- _cleanup_fclose_ FILE *f = NULL;
-
- /* This binary will go away as soon as X natively takes the
- * arguments in question as command line parameters, instead
- * of requiring them in the configuration file. */
-
- /* If this file is removed, don't forget to remove the code
- * that invokes this in gdm and other display managers. */
-
- for (i = 1; i < argc; i++)
- if (streq(argv[i], "-seat"))
- seat = argv[i+1];
-
- if (isempty(seat) || streq(seat, "seat0")) {
- argv[0] = (char*) X_SERVER;
- execv(X_SERVER, argv);
- log_error("Failed to execute real X server: %m");
- goto fail;
- }
-
- r = mkdir_safe_label("/run/systemd/multi-session-x", 0755, 0, 0);
- if (r < 0) {
- log_error("Failed to create directory: %s", strerror(-r));
- goto fail;
- }
-
- path = strappend("/run/systemd/multi-session-x/", seat);
- if (!path) {
- log_oom();
- goto fail;
- }
-
- f = fopen(path, "we");
- if (!f) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fprintf(f,
- "Section \"ServerFlags\"\n"
- " Option \"AutoAddDevices\" \"True\"\n"
- " Option \"AllowEmptyInput\" \"True\"\n"
- " Option \"DontVTSwitch\" \"True\"\n"
- "EndSection\n"
- "Section \"InputClass\"\n"
- " Identifier \"Force Input Devices to Seat\"\n"
- " Option \"GrabDevice\" \"True\"\n"
- "EndSection\n");
-
- fflush(f);
-
- if (ferror(f)) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fclose(f);
- f = NULL;
-
- new_argv = newa(char*, argc + 3 + 1);
- memcpy(new_argv, argv, sizeof(char*) * (argc + 2 + 1));
-
- new_argv[0] = (char*) X_SERVER;
- new_argv[argc+0] = (char*) "-config";
- new_argv[argc+1] = path;
- new_argv[argc+2] = (char*) "-sharevts";
- new_argv[argc+3] = NULL;
-
- execv(X_SERVER, new_argv);
- log_error("Failed to execute real X server: %m");
-
-fail:
- return EXIT_FAILURE;
-}
--
2.1.2
Lennart Poettering
2014-10-27 13:00:21 UTC
Permalink
Post by Timofey Titovets
Completed TODO: remove multi-seat-x
Hmm, I don't remember the details of this, did X release a new version
which makes this tool unnecessary? I think they commited code that
made it unnecessary, but did they actually release it?
Post by Timofey Titovets
From 57b2655d2041d2bb2e9b25bef577ead9b27ce6ee Mon Sep 17 00:00:00 2001
Date: Sun, 26 Oct 2014 00:17:24 +0300
Subject: [PATCH] login: remove multi-seat-x
---
Makefile.am | 14 ------
TODO | 2 -
configure.ac | 8 ----
src/login/multi-seat-x.c | 108
-----------------------------------------------
4 files changed, 132 deletions(-)
delete mode 100644 src/login/multi-seat-x.c
diff --git a/Makefile.am b/Makefile.am
index fae946a..fc86b45 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5400,20 +5400,6 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.login1.busname
-if ENABLE_MULTI_SEAT_X
-
-systemd_multi_seat_x_SOURCES = \
- src/login/multi-seat-x.c
-
-systemd_multi_seat_x_LDADD = \
- libsystemd-label.la \
- libsystemd-shared.la
-
-rootlibexec_PROGRAMS += \
- systemd-multi-seat-x
-
-endif
-
dist_udevrules_DATA += \
src/login/70-uaccess.rules \
src/login/70-power-switch.rules
diff --git a/TODO b/TODO
index ed00661..195ca55 100644
--- a/TODO
+++ b/TODO
* maybe introduce AssertXYZ= similar to ConditionXYZ= that causes a unit to
fail (instead of skipping it) if some condition is not true...
-* remove multi-seat-x now
-
* refcounting in sd-resolve is borked
* exponential backoff in timesyncd and resolved when we cannot reach a
server
diff --git a/configure.ac b/configure.ac
index c3b4ea3..f69eb82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1063,14 +1063,6 @@ fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
# ------------------------------------------------------------------------------
-have_multi_seat_x=no
-AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do
not build multi-seat-x]))
-if test "x$enable_multi_seat_x" != "xno"; then
- have_multi_seat_x=yes
-fi
-AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
-
-# ------------------------------------------------------------------------------
have_terminal=no
AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable
terminal support]))
if test "x$enable_terminal" = "xyes"; then
diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c
deleted file mode 100644
index 83760d4..0000000
--- a/src/login/multi-seat-x.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
- This file is part of systemd.
-
- Copyright 2011 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#include <string.h>
-#include <unistd.h>
-
-#include "util.h"
-#include "mkdir.h"
-
-int main(int argc, char *argv[]) {
-
- int i;
- const char *seat = NULL;
- char **new_argv;
- _cleanup_free_ char *path = NULL;
- int r;
- _cleanup_fclose_ FILE *f = NULL;
-
- /* This binary will go away as soon as X natively takes the
- * arguments in question as command line parameters, instead
- * of requiring them in the configuration file. */
-
- /* If this file is removed, don't forget to remove the code
- * that invokes this in gdm and other display managers. */
-
- for (i = 1; i < argc; i++)
- if (streq(argv[i], "-seat"))
- seat = argv[i+1];
-
- if (isempty(seat) || streq(seat, "seat0")) {
- argv[0] = (char*) X_SERVER;
- execv(X_SERVER, argv);
- log_error("Failed to execute real X server: %m");
- goto fail;
- }
-
- r = mkdir_safe_label("/run/systemd/multi-session-x", 0755, 0, 0);
- if (r < 0) {
- log_error("Failed to create directory: %s", strerror(-r));
- goto fail;
- }
-
- path = strappend("/run/systemd/multi-session-x/", seat);
- if (!path) {
- log_oom();
- goto fail;
- }
-
- f = fopen(path, "we");
- if (!f) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fprintf(f,
- "Section \"ServerFlags\"\n"
- " Option \"AutoAddDevices\" \"True\"\n"
- " Option \"AllowEmptyInput\" \"True\"\n"
- " Option \"DontVTSwitch\" \"True\"\n"
- "EndSection\n"
- "Section \"InputClass\"\n"
- " Identifier \"Force Input Devices to Seat\"\n"
- " Option \"GrabDevice\" \"True\"\n"
- "EndSection\n");
-
- fflush(f);
-
- if (ferror(f)) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fclose(f);
- f = NULL;
-
- new_argv = newa(char*, argc + 3 + 1);
- memcpy(new_argv, argv, sizeof(char*) * (argc + 2 + 1));
-
- new_argv[0] = (char*) X_SERVER;
- new_argv[argc+0] = (char*) "-config";
- new_argv[argc+1] = path;
- new_argv[argc+2] = (char*) "-sharevts";
- new_argv[argc+3] = NULL;
-
- execv(X_SERVER, new_argv);
- log_error("Failed to execute real X server: %m");
-
- return EXIT_FAILURE;
-}
--
2.1.2
Post by Timofey Titovets
From 57b2655d2041d2bb2e9b25bef577ead9b27ce6ee Mon Sep 17 00:00:00 2001
Date: Sun, 26 Oct 2014 00:17:24 +0300
Subject: [PATCH] login: remove multi-seat-x
---
Makefile.am | 14 ------
TODO | 2 -
configure.ac | 8 ----
src/login/multi-seat-x.c | 108 -----------------------------------------------
4 files changed, 132 deletions(-)
delete mode 100644 src/login/multi-seat-x.c
diff --git a/Makefile.am b/Makefile.am
index fae946a..fc86b45 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5400,20 +5400,6 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.login1.busname
-if ENABLE_MULTI_SEAT_X
-
-systemd_multi_seat_x_SOURCES = \
- src/login/multi-seat-x.c
-
-systemd_multi_seat_x_LDADD = \
- libsystemd-label.la \
- libsystemd-shared.la
-
-rootlibexec_PROGRAMS += \
- systemd-multi-seat-x
-
-endif
-
dist_udevrules_DATA += \
src/login/70-uaccess.rules \
src/login/70-power-switch.rules
diff --git a/TODO b/TODO
index ed00661..195ca55 100644
--- a/TODO
+++ b/TODO
* maybe introduce AssertXYZ= similar to ConditionXYZ= that causes a unit to fail (instead of skipping it) if some condition is not true...
-* remove multi-seat-x now
-
* refcounting in sd-resolve is borked
* exponential backoff in timesyncd and resolved when we cannot reach a server
diff --git a/configure.ac b/configure.ac
index c3b4ea3..f69eb82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1063,14 +1063,6 @@ fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
# ------------------------------------------------------------------------------
-have_multi_seat_x=no
-AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do not build multi-seat-x]))
-if test "x$enable_multi_seat_x" != "xno"; then
- have_multi_seat_x=yes
-fi
-AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
-
-# ------------------------------------------------------------------------------
have_terminal=no
AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
if test "x$enable_terminal" = "xyes"; then
diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c
deleted file mode 100644
index 83760d4..0000000
--- a/src/login/multi-seat-x.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
- This file is part of systemd.
-
- Copyright 2011 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#include <string.h>
-#include <unistd.h>
-
-#include "util.h"
-#include "mkdir.h"
-
-int main(int argc, char *argv[]) {
-
- int i;
- const char *seat = NULL;
- char **new_argv;
- _cleanup_free_ char *path = NULL;
- int r;
- _cleanup_fclose_ FILE *f = NULL;
-
- /* This binary will go away as soon as X natively takes the
- * arguments in question as command line parameters, instead
- * of requiring them in the configuration file. */
-
- /* If this file is removed, don't forget to remove the code
- * that invokes this in gdm and other display managers. */
-
- for (i = 1; i < argc; i++)
- if (streq(argv[i], "-seat"))
- seat = argv[i+1];
-
- if (isempty(seat) || streq(seat, "seat0")) {
- argv[0] = (char*) X_SERVER;
- execv(X_SERVER, argv);
- log_error("Failed to execute real X server: %m");
- goto fail;
- }
-
- r = mkdir_safe_label("/run/systemd/multi-session-x", 0755, 0, 0);
- if (r < 0) {
- log_error("Failed to create directory: %s", strerror(-r));
- goto fail;
- }
-
- path = strappend("/run/systemd/multi-session-x/", seat);
- if (!path) {
- log_oom();
- goto fail;
- }
-
- f = fopen(path, "we");
- if (!f) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fprintf(f,
- "Section \"ServerFlags\"\n"
- " Option \"AutoAddDevices\" \"True\"\n"
- " Option \"AllowEmptyInput\" \"True\"\n"
- " Option \"DontVTSwitch\" \"True\"\n"
- "EndSection\n"
- "Section \"InputClass\"\n"
- " Identifier \"Force Input Devices to Seat\"\n"
- " Option \"GrabDevice\" \"True\"\n"
- "EndSection\n");
-
- fflush(f);
-
- if (ferror(f)) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fclose(f);
- f = NULL;
-
- new_argv = newa(char*, argc + 3 + 1);
- memcpy(new_argv, argv, sizeof(char*) * (argc + 2 + 1));
-
- new_argv[0] = (char*) X_SERVER;
- new_argv[argc+0] = (char*) "-config";
- new_argv[argc+1] = path;
- new_argv[argc+2] = (char*) "-sharevts";
- new_argv[argc+3] = NULL;
-
- execv(X_SERVER, new_argv);
- log_error("Failed to execute real X server: %m");
-
- return EXIT_FAILURE;
-}
--
2.1.2
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Lennart
--
Lennart Poettering, Red Hat
Timofey Titovets
2014-10-27 13:23:06 UTC
Permalink
Post by Lennart Poettering
Post by Timofey Titovets
Completed TODO: remove multi-seat-x
Hmm, I don't remember the details of this, did X release a new version
which makes this tool unnecessary? I think they commited code that
made it unnecessary, but did they actually release it?
As i find: gdm uses it.
Systemd, internal, as i see, not use it.
May be i miss something.
Post by Lennart Poettering
Post by Timofey Titovets
From 57b2655d2041d2bb2e9b25bef577ead9b27ce6ee Mon Sep 17 00:00:00 2001
Date: Sun, 26 Oct 2014 00:17:24 +0300
Subject: [PATCH] login: remove multi-seat-x
---
Makefile.am | 14 ------
TODO | 2 -
configure.ac | 8 ----
src/login/multi-seat-x.c | 108
-----------------------------------------------
4 files changed, 132 deletions(-)
delete mode 100644 src/login/multi-seat-x.c
diff --git a/Makefile.am b/Makefile.am
index fae946a..fc86b45 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5400,20 +5400,6 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.login1.busname
-if ENABLE_MULTI_SEAT_X
-
-systemd_multi_seat_x_SOURCES = \
- src/login/multi-seat-x.c
-
-systemd_multi_seat_x_LDADD = \
- libsystemd-label.la \
- libsystemd-shared.la
-
-rootlibexec_PROGRAMS += \
- systemd-multi-seat-x
-
-endif
-
dist_udevrules_DATA += \
src/login/70-uaccess.rules \
src/login/70-power-switch.rules
diff --git a/TODO b/TODO
index ed00661..195ca55 100644
--- a/TODO
+++ b/TODO
* maybe introduce AssertXYZ= similar to ConditionXYZ= that causes a unit to
fail (instead of skipping it) if some condition is not true...
-* remove multi-seat-x now
-
* refcounting in sd-resolve is borked
* exponential backoff in timesyncd and resolved when we cannot reach a server
diff --git a/configure.ac b/configure.ac
index c3b4ea3..f69eb82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1063,14 +1063,6 @@ fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
# ------------------------------------------------------------------------------
-have_multi_seat_x=no
-AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do
not build multi-seat-x]))
-if test "x$enable_multi_seat_x" != "xno"; then
- have_multi_seat_x=yes
-fi
-AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
-
-# ------------------------------------------------------------------------------
have_terminal=no
AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
if test "x$enable_terminal" = "xyes"; then
diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c
deleted file mode 100644
index 83760d4..0000000
--- a/src/login/multi-seat-x.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
- This file is part of systemd.
-
- Copyright 2011 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#include <string.h>
-#include <unistd.h>
-
-#include "util.h"
-#include "mkdir.h"
-
-int main(int argc, char *argv[]) {
-
- int i;
- const char *seat = NULL;
- char **new_argv;
- _cleanup_free_ char *path = NULL;
- int r;
- _cleanup_fclose_ FILE *f = NULL;
-
- /* This binary will go away as soon as X natively takes the
- * arguments in question as command line parameters, instead
- * of requiring them in the configuration file. */
-
- /* If this file is removed, don't forget to remove the code
- * that invokes this in gdm and other display managers. */
-
- for (i = 1; i < argc; i++)
- if (streq(argv[i], "-seat"))
- seat = argv[i+1];
-
- if (isempty(seat) || streq(seat, "seat0")) {
- argv[0] = (char*) X_SERVER;
- execv(X_SERVER, argv);
- log_error("Failed to execute real X server: %m");
- goto fail;
- }
-
- r = mkdir_safe_label("/run/systemd/multi-session-x", 0755, 0, 0);
- if (r < 0) {
- log_error("Failed to create directory: %s", strerror(-r));
- goto fail;
- }
-
- path = strappend("/run/systemd/multi-session-x/", seat);
- if (!path) {
- log_oom();
- goto fail;
- }
-
- f = fopen(path, "we");
- if (!f) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fprintf(f,
- "Section \"ServerFlags\"\n"
- " Option \"AutoAddDevices\" \"True\"\n"
- " Option \"AllowEmptyInput\" \"True\"\n"
- " Option \"DontVTSwitch\" \"True\"\n"
- "EndSection\n"
- "Section \"InputClass\"\n"
- " Identifier \"Force Input Devices to Seat\"\n"
- " Option \"GrabDevice\" \"True\"\n"
- "EndSection\n");
-
- fflush(f);
-
- if (ferror(f)) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fclose(f);
- f = NULL;
-
- new_argv = newa(char*, argc + 3 + 1);
- memcpy(new_argv, argv, sizeof(char*) * (argc + 2 + 1));
-
- new_argv[0] = (char*) X_SERVER;
- new_argv[argc+0] = (char*) "-config";
- new_argv[argc+1] = path;
- new_argv[argc+2] = (char*) "-sharevts";
- new_argv[argc+3] = NULL;
-
- execv(X_SERVER, new_argv);
- log_error("Failed to execute real X server: %m");
-
- return EXIT_FAILURE;
-}
--
2.1.2
Post by Timofey Titovets
From 57b2655d2041d2bb2e9b25bef577ead9b27ce6ee Mon Sep 17 00:00:00 2001
Date: Sun, 26 Oct 2014 00:17:24 +0300
Subject: [PATCH] login: remove multi-seat-x
---
Makefile.am | 14 ------
TODO | 2 -
configure.ac | 8 ----
src/login/multi-seat-x.c | 108 -----------------------------------------------
4 files changed, 132 deletions(-)
delete mode 100644 src/login/multi-seat-x.c
diff --git a/Makefile.am b/Makefile.am
index fae946a..fc86b45 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5400,20 +5400,6 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.login1.busname
-if ENABLE_MULTI_SEAT_X
-
-systemd_multi_seat_x_SOURCES = \
- src/login/multi-seat-x.c
-
-systemd_multi_seat_x_LDADD = \
- libsystemd-label.la \
- libsystemd-shared.la
-
-rootlibexec_PROGRAMS += \
- systemd-multi-seat-x
-
-endif
-
dist_udevrules_DATA += \
src/login/70-uaccess.rules \
src/login/70-power-switch.rules
diff --git a/TODO b/TODO
index ed00661..195ca55 100644
--- a/TODO
+++ b/TODO
* maybe introduce AssertXYZ= similar to ConditionXYZ= that causes a unit to fail (instead of skipping it) if some condition is not true...
-* remove multi-seat-x now
-
* refcounting in sd-resolve is borked
* exponential backoff in timesyncd and resolved when we cannot reach a server
diff --git a/configure.ac b/configure.ac
index c3b4ea3..f69eb82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1063,14 +1063,6 @@ fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
# ------------------------------------------------------------------------------
-have_multi_seat_x=no
-AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do not build multi-seat-x]))
-if test "x$enable_multi_seat_x" != "xno"; then
- have_multi_seat_x=yes
-fi
-AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
-
-# ------------------------------------------------------------------------------
have_terminal=no
AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
if test "x$enable_terminal" = "xyes"; then
diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c
deleted file mode 100644
index 83760d4..0000000
--- a/src/login/multi-seat-x.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
- This file is part of systemd.
-
- Copyright 2011 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#include <string.h>
-#include <unistd.h>
-
-#include "util.h"
-#include "mkdir.h"
-
-int main(int argc, char *argv[]) {
-
- int i;
- const char *seat = NULL;
- char **new_argv;
- _cleanup_free_ char *path = NULL;
- int r;
- _cleanup_fclose_ FILE *f = NULL;
-
- /* This binary will go away as soon as X natively takes the
- * arguments in question as command line parameters, instead
- * of requiring them in the configuration file. */
-
- /* If this file is removed, don't forget to remove the code
- * that invokes this in gdm and other display managers. */
-
- for (i = 1; i < argc; i++)
- if (streq(argv[i], "-seat"))
- seat = argv[i+1];
-
- if (isempty(seat) || streq(seat, "seat0")) {
- argv[0] = (char*) X_SERVER;
- execv(X_SERVER, argv);
- log_error("Failed to execute real X server: %m");
- goto fail;
- }
-
- r = mkdir_safe_label("/run/systemd/multi-session-x", 0755, 0, 0);
- if (r < 0) {
- log_error("Failed to create directory: %s", strerror(-r));
- goto fail;
- }
-
- path = strappend("/run/systemd/multi-session-x/", seat);
- if (!path) {
- log_oom();
- goto fail;
- }
-
- f = fopen(path, "we");
- if (!f) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fprintf(f,
- "Section \"ServerFlags\"\n"
- " Option \"AutoAddDevices\" \"True\"\n"
- " Option \"AllowEmptyInput\" \"True\"\n"
- " Option \"DontVTSwitch\" \"True\"\n"
- "EndSection\n"
- "Section \"InputClass\"\n"
- " Identifier \"Force Input Devices to Seat\"\n"
- " Option \"GrabDevice\" \"True\"\n"
- "EndSection\n");
-
- fflush(f);
-
- if (ferror(f)) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fclose(f);
- f = NULL;
-
- new_argv = newa(char*, argc + 3 + 1);
- memcpy(new_argv, argv, sizeof(char*) * (argc + 2 + 1));
-
- new_argv[0] = (char*) X_SERVER;
- new_argv[argc+0] = (char*) "-config";
- new_argv[argc+1] = path;
- new_argv[argc+2] = (char*) "-sharevts";
- new_argv[argc+3] = NULL;
-
- execv(X_SERVER, new_argv);
- log_error("Failed to execute real X server: %m");
-
- return EXIT_FAILURE;
-}
--
2.1.2
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Lennart
--
Lennart Poettering, Red Hat
--
Have a nice day,
Timofey.
Lennart Poettering
2014-10-27 13:58:17 UTC
Permalink
Post by Timofey Titovets
Post by Lennart Poettering
Post by Timofey Titovets
Completed TODO: remove multi-seat-x
Hmm, I don't remember the details of this, did X release a new version
which makes this tool unnecessary? I think they commited code that
made it unnecessary, but did they actually release it?
As i find: gdm uses it.
Well, the original patch for gdm I did first tried multi-user-x if it
was around, and then fell back to X itself. Thus, we can safely get
rid of multi-user-x without breaking gdm. However, we should do so
only after verifying that the per-seat magic that multi-user-x did is
now correctly and fully done by X itself.

Lennart
--
Lennart Poettering, Red Hat
Laércio de Sousa
2014-10-27 18:00:36 UTC
Permalink
Lennart,

I've told you some time ago that Xorg-server since release 1.16 no longer
requires multi-seat-x wrapper.
Post by Lennart Poettering
Post by Timofey Titovets
Completed TODO: remove multi-seat-x
Hmm, I don't remember the details of this, did X release a new version
which makes this tool unnecessary? I think they commited code that
made it unnecessary, but did they actually release it?
Post by Timofey Titovets
From 57b2655d2041d2bb2e9b25bef577ead9b27ce6ee Mon Sep 17 00:00:00 2001
Date: Sun, 26 Oct 2014 00:17:24 +0300
Subject: [PATCH] login: remove multi-seat-x
---
Makefile.am | 14 ------
TODO | 2 -
configure.ac | 8 ----
src/login/multi-seat-x.c | 108
-----------------------------------------------
4 files changed, 132 deletions(-)
delete mode 100644 src/login/multi-seat-x.c
diff --git a/Makefile.am b/Makefile.am
index fae946a..fc86b45 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5400,20 +5400,6 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.login1.busname
-if ENABLE_MULTI_SEAT_X
-
-systemd_multi_seat_x_SOURCES = \
- src/login/multi-seat-x.c
-
-systemd_multi_seat_x_LDADD = \
- libsystemd-label.la \
- libsystemd-shared.la
-
-rootlibexec_PROGRAMS += \
- systemd-multi-seat-x
-
-endif
-
dist_udevrules_DATA += \
src/login/70-uaccess.rules \
src/login/70-power-switch.rules
diff --git a/TODO b/TODO
index ed00661..195ca55 100644
--- a/TODO
+++ b/TODO
* maybe introduce AssertXYZ= similar to ConditionXYZ= that causes a
unit to
Post by Timofey Titovets
fail (instead of skipping it) if some condition is not true...
-* remove multi-seat-x now
-
* refcounting in sd-resolve is borked
* exponential backoff in timesyncd and resolved when we cannot reach a server
diff --git a/configure.ac b/configure.ac
index c3b4ea3..f69eb82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1063,14 +1063,6 @@ fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
#
------------------------------------------------------------------------------
Post by Timofey Titovets
-have_multi_seat_x=no
-AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do
not build multi-seat-x]))
-if test "x$enable_multi_seat_x" != "xno"; then
- have_multi_seat_x=yes
-fi
-AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
-
-#
------------------------------------------------------------------------------
Post by Timofey Titovets
have_terminal=no
AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable
terminal support]))
if test "x$enable_terminal" = "xyes"; then
diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c
deleted file mode 100644
index 83760d4..0000000
--- a/src/login/multi-seat-x.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
- This file is part of systemd.
-
- Copyright 2011 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published
by
Post by Timofey Titovets
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
License
Post by Timofey Titovets
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#include <string.h>
-#include <unistd.h>
-
-#include "util.h"
-#include "mkdir.h"
-
-int main(int argc, char *argv[]) {
-
- int i;
- const char *seat = NULL;
- char **new_argv;
- _cleanup_free_ char *path = NULL;
- int r;
- _cleanup_fclose_ FILE *f = NULL;
-
- /* This binary will go away as soon as X natively takes the
- * arguments in question as command line parameters, instead
- * of requiring them in the configuration file. */
-
- /* If this file is removed, don't forget to remove the code
- * that invokes this in gdm and other display managers. */
-
- for (i = 1; i < argc; i++)
- if (streq(argv[i], "-seat"))
- seat = argv[i+1];
-
- if (isempty(seat) || streq(seat, "seat0")) {
- argv[0] = (char*) X_SERVER;
- execv(X_SERVER, argv);
- log_error("Failed to execute real X server: %m");
- goto fail;
- }
-
- r = mkdir_safe_label("/run/systemd/multi-session-x", 0755, 0,
0);
Post by Timofey Titovets
- if (r < 0) {
- log_error("Failed to create directory: %s",
strerror(-r));
Post by Timofey Titovets
- goto fail;
- }
-
- path = strappend("/run/systemd/multi-session-x/", seat);
- if (!path) {
- log_oom();
- goto fail;
- }
-
- f = fopen(path, "we");
- if (!f) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fprintf(f,
- "Section \"ServerFlags\"\n"
- " Option \"AutoAddDevices\" \"True\"\n"
- " Option \"AllowEmptyInput\" \"True\"\n"
- " Option \"DontVTSwitch\" \"True\"\n"
- "EndSection\n"
- "Section \"InputClass\"\n"
- " Identifier \"Force Input Devices to Seat\"\n"
- " Option \"GrabDevice\" \"True\"\n"
- "EndSection\n");
-
- fflush(f);
-
- if (ferror(f)) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fclose(f);
- f = NULL;
-
- new_argv = newa(char*, argc + 3 + 1);
- memcpy(new_argv, argv, sizeof(char*) * (argc + 2 + 1));
-
- new_argv[0] = (char*) X_SERVER;
- new_argv[argc+0] = (char*) "-config";
- new_argv[argc+1] = path;
- new_argv[argc+2] = (char*) "-sharevts";
- new_argv[argc+3] = NULL;
-
- execv(X_SERVER, new_argv);
- log_error("Failed to execute real X server: %m");
-
- return EXIT_FAILURE;
-}
--
2.1.2
Post by Timofey Titovets
From 57b2655d2041d2bb2e9b25bef577ead9b27ce6ee Mon Sep 17 00:00:00 2001
Date: Sun, 26 Oct 2014 00:17:24 +0300
Subject: [PATCH] login: remove multi-seat-x
---
Makefile.am | 14 ------
TODO | 2 -
configure.ac | 8 ----
src/login/multi-seat-x.c | 108
-----------------------------------------------
Post by Timofey Titovets
4 files changed, 132 deletions(-)
delete mode 100644 src/login/multi-seat-x.c
diff --git a/Makefile.am b/Makefile.am
index fae946a..fc86b45 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5400,20 +5400,6 @@ SYSTEM_UNIT_ALIASES += \
BUSNAMES_TARGET_WANTS += \
org.freedesktop.login1.busname
-if ENABLE_MULTI_SEAT_X
-
-systemd_multi_seat_x_SOURCES = \
- src/login/multi-seat-x.c
-
-systemd_multi_seat_x_LDADD = \
- libsystemd-label.la \
- libsystemd-shared.la
-
-rootlibexec_PROGRAMS += \
- systemd-multi-seat-x
-
-endif
-
dist_udevrules_DATA += \
src/login/70-uaccess.rules \
src/login/70-power-switch.rules
diff --git a/TODO b/TODO
index ed00661..195ca55 100644
--- a/TODO
+++ b/TODO
* maybe introduce AssertXYZ= similar to ConditionXYZ= that causes a
unit to fail (instead of skipping it) if some condition is not true...
Post by Timofey Titovets
-* remove multi-seat-x now
-
* refcounting in sd-resolve is borked
* exponential backoff in timesyncd and resolved when we cannot reach a
server
Post by Timofey Titovets
diff --git a/configure.ac b/configure.ac
index c3b4ea3..f69eb82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1063,14 +1063,6 @@ fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
#
------------------------------------------------------------------------------
Post by Timofey Titovets
-have_multi_seat_x=no
-AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x],
[do not build multi-seat-x]))
Post by Timofey Titovets
-if test "x$enable_multi_seat_x" != "xno"; then
- have_multi_seat_x=yes
-fi
-AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
-
-#
------------------------------------------------------------------------------
Post by Timofey Titovets
have_terminal=no
AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable
terminal support]))
Post by Timofey Titovets
if test "x$enable_terminal" = "xyes"; then
diff --git a/src/login/multi-seat-x.c b/src/login/multi-seat-x.c
deleted file mode 100644
index 83760d4..0000000
--- a/src/login/multi-seat-x.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
- This file is part of systemd.
-
- Copyright 2011 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published
by
Post by Timofey Titovets
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
License
Post by Timofey Titovets
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#include <string.h>
-#include <unistd.h>
-
-#include "util.h"
-#include "mkdir.h"
-
-int main(int argc, char *argv[]) {
-
- int i;
- const char *seat = NULL;
- char **new_argv;
- _cleanup_free_ char *path = NULL;
- int r;
- _cleanup_fclose_ FILE *f = NULL;
-
- /* This binary will go away as soon as X natively takes the
- * arguments in question as command line parameters, instead
- * of requiring them in the configuration file. */
-
- /* If this file is removed, don't forget to remove the code
- * that invokes this in gdm and other display managers. */
-
- for (i = 1; i < argc; i++)
- if (streq(argv[i], "-seat"))
- seat = argv[i+1];
-
- if (isempty(seat) || streq(seat, "seat0")) {
- argv[0] = (char*) X_SERVER;
- execv(X_SERVER, argv);
- log_error("Failed to execute real X server: %m");
- goto fail;
- }
-
- r = mkdir_safe_label("/run/systemd/multi-session-x", 0755, 0,
0);
Post by Timofey Titovets
- if (r < 0) {
- log_error("Failed to create directory: %s",
strerror(-r));
Post by Timofey Titovets
- goto fail;
- }
-
- path = strappend("/run/systemd/multi-session-x/", seat);
- if (!path) {
- log_oom();
- goto fail;
- }
-
- f = fopen(path, "we");
- if (!f) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fprintf(f,
- "Section \"ServerFlags\"\n"
- " Option \"AutoAddDevices\" \"True\"\n"
- " Option \"AllowEmptyInput\" \"True\"\n"
- " Option \"DontVTSwitch\" \"True\"\n"
- "EndSection\n"
- "Section \"InputClass\"\n"
- " Identifier \"Force Input Devices to Seat\"\n"
- " Option \"GrabDevice\" \"True\"\n"
- "EndSection\n");
-
- fflush(f);
-
- if (ferror(f)) {
- log_error("Failed to write configuration file: %m");
- goto fail;
- }
-
- fclose(f);
- f = NULL;
-
- new_argv = newa(char*, argc + 3 + 1);
- memcpy(new_argv, argv, sizeof(char*) * (argc + 2 + 1));
-
- new_argv[0] = (char*) X_SERVER;
- new_argv[argc+0] = (char*) "-config";
- new_argv[argc+1] = path;
- new_argv[argc+2] = (char*) "-sharevts";
- new_argv[argc+3] = NULL;
-
- execv(X_SERVER, new_argv);
- log_error("Failed to execute real X server: %m");
-
- return EXIT_FAILURE;
-}
--
2.1.2
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Lennart
--
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Lennart Poettering
2014-10-27 18:05:55 UTC
Permalink
Post by Laércio de Sousa
Lennart,
I've told you some time ago that Xorg-server since release 1.16 no longer
requires multi-seat-x wrapper.
Ah, OK!

Hmm, can't get the patch to apply though, seems corrupted by the
mailer. Timofey, can you resend the patch please, without line-breaks?
It's OK to attach the git-format-patch formatted to an email, if your
mailer corrupts the patch when you send it inline!

Lennart
--
Lennart Poettering, Red Hat
Timofey Titovets
2014-10-27 20:10:53 UTC
Permalink
Post by Lennart Poettering
Post by Laércio de Sousa
Lennart,
I've told you some time ago that Xorg-server since release 1.16 no longer
requires multi-seat-x wrapper.
Ah, OK!
Hmm, can't get the patch to apply though, seems corrupted by the
mailer. Timofey, can you resend the patch please, without line-breaks?
It's OK to attach the git-format-patch formatted to an email, if your
mailer corrupts the patch when you send it inline!
Lennart
--
Lennart Poettering, Red Hat
I attached it to the first message, well, this is not a problem, i
attach it again (below). =]
--
Have a nice day,
Timofey.
Lennart Poettering
2014-10-28 01:25:35 UTC
Permalink
Post by Timofey Titovets
Post by Lennart Poettering
Post by Laércio de Sousa
Lennart,
I've told you some time ago that Xorg-server since release 1.16 no longer
requires multi-seat-x wrapper.
Ah, OK!
Hmm, can't get the patch to apply though, seems corrupted by the
mailer. Timofey, can you resend the patch please, without line-breaks?
It's OK to attach the git-format-patch formatted to an email, if your
mailer corrupts the patch when you send it inline!
Lennart
--
Lennart Poettering, Red Hat
I attached it to the first message, well, this is not a problem, i
attach it again (below). =]
OK, worked fine this time. Applied! Thanks!

Lennart
--
Lennart Poettering, Red Hat
Timofey Titovets
2014-10-28 00:30:13 UTC
Permalink
Good time of day, list.
I try to fix "Fixme" in svg.c:
/* FIXME: this works only in the simple case */

By default function try to get root=/dev/*
I write small function to determine block device name by specified
LABEL, UUID, PARTUUID.

Please check code, its working, but i think it can look more pretty.
May be i missed(reimplemented) some internal functional of systemd?

I also attach patch to email. Thanks.

From 896ef1c040a6395375e3adcd230bf2b766db633c Mon Sep 17 00:00:00 2001
From: Timofey Titovets <***@gmail.com>
Date: Tue, 28 Oct 2014 03:17:40 +0300
Subject: [PATCH] Bootchart: allow parse LABEL, UUID, PARTUUID for svg info

---
src/bootchart/svg.c | 58
+++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 54 insertions(+), 4 deletions(-)

diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index faf377e..a074b71 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -32,6 +32,7 @@
#include <sys/utsname.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <dirent.h>

#include "util.h"
#include "macro.h"
@@ -151,6 +152,57 @@ static void svg_header(void) {
svg(" ]]>\n </style>\n</defs>\n\n");
}

+static void get_root_disk(const char *cmdline, char *rootbdev) {
+ char *ptr = strstr(cmdline, "root=");
+ char path[PATH_MAX]="";
+ char dev_path[PATH_MAX]="";
+ DIR *d;
+ struct dirent *dir;
+
+ if (!ptr)
+ goto out;
+
+ ptr = &ptr[5];
+ if (ptr[0] == '/') {
+ ptr = &ptr[5];
+ strncpy(rootbdev, ptr, 3);
+ rootbdev[3] = '\0';
+ return;
+ }
+
+ d = opendir("/dev/disk/");
+ if (!d)
+ goto out;
+
+ if (!strncmp("LABEL", ptr, 5))
+ strncpy(path, "/dev/disk/by-label/", 30);
+ else if (!strncmp("UUID", ptr, 4))
+ strncpy(path, "/dev/disk/by-uuid/", 30);
+ else if (!strncmp("PARTUUID", ptr, 8))
+ strncpy(path, "/dev/disk/by-partuuid/", 30);
+
+ ptr = strstr(ptr, "=");
+ ptr++;
+ ptr = strtok(ptr," ");
+
+ d = opendir(path);
+
+ while ((dir = readdir(d)) != NULL) {
+ if (!strncmp(dir->d_name, ptr, 32)) {
+ break;
+ }
+ }
+
+ strcat(path, ptr);
+ readlink (path, dev_path, sizeof(dev_path));
+ ptr = &dev_path[6];
+ strncpy(rootbdev, ptr, 3);
+ rootbdev[3] = '\0';
+
+out:
+ closedir(d);
+}
+
static void svg_title(const char *build) {
char cmdline[256] = "";
char filename[PATH_MAX];
@@ -175,11 +227,9 @@ static void svg_title(const char *build) {
}

/* extract root fs so we can find disk model name in sysfs */
- /* FIXME: this works only in the simple case */
- c = strstr(cmdline, "root=/dev/");
+ c = strstr(cmdline, "root=");
if (c) {
- strncpy(rootbdev, &c[10], 3);
- rootbdev[3] = '\0';
+ get_root_disk(cmdline, rootbdev);
sprintf(filename, "block/%s/device/model", rootbdev);
fd = openat(sysfd, filename, O_RDONLY);
f = fdopen(fd, "r");
--
2.1.2
Ivan Shapovalov
2014-10-28 00:45:35 UTC
Permalink
Post by Timofey Titovets
Good time of day, list.
/* FIXME: this works only in the simple case */
By default function try to get root=/dev/*
I write small function to determine block device name by specified
LABEL, UUID, PARTUUID.
Please check code, its working, but i think it can look more pretty.
May be i missed(reimplemented) some internal functional of systemd?
[...]
Hi,

there is at least function fstab_node_to_udev_node() in shared/util.c
which converts "TAG=value" to "/dev/disk/by-tag/value",
and also function canonicalize_file_name() in glibc which resolves
symlinks and (hopefully) returns "/dev/sdXY".

I'm not the one to judge, but your code seems pretty messy, esp. with
extensive use of "magic" constants and numbers...
--
Ivan Shapovalov / intelfx /
Timofey Titovets
2014-10-28 04:51:10 UTC
Permalink
Post by Ivan Shapovalov
Post by Timofey Titovets
Good time of day, list.
/* FIXME: this works only in the simple case */
By default function try to get root=/dev/*
I write small function to determine block device name by specified
LABEL, UUID, PARTUUID.
Please check code, its working, but i think it can look more pretty.
May be i missed(reimplemented) some internal functional of systemd?
[...]
Hi,
there is at least function fstab_node_to_udev_node() in shared/util.c
which converts "TAG=value" to "/dev/disk/by-tag/value",
and also function canonicalize_file_name() in glibc which resolves
symlinks and (hopefully) returns "/dev/sdXY".
I'm not the one to judge, but your code seems pretty messy, esp. with
extensive use of "magic" constants and numbers...
Thanks a lot, now it looks more pretty :3.
I will resend patch.
Timofey Titovets
2014-10-28 04:56:32 UTC
Permalink
Good time of day, list.
I try to fix "Fixme" in svg.c:
/* FIXME: this works only in the simple case */

By default function try to get only root=/dev/*

I also attach patch. Thanks.

v2:
Rewrited with use fstab_node_to_udev_node() and
canonicalize_file_name() functions.

From 4d14e78977df92e010ea488f97acd6a5e8e30e97 Mon Sep 17 00:00:00 2001
From: Timofey Titovets <***@gmail.com>
Date: Tue, 28 Oct 2014 07:42:26 +0300
Subject: [PATCH] Bootchart: allow parse LABEL, UUID, PARTUUID for svg info

---
src/bootchart/svg.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index faf377e..81d3da9 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -151,6 +151,24 @@ static void svg_header(void) {
svg(" ]]>\n </style>\n</defs>\n\n");
}

+static void get_root_disk(const char *cmdline, char *rootbdev) {
+ char *ptr = strstr(cmdline, "root=");
+
+ if (!ptr)
+ return;
+
+ ptr = &ptr[5];
+ ptr = strtok(ptr," ");
+
+ if (ptr[0] != '/') {
+ ptr = fstab_node_to_udev_node(ptr);
+ ptr = canonicalize_file_name(ptr);
+ }
+
+ strncpy(rootbdev, &ptr[5], 3);
+ rootbdev[3] = '\0';
+}
+
static void svg_title(const char *build) {
char cmdline[256] = "";
char filename[PATH_MAX];
@@ -175,11 +193,9 @@ static void svg_title(const char *build) {
}

/* extract root fs so we can find disk model name in sysfs */
- /* FIXME: this works only in the simple case */
- c = strstr(cmdline, "root=/dev/");
+ c = strstr(cmdline, "root=");
if (c) {
- strncpy(rootbdev, &c[10], 3);
- rootbdev[3] = '\0';
+ get_root_disk(cmdline, rootbdev);
sprintf(filename, "block/%s/device/model", rootbdev);
fd = openat(sysfd, filename, O_RDONLY);
f = fdopen(fd, "r");
--
2.1.2
Zbigniew Jędrzejewski-Szmek
2014-10-28 12:37:51 UTC
Permalink
Post by Timofey Titovets
Good time of day, list.
/* FIXME: this works only in the simple case */
By default function try to get only root=/dev/*
I also attach patch. Thanks.
Rewrited with use fstab_node_to_udev_node() and
canonicalize_file_name() functions.
There's infrastracture to do this properly: see
parse_proc_cmdline_item, e.g. in cryptsetup-generator.c.

Nevertheless, I'm wondering if this couldn't be done better by checking
what is mounted on /. Seems that it would work in more cases.

Zbyszek
Post by Timofey Titovets
From 4d14e78977df92e010ea488f97acd6a5e8e30e97 Mon Sep 17 00:00:00 2001
Date: Tue, 28 Oct 2014 07:42:26 +0300
Subject: [PATCH] Bootchart: allow parse LABEL, UUID, PARTUUID for svg info
---
src/bootchart/svg.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index faf377e..81d3da9 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -151,6 +151,24 @@ static void svg_header(void) {
svg(" ]]>\n </style>\n</defs>\n\n");
}
+static void get_root_disk(const char *cmdline, char *rootbdev) {
+ char *ptr = strstr(cmdline, "root=");
+
+ if (!ptr)
+ return;
+
+ ptr = &ptr[5];
+ ptr = strtok(ptr," ");
+
+ if (ptr[0] != '/') {
+ ptr = fstab_node_to_udev_node(ptr);
+ ptr = canonicalize_file_name(ptr);
+ }
+
+ strncpy(rootbdev, &ptr[5], 3);
+ rootbdev[3] = '\0';
+}
+
static void svg_title(const char *build) {
char cmdline[256] = "";
char filename[PATH_MAX];
@@ -175,11 +193,9 @@ static void svg_title(const char *build) {
}
/* extract root fs so we can find disk model name in sysfs */
- /* FIXME: this works only in the simple case */
- c = strstr(cmdline, "root=/dev/");
+ c = strstr(cmdline, "root=");
if (c) {
- strncpy(rootbdev, &c[10], 3);
- rootbdev[3] = '\0';
+ get_root_disk(cmdline, rootbdev);
sprintf(filename, "block/%s/device/model", rootbdev);
fd = openat(sysfd, filename, O_RDONLY);
f = fdopen(fd, "r");
--
2.1.2
From 4d14e78977df92e010ea488f97acd6a5e8e30e97 Mon Sep 17 00:00:00 2001
Date: Tue, 28 Oct 2014 07:42:26 +0300
Subject: [PATCH] Bootchart: allow parse LABEL, UUID, PARTUUID for svg info
---
src/bootchart/svg.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index faf377e..81d3da9 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -151,6 +151,24 @@ static void svg_header(void) {
svg(" ]]>\n </style>\n</defs>\n\n");
}
+static void get_root_disk(const char *cmdline, char *rootbdev) {
+ char *ptr = strstr(cmdline, "root=");
+
+ if (!ptr)
+ return;
+
+ ptr = &ptr[5];
+ ptr = strtok(ptr," ");
+
+ if (ptr[0] != '/') {
+ ptr = fstab_node_to_udev_node(ptr);
+ ptr = canonicalize_file_name(ptr);
+ }
+
+ strncpy(rootbdev, &ptr[5], 3);
+ rootbdev[3] = '\0';
+}
+
static void svg_title(const char *build) {
char cmdline[256] = "";
char filename[PATH_MAX];
@@ -175,11 +193,9 @@ static void svg_title(const char *build) {
}
/* extract root fs so we can find disk model name in sysfs */
- /* FIXME: this works only in the simple case */
- c = strstr(cmdline, "root=/dev/");
+ c = strstr(cmdline, "root=");
if (c) {
- strncpy(rootbdev, &c[10], 3);
- rootbdev[3] = '\0';
+ get_root_disk(cmdline, rootbdev);
sprintf(filename, "block/%s/device/model", rootbdev);
fd = openat(sysfd, filename, O_RDONLY);
f = fdopen(fd, "r");
--
2.1.2
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Timofey Titovets
2014-10-29 13:16:22 UTC
Permalink
Why then developers use cmdline before?
Maybe cmdline allow determine disk when bootchart working from or in initrd?
Post by Zbigniew Jędrzejewski-Szmek
Post by Timofey Titovets
Good time of day, list.
/* FIXME: this works only in the simple case */
By default function try to get only root=/dev/*
I also attach patch. Thanks.
Rewrited with use fstab_node_to_udev_node() and
canonicalize_file_name() functions.
There's infrastracture to do this properly: see
parse_proc_cmdline_item, e.g. in cryptsetup-generator.c.
Nevertheless, I'm wondering if this couldn't be done better by checking
what is mounted on /. Seems that it would work in more cases.
Zbyszek
Post by Timofey Titovets
From 4d14e78977df92e010ea488f97acd6a5e8e30e97 Mon Sep 17 00:00:00 2001
Date: Tue, 28 Oct 2014 07:42:26 +0300
Subject: [PATCH] Bootchart: allow parse LABEL, UUID, PARTUUID for svg info
---
src/bootchart/svg.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index faf377e..81d3da9 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -151,6 +151,24 @@ static void svg_header(void) {
svg(" ]]>\n </style>\n</defs>\n\n");
}
+static void get_root_disk(const char *cmdline, char *rootbdev) {
+ char *ptr = strstr(cmdline, "root=");
+
+ if (!ptr)
+ return;
+
+ ptr = &ptr[5];
+ ptr = strtok(ptr," ");
+
+ if (ptr[0] != '/') {
+ ptr = fstab_node_to_udev_node(ptr);
+ ptr = canonicalize_file_name(ptr);
+ }
+
+ strncpy(rootbdev, &ptr[5], 3);
+ rootbdev[3] = '\0';
+}
+
static void svg_title(const char *build) {
char cmdline[256] = "";
char filename[PATH_MAX];
@@ -175,11 +193,9 @@ static void svg_title(const char *build) {
}
/* extract root fs so we can find disk model name in sysfs */
- /* FIXME: this works only in the simple case */
- c = strstr(cmdline, "root=/dev/");
+ c = strstr(cmdline, "root=");
if (c) {
- strncpy(rootbdev, &c[10], 3);
- rootbdev[3] = '\0';
+ get_root_disk(cmdline, rootbdev);
sprintf(filename, "block/%s/device/model", rootbdev);
fd = openat(sysfd, filename, O_RDONLY);
f = fdopen(fd, "r");
--
2.1.2
From 4d14e78977df92e010ea488f97acd6a5e8e30e97 Mon Sep 17 00:00:00 2001
Date: Tue, 28 Oct 2014 07:42:26 +0300
Subject: [PATCH] Bootchart: allow parse LABEL, UUID, PARTUUID for svg info
---
src/bootchart/svg.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index faf377e..81d3da9 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -151,6 +151,24 @@ static void svg_header(void) {
svg(" ]]>\n </style>\n</defs>\n\n");
}
+static void get_root_disk(const char *cmdline, char *rootbdev) {
+ char *ptr = strstr(cmdline, "root=");
+
+ if (!ptr)
+ return;
+
+ ptr = &ptr[5];
+ ptr = strtok(ptr," ");
+
+ if (ptr[0] != '/') {
+ ptr = fstab_node_to_udev_node(ptr);
+ ptr = canonicalize_file_name(ptr);
+ }
+
+ strncpy(rootbdev, &ptr[5], 3);
+ rootbdev[3] = '\0';
+}
+
static void svg_title(const char *build) {
char cmdline[256] = "";
char filename[PATH_MAX];
@@ -175,11 +193,9 @@ static void svg_title(const char *build) {
}
/* extract root fs so we can find disk model name in sysfs */
- /* FIXME: this works only in the simple case */
- c = strstr(cmdline, "root=/dev/");
+ c = strstr(cmdline, "root=");
if (c) {
- strncpy(rootbdev, &c[10], 3);
- rootbdev[3] = '\0';
+ get_root_disk(cmdline, rootbdev);
sprintf(filename, "block/%s/device/model", rootbdev);
fd = openat(sysfd, filename, O_RDONLY);
f = fdopen(fd, "r");
--
2.1.2
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
Have a nice day,
Timofey.
Zbigniew Jędrzejewski-Szmek
2014-10-29 13:20:41 UTC
Permalink
Post by Timofey Titovets
Why then developers use cmdline before?
Maybe cmdline allow determine disk when bootchart working from or in initrd?
bootchart was merged into systemd after being developed in separate and
often does not follow the same conventions.

Zbyszek
Timofey Titovets
2014-10-29 18:09:03 UTC
Permalink
Post by Zbigniew Jędrzejewski-Szmek
Post by Timofey Titovets
Why then developers use cmdline before?
Maybe cmdline allow determine disk when bootchart working from or in initrd?
bootchart was merged into systemd after being developed in separate and
often does not follow the same conventions.
Zbyszek
Hm.. okay.
I did short search in systemd and can't find function to extract
values from /proc/mounts
It's needed to rework patch for use /proc/mounts and implement
function to parse?
I miss something?
--
Have a nice day,
Timofey.
Zbigniew Jędrzejewski-Szmek
2014-10-30 04:31:25 UTC
Permalink
Post by Timofey Titovets
Post by Zbigniew Jędrzejewski-Szmek
Post by Timofey Titovets
Why then developers use cmdline before?
Maybe cmdline allow determine disk when bootchart working from or in initrd?
bootchart was merged into systemd after being developed in separate and
often does not follow the same conventions.
Zbyszek
Hm.. okay.
I did short search in systemd and can't find function to extract
values from /proc/mounts
It's needed to rework patch for use /proc/mounts and implement
function to parse?
I miss something?
/proc/self/mountinfo is probably better. Usually this is done through udev,
but since bootchart is supposed to run standalone, in this case parsing
using custom code is OK. And yes, I think that if you're fixing this code,
it is better to do it properly.

I seems that a simple sscanf() in a loop over the lines in /proc/self/mountinfo
until you hit one with "/" in the fifth field should suffice. This gives the
the major:minor info for free.

Zbyszek
Timofey Titovets
2014-10-30 14:45:53 UTC
Permalink
Good time of day, list.
I have try to fix "Fixme" in svg.c:
/* FIXME: this works only in the simple case */

By default function try to get only root=/dev/*
I also attach patch. Thanks.

v2:
Rewrited with use fstab_node_to_udev_node() and
canonicalize_file_name() functions.
v3:
Rewrited for parsing /proc/self/mountinfo

Please test it, i'm can't test because i not have /proc/schedstat file
(custom kernel)

I use " 0 " for searching root device its correct?
For test:
[$]: grep " 0 " /proc/self/mountinfo

I'm not use major:minor because on some setups it useless.
As example, my system root:
50 0 0:28 /@ / rw,relatime shared:1 - btrfs /dev/sda3
rw,compress=zlib,space_cache,autodefrag

0:28 What?
But my system partition have 8:3
But i have only: /sys/class/bdi/8:0 and 8:1
What i missed?


From df889766a0dae0700cbc1378699e1abbad6b3f8d Mon Sep 17 00:00:00 2001
From: Timofey Titovets <***@gmail.com>
Date: Thu, 30 Oct 2014 17:23:32 +0300
Subject: [PATCH] Bootchart: use /proc/pid/mountinfo for root bdev

---
src/bootchart/svg.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index faf377e..a6a69c1 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -33,6 +33,7 @@
#include <sys/stat.h>
#include <fcntl.h>

+#include "fileio.h"
#include "util.h"
#include "macro.h"
#include "store.h"
@@ -153,16 +154,16 @@ static void svg_header(void) {

static void svg_title(const char *build) {
char cmdline[256] = "";
- char filename[PATH_MAX];
char buf[256];
char rootbdev[16] = "Unknown";
char model[256] = "Unknown";
char date[256] = "Unknown";
char cpu[256] = "Unknown";
- char *c;
+ char *ptr = NULL;
FILE *f;
time_t t;
int fd, r;
+ size_t length = 0;
struct utsname uts;

/* grab /proc/cmdline */
@@ -174,11 +175,12 @@ static void svg_title(const char *build) {
fclose(f);
}

- /* extract root fs so we can find disk model name in sysfs */
- /* FIXME: this works only in the simple case */
- c = strstr(cmdline, "root=/dev/");
- if (c) {
- strncpy(rootbdev, &c[10], 3);
+ r = read_full_file("/proc/self/mountinfo", &ptr, &length);
+ if (!r) {
+ char filename[PATH_MAX]="";
+ ptr = strtok(ptr, " 0 ");
+ ptr = strtok(ptr, " /dev/");
+ strncpy(rootbdev, &ptr[6], 3);
rootbdev[3] = '\0';
sprintf(filename, "block/%s/device/model", rootbdev);
fd = openat(sysfd, filename, O_RDONLY);
--
2.1.3
Zbigniew Jędrzejewski-Szmek
2014-10-31 00:06:17 UTC
Permalink
Post by Timofey Titovets
Good time of day, list.
/* FIXME: this works only in the simple case */
By default function try to get only root=/dev/*
I also attach patch. Thanks.
Rewrited with use fstab_node_to_udev_node() and
canonicalize_file_name() functions.
Rewrited for parsing /proc/self/mountinfo
Please test it, i'm can't test because i not have /proc/schedstat
file (custom kernel)
I use " 0 " for searching root device its correct?
[$]: grep " 0 " /proc/self/mountinfo
No:

13 1 179:53 / / rw,noatime shared:1 - ext4 /dev/root rw,data=ordered

Why not check field 5 for "/"?
Post by Timofey Titovets
I'm not use major:minor because on some setups it useless.
rw,compress=zlib,space_cache,autodefrag ^
True, but you have the device name in there too |

Zbyszek
Timofey Titovets
2014-10-31 04:51:59 UTC
Permalink
Post by Zbigniew Jędrzejewski-Szmek
Post by Timofey Titovets
Good time of day, list.
/* FIXME: this works only in the simple case */
By default function try to get only root=/dev/*
I also attach patch. Thanks.
Rewrited with use fstab_node_to_udev_node() and
canonicalize_file_name() functions.
Rewrited for parsing /proc/self/mountinfo
Please test it, i'm can't test because i not have /proc/schedstat
file (custom kernel)
I use " 0 " for searching root device its correct?
[$]: grep " 0 " /proc/self/mountinfo
13 1 179:53 / / rw,noatime shared:1 - ext4 /dev/root rw,data=ordered
Why not check field 5 for "/"?
To be honest - I don't know how write it prettily >_<
read file with fscanf like:
fscanf(fd, "%s %s %s %s %s %s %s - %s %s %s\n", ...) //Looks ugly.

Then, perhaps can i search 'shared:1 ' entry ?
Post by Zbigniew Jędrzejewski-Szmek
Post by Timofey Titovets
I'm not use major:minor because on some setups it useless.
rw,compress=zlib,space_cache,autodefrag ^
True, but you have the device name in there too |
Zbyszek
Hm.. If you insinuate that i can use block device name from "root
Post by Zbigniew Jędrzejewski-Szmek
+ ptr = strtok(ptr, " /dev/");
+ strncpy(rootbdev, &ptr[6], 3);
--
Have a nice day,
Timofey.
Karel Zak
2014-10-31 08:57:15 UTC
Permalink
Post by Timofey Titovets
Post by Zbigniew Jędrzejewski-Szmek
Post by Timofey Titovets
Good time of day, list.
/* FIXME: this works only in the simple case */
By default function try to get only root=/dev/*
I also attach patch. Thanks.
Rewrited with use fstab_node_to_udev_node() and
canonicalize_file_name() functions.
Rewrited for parsing /proc/self/mountinfo
Please test it, i'm can't test because i not have /proc/schedstat
file (custom kernel)
I use " 0 " for searching root device its correct?
findmnt -o TARGET,SOURCE,ID

don't forget that mount IDs are sequential numbers and we usually don't mount
the real root as the first thing (for example /sys, /proc, /dev are mounted
more early in initrd).
Post by Timofey Titovets
Post by Zbigniew Jędrzejewski-Szmek
Post by Timofey Titovets
[$]: grep " 0 " /proc/self/mountinfo
13 1 179:53 / / rw,noatime shared:1 - ext4 /dev/root rw,data=ordered
Why not check field 5 for "/"?
To be honest - I don't know how write it prettily >_<
fscanf(fd, "%s %s %s %s %s %s %s - %s %s %s\n", ...) //Looks ugly.
Then, perhaps can i search 'shared:1 ' entry ?
somewhere in systemd code is mountinfo parser.. or see
https://github.com/karelzak/util-linux/blob/master/libmount/src/tab_parse.c#L124

it seems you also want to read:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/proc.txt#n1589


Karel
--
Karel Zak <***@redhat.com>
http://karelzak.blogspot.com
Timofey Titovets
2014-10-31 12:45:21 UTC
Permalink
Post by Karel Zak
somewhere in systemd code is mountinfo parser.. or see
https://github.com/karelzak/util-linux/blob/master/libmount/src/tab_parse.c#L124
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/proc.txt#n1589
Thanks Karel, Really big thanks.
Post by Karel Zak
Karel
--
http://karelzak.blogspot.com
--
Have a nice day,
Timofey.
Timofey Titovets
2014-10-31 13:01:45 UTC
Permalink
Good time of day, list.
I have try to fix "Fixme" in svg.c:
/* FIXME: this works only in the simple case */
// By default function try to get only root=/dev/*

I rewrite to parse /proc/self/mountinfo
This only support root device like /dev/???*
I can't support LVM/Luks & etc, i'm not using these setups.

I also attach patch. Thanks.

v2:
Rewrited with use fstab_node_to_udev_node()
and canonicalize_file_name() functions.
v3:
Rewrited for parsing /proc/self/mountinfo

v4:
Again rewrited.
Search "/" in 5th column and
parse get name of bdev from 10th column

Not tested while boot process, code in separate binary file working good.

From 97d259c38da3a32569e30bfaf7df56c062c570a6 Mon Sep 17 00:00:00 2001
From: Timofey Titovets <***@gmail.com>
Date: Fri, 31 Oct 2014 15:43:30 +0300
Subject: [PATCH] Bootchart: use /proc/pid/mountinfo for root bdev

---
src/bootchart/svg.c | 27 ++++++++++++++++++++-------
1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index faf377e..2e9c039 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -151,6 +151,22 @@ static void svg_header(void) {
svg(" ]]>\n </style>\n</defs>\n\n");
}

+void get_rootbdev(char *rootbdev) {
+ FILE *file = fopen("/proc/self/mountinfo", "r");
+ char mnt_point[PATH_MAX];
+ char mnt_source[PATH_MAX];
+ char t[256]; // Trash
+ while (file && strcmp(mnt_point, "/") && !feof(file)){
+ fscanf(file, "%s %s %s %s %s %s %s %s %s %s %s",
+ t,t,t,t,
+ mnt_point, t,t,t,t,
+ mnt_source, t);
+ }
+ if(!strcmp(mnt_point, "/"))
+ strncpy(rootbdev, &mnt_source[5], 3);
+ fclose(file);
+}
+
static void svg_title(const char *build) {
char cmdline[256] = "";
char filename[PATH_MAX];
@@ -159,7 +175,6 @@ static void svg_title(const char *build) {
char model[256] = "Unknown";
char date[256] = "Unknown";
char cpu[256] = "Unknown";
- char *c;
FILE *f;
time_t t;
int fd, r;
@@ -174,12 +189,10 @@ static void svg_title(const char *build) {
fclose(f);
}

- /* extract root fs so we can find disk model name in sysfs */
- /* FIXME: this works only in the simple case */
- c = strstr(cmdline, "root=/dev/");
- if (c) {
- strncpy(rootbdev, &c[10], 3);
- rootbdev[3] = '\0';
+ f = fopen("/proc/self/mountinfo", "r");
+ if (f) {
+ fclose(f);
+ get_rootbdev(rootbdev);
sprintf(filename, "block/%s/device/model", rootbdev);
fd = openat(sysfd, filename, O_RDONLY);
f = fdopen(fd, "r");
--
2.1.3
Lennart Poettering
2014-12-05 00:12:22 UTC
Permalink
Post by Timofey Titovets
+void get_rootbdev(char *rootbdev) {
+ FILE *file = fopen("/proc/self/mountinfo", "r");
+ char mnt_point[PATH_MAX];
+ char mnt_source[PATH_MAX];
+ char t[256]; // Trash
+ while (file && strcmp(mnt_point, "/") && !feof(file)){
+ fscanf(file, "%s %s %s %s %s %s %s %s %s %s %s",
+ t,t,t,t,
+ mnt_point, t,t,t,t,
+ mnt_source, t);
+ }
+ if(!strcmp(mnt_point, "/"))
+ strncpy(rootbdev, &mnt_source[5], 3);
+ fclose(file);
+}
+
Umm, the error handling is missing. We don't invoke functions from
variable definitions. We do not allocate over-sized buffers on the
stack. Either we do it with the right size or with dyanmic memory. We
generally don't use strcmp() for simple equality checks, but
streq(). We use _cleanup_xyz_ to automatically free resources. Please
have a look at the CODING_STYLE document in the repository.

In general, I wouldn't consult mountinfo for this at all. Instead
stat() the root fs, then use udev_device_new_from_devnum() on the
returned st_dev, and read the device symlinks from that.

Lennart
--
Lennart Poettering, Red Hat
Lennart Poettering
2014-10-02 10:11:08 UTC
Permalink
Post by Tomasz Torcz
Check the udev database at this moment. In my understanding, to have device deemed
– TAGS variable must contain ”systemd”
– SYSTEMD_READY must be ”1”
Well, the latter is not entirely correct. It's reversed: the
SYSTEMD_READY field must not be "0". Or in other words, either be "1"
or absent, for systemd to consider the device around.

I'd really like to the the udev info output for the actual device
missing here, rather than an unrelated one.

Lennart
--
Lennart Poettering, Red Hat
Thomas Meyer
2014-10-03 11:32:09 UTC
Permalink
Post by Lennart Poettering
Post by Tomasz Torcz
Check the udev database at this moment. In my understanding, to have device deemed
– TAGS variable must contain ”systemd”
– SYSTEMD_READY must be ”1”
Well, the latter is not entirely correct. It's reversed: the
SYSTEMD_READY field must not be "0". Or in other words, either be "1"
or absent, for systemd to consider the device around.
I'd really like to the the udev info output for the actual device
missing here, rather than an unrelated one.
Hi,

I think the confusion with the device id comes from that fact that I
posted the results from two different boots:

1.) Trying to boot from the Fedora 21-Alpha with the contained initrd
image -> waits forever for /dev/ubdb1 resp. /dev/ubdb3, which are the
partitions on the ISO image
2.) Boot from a Fedora 21 alpha installation, which waits forever for
device with UUID 008af19d-2562-49bd-8907-721ea08f3e14, which is
/dev/ubda1, which contains the /boot partition

the error happens in both situations, so I thought I shouldn't matter
which one to post.

anyway, here is the info you asked for:
# systemctl status
dev-disk-by\x2duuid-008af19d\x2d2562\x2d49bd\x2d8907\x2d721ea08f3e14.device
● dev-disk-byx2duuid-008af19dx2d2562x2d49bdx2d8907x2d721ea08f3e14.device
Loaded: loaded
Active: inactive (dead)

# ls -ld /dev/disk/by-uuid/008af19d-2562-49bd-8907-721ea08f3e14
lrwxrwxrwx 1 root root 11 Oct 3 13:15
/dev/disk/by-uuid/008af19d-2562-49bd-8907-721ea08f3e14 -> ../../ubda1

# udevadm info -q path -n /dev/ubda1
/devices/platform/uml-blkdev.0/block/ubda/ubda1

# udevadm info -q all -p /devices/platform/uml-blkdev.0/block/ubda/ubda1
P: /devices/platform/uml-blkdev.0/block/ubda/ubda1
N: ubda1
S: disk/by-path/platform-uml-blkdev.0-part1
S: disk/by-uuid/008af19d-2562-49bd-8907-721ea08f3e14
E: DEVLINKS=/dev/disk/by-path/platform-uml-blkdev.0-part1
/dev/disk/by-uuid/008af19d-2562-49bd-8907-721ea08f3e14
E: DEVNAME=/dev/ubda1
E: DEVPATH=/devices/platform/uml-blkdev.0/block/ubda/ubda1
E: DEVTYPE=partition
E: ID_FS_TYPE=ext4
E: ID_FS_USAGE=filesystem
E: ID_FS_UUID=008af19d-2562-49bd-8907-721ea08f3e14
E: ID_FS_UUID_ENC=008af19d-2562-49bd-8907-721ea08f3e14
E: ID_FS_VERSION=1.0
E: ID_PART_ENTRY_DISK=98:0
E: ID_PART_ENTRY_FLAGS=0x80
E: ID_PART_ENTRY_NUMBER=1
E: ID_PART_ENTRY_OFFSET=2048
E: ID_PART_ENTRY_SCHEME=dos
E: ID_PART_ENTRY_SIZE=1024000
E: ID_PART_ENTRY_TYPE=0x83
E: ID_PART_ENTRY_UUID=73764b38-01
E: ID_PART_TABLE_TYPE=dos
E: ID_PART_TABLE_UUID=73764b38
E: ID_PATH=platform-uml-blkdev.0
E: ID_PATH_TAG=platform-uml-blkdev_0
E: MAJOR=98
E: MINOR=1
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=50322

# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Sun Sep 28 14:27:03 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=e2bffa45-d84f-47bc-81ba-e7a395751fa6 / ext4
defaults 1 1
UUID=008af19d-2562-49bd-8907-721ea08f3e14 /boot ext4
defaults 1 2
UUID=f452f020-a446-41ed-93c0-ee5ce56d6ea4 swap swap
defaults 0 0
Post by Lennart Poettering
Lennart
--
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Andrei Borzenkov
2014-10-03 15:51:30 UTC
Permalink
В Fri, 03 Oct 2014 13:32:09 +0200
Post by Thomas Meyer
Post by Lennart Poettering
Post by Tomasz Torcz
Check the udev database at this moment. In my understanding, to have device deemed
– TAGS variable must contain ”systemd”
– SYSTEMD_READY must be ”1”
Well, the latter is not entirely correct. It's reversed: the
SYSTEMD_READY field must not be "0". Or in other words, either be "1"
or absent, for systemd to consider the device around.
I'd really like to the the udev info output for the actual device
missing here, rather than an unrelated one.
Hi,
I think the confusion with the device id comes from that fact that I
1.) Trying to boot from the Fedora 21-Alpha with the contained initrd
image -> waits forever for /dev/ubdb1 resp. /dev/ubdb3, which are the
partitions on the ISO image
2.) Boot from a Fedora 21 alpha installation, which waits forever for
device with UUID 008af19d-2562-49bd-8907-721ea08f3e14, which is
/dev/ubda1, which contains the /boot partition
the error happens in both situations, so I thought I shouldn't matter
which one to post.
# systemctl status
dev-disk-by\x2duuid-008af19d\x2d2562\x2d49bd\x2d8907\x2d721ea08f3e14.device
● dev-disk-byx2duuid-008af19dx2d2562x2d49bdx2d8907x2d721ea08f3e14.device
Loaded: loaded
Active: inactive (dead)
# ls -ld /dev/disk/by-uuid/008af19d-2562-49bd-8907-721ea08f3e14
lrwxrwxrwx 1 root root 11 Oct 3 13:15
/dev/disk/by-uuid/008af19d-2562-49bd-8907-721ea08f3e14 -> ../../ubda1
# udevadm info -q path -n /dev/ubda1
/devices/platform/uml-blkdev.0/block/ubda/ubda1
# udevadm info -q all -p /devices/platform/uml-blkdev.0/block/ubda/ubda1
P: /devices/platform/uml-blkdev.0/block/ubda/ubda1
N: ubda1
S: disk/by-path/platform-uml-blkdev.0-part1
S: disk/by-uuid/008af19d-2562-49bd-8907-721ea08f3e14
E: DEVLINKS=/dev/disk/by-path/platform-uml-blkdev.0-part1
/dev/disk/by-uuid/008af19d-2562-49bd-8907-721ea08f3e14
E: DEVNAME=/dev/ubda1
E: DEVPATH=/devices/platform/uml-blkdev.0/block/ubda/ubda1
E: DEVTYPE=partition
E: ID_FS_TYPE=ext4
E: ID_FS_USAGE=filesystem
E: ID_FS_UUID=008af19d-2562-49bd-8907-721ea08f3e14
E: ID_FS_UUID_ENC=008af19d-2562-49bd-8907-721ea08f3e14
E: ID_FS_VERSION=1.0
E: ID_PART_ENTRY_DISK=98:0
E: ID_PART_ENTRY_FLAGS=0x80
E: ID_PART_ENTRY_NUMBER=1
E: ID_PART_ENTRY_OFFSET=2048
E: ID_PART_ENTRY_SCHEME=dos
E: ID_PART_ENTRY_SIZE=1024000
E: ID_PART_ENTRY_TYPE=0x83
E: ID_PART_ENTRY_UUID=73764b38-01
E: ID_PART_TABLE_TYPE=dos
E: ID_PART_TABLE_UUID=73764b38
E: ID_PATH=platform-uml-blkdev.0
E: ID_PATH_TAG=platform-uml-blkdev_0
E: MAJOR=98
E: MINOR=1
E: SUBSYSTEM=block
E: USEC_INITIALIZED=50322
Hmm ... one of common reason for such problems recently was missing
CONFIG_FHANDLE in kernel configuration. Could you verify that all
required kernel options are set in your case?
Post by Thomas Meyer
# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sun Sep 28 14:27:03 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=e2bffa45-d84f-47bc-81ba-e7a395751fa6 / ext4
defaults 1 1
UUID=008af19d-2562-49bd-8907-721ea08f3e14 /boot ext4
defaults 1 2
UUID=f452f020-a446-41ed-93c0-ee5ce56d6ea4 swap swap
defaults 0 0
Post by Lennart Poettering
Lennart
--
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Thomas Meyer
2014-10-03 17:14:51 UTC
Permalink
Post by Andrei Borzenkov
В Fri, 03 Oct 2014 13:32:09 +0200
Post by Thomas Meyer
Post by Lennart Poettering
Post by Tomasz Torcz
Check the udev database at this moment. In my understanding, to have device deemed
– TAGS variable must contain ”systemd”
– SYSTEMD_READY must be ”1”
Well, the latter is not entirely correct. It's reversed: the
SYSTEMD_READY field must not be "0". Or in other words, either be "1"
or absent, for systemd to consider the device around.
I'd really like to the the udev info output for the actual device
missing here, rather than an unrelated one.
Hi,
I think the confusion with the device id comes from that fact that I
1.) Trying to boot from the Fedora 21-Alpha with the contained initrd
image -> waits forever for /dev/ubdb1 resp. /dev/ubdb3, which are the
partitions on the ISO image
2.) Boot from a Fedora 21 alpha installation, which waits forever for
device with UUID 008af19d-2562-49bd-8907-721ea08f3e14, which is
/dev/ubda1, which contains the /boot partition
the error happens in both situations, so I thought I shouldn't matter
which one to post.
# systemctl status
dev-disk-by\x2duuid-008af19d\x2d2562\x2d49bd\x2d8907\x2d721ea08f3e14.device
● dev-disk-byx2duuid-008af19dx2d2562x2d49bdx2d8907x2d721ea08f3e14.device
Loaded: loaded
Active: inactive (dead)
# ls -ld /dev/disk/by-uuid/008af19d-2562-49bd-8907-721ea08f3e14
lrwxrwxrwx 1 root root 11 Oct 3 13:15
/dev/disk/by-uuid/008af19d-2562-49bd-8907-721ea08f3e14 -> ../../ubda1
# udevadm info -q path -n /dev/ubda1
/devices/platform/uml-blkdev.0/block/ubda/ubda1
# udevadm info -q all -p /devices/platform/uml-blkdev.0/block/ubda/ubda1
P: /devices/platform/uml-blkdev.0/block/ubda/ubda1
N: ubda1
S: disk/by-path/platform-uml-blkdev.0-part1
S: disk/by-uuid/008af19d-2562-49bd-8907-721ea08f3e14
E: DEVLINKS=/dev/disk/by-path/platform-uml-blkdev.0-part1
/dev/disk/by-uuid/008af19d-2562-49bd-8907-721ea08f3e14
E: DEVNAME=/dev/ubda1
E: DEVPATH=/devices/platform/uml-blkdev.0/block/ubda/ubda1
E: DEVTYPE=partition
E: ID_FS_TYPE=ext4
E: ID_FS_USAGE=filesystem
E: ID_FS_UUID=008af19d-2562-49bd-8907-721ea08f3e14
E: ID_FS_UUID_ENC=008af19d-2562-49bd-8907-721ea08f3e14
E: ID_FS_VERSION=1.0
E: ID_PART_ENTRY_DISK=98:0
E: ID_PART_ENTRY_FLAGS=0x80
E: ID_PART_ENTRY_NUMBER=1
E: ID_PART_ENTRY_OFFSET=2048
E: ID_PART_ENTRY_SCHEME=dos
E: ID_PART_ENTRY_SIZE=1024000
E: ID_PART_ENTRY_TYPE=0x83
E: ID_PART_ENTRY_UUID=73764b38-01
E: ID_PART_TABLE_TYPE=dos
E: ID_PART_TABLE_UUID=73764b38
E: ID_PATH=platform-uml-blkdev.0
E: ID_PATH_TAG=platform-uml-blkdev_0
E: MAJOR=98
E: MINOR=1
E: SUBSYSTEM=block
E: USEC_INITIALIZED=50322
Hmm ... one of common reason for such problems recently was missing
CONFIG_FHANDLE in kernel configuration. Could you verify that all
required kernel options are set in your case?
Hi Andrei,

Thanks for this tip! My kernel config did indeed miss the CONFIG_FHANDLE option. After recompiling the kernel, the devices where automatically detected by systemd!

Does systemd log a message somewhere about this missing kernel option? Did I miss the relevant notice in the log messages?

Anyway thanks for you help.
Post by Andrei Borzenkov
Post by Thomas Meyer
# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sun Sep 28 14:27:03 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=e2bffa45-d84f-47bc-81ba-e7a395751fa6 / ext4
defaults 1 1
UUID=008af19d-2562-49bd-8907-721ea08f3e14 /boot ext4
defaults 1 2
UUID=f452f020-a446-41ed-93c0-ee5ce56d6ea4 swap swap
defaults 0 0
Post by Lennart Poettering
Lennart
--
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
_______________________________________________
systemd-devel mailing list
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Tomasz Torcz
2014-10-03 22:01:59 UTC
Permalink
Post by Thomas Meyer
Post by Andrei Borzenkov
Hmm ... one of common reason for such problems recently was missing
CONFIG_FHANDLE in kernel configuration. Could you verify that all
required kernel options are set in your case?
Hi Andrei,
Thanks for this tip! My kernel config did indeed miss the CONFIG_FHANDLE option. After recompiling the kernel, the devices where automatically detected by systemd!
Does systemd log a message somewhere about this missing kernel option? Did I miss the relevant notice in the log messages?
You have missed README.
--
Tomasz Torcz ,,(...) today's high-end is tomorrow's embedded processor.''
xmpp: ***@chrome.pl -- Mitchell Blank on LKML
Continue reading on narkive:
Loading...