Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: Some systemd log messages contain hex coded dashes the make the messages hard to read. In particular, UUIDs are cluttered with them. UUIDs are already hard to read, and hex coded dashes make them even harder to read: systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-aaaaaaaa\x2daaaa\x2daaaa\x2daaaa\x2daaaaaaaaaaaa.device. Version-Release number of selected component (if applicable): systemd-239-6.git9f3aed1.fc29.x86_64 How reproducible: Always. Steps to Reproduce: See: Bug 1655194 - systemd stalls boot for 1 min. 30 sec. when swap UUID refers to nonexistent device Additional info:
Created attachment 1511205 [details] Screenshot showing systemd messages with hex coded dashes This screenshot shows two systemd boot messages with hex coded dashes: "Created slice system-systemd\x2dfsck.slice." "A start job is running for dev-disk-by\x2duuid-aaaa ... aaaa.device (42s / 1min 30s)" (I replaced part of the UUID with an ellipsis.) Note that there is actually a mix of dashes and hex coded dashes. Dashes are printable characters, so they should be displayed as such.
Created attachment 1511206 [details] log file snippet showing hex coded dashes
(In reply to Steve from comment #0) > systemd[1]: Timed out waiting for device > dev-disk-by\x2duuid-aaaaaaaa\x2daaaa\x2daaaa\x2daaaa\x2daaaaaaaaaaaa.device. If I recall correctly, this is working as expected. The unit name gets translated and escaped from the actual path of the device, which in this case would be "/dev/disk/by-uuid/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa". For more information, you can take a look at systemd.unit(5), section "STRING ESCAPING FOR INCLUSION IN UNIT NAMES".
(In reply to Jan Synacek from comment #3) > (In reply to Steve from comment #0) > > systemd[1]: Timed out waiting for device > > dev-disk-by\x2duuid-aaaaaaaa\x2daaaa\x2daaaa\x2daaaa\x2daaaaaaaaaaaa.device. > > If I recall correctly, this is working as expected. The unit name gets > translated and escaped from the actual path of the device, which in this > case would be "/dev/disk/by-uuid/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa". For > more information, you can take a look at systemd.unit(5), section "STRING > ESCAPING FOR INCLUSION IN UNIT NAMES". Thanks for pointing that out. I didn't realize those strings are encoded file or directory names: $ systemctl list-units | grep '\x2d' | head -1 sys-devices-virtual-block-dm\x2d0.device ... /sys/devices/virtual/block/dm-0 That's all the more reason to provide some readable log messages for context: Bug 1655194, Comment 10 Closing as not a bug.
https://github.com/systemd/systemd/pull/11047
(In reply to Zbigniew Jędrzejewski-Szmek from comment #5) > https://github.com/systemd/systemd/pull/11047 Thanks. IIUC, your patch results in this showing a file system path in the "DESCRIPTION" column, even when the unit is "dead": $ systemctl list-units --all \*uuid\*.device | grep dead dev-disk-by\x2duuid-aaaaaaaa\x2daaaa\x2daaaa\x2daaaa\x2daaaaaaaaaaaa.device loaded inactive dead dev-disk-by\x2duuid-aaaaaaaa\x2daaaa\x2daaaa\x2daaaa\x2daaaaaaaaaaaa.device "systemctl" accepts file system paths, so this works fine: $ systemctl status /dev/disk/by-uuid/7122eda4-f3a6-445c-9b4f-76d0337eb13f Further, the UUID can be copied and pasted into non-systemd commands: $ findfs UUID=7122eda4-f3a6-445c-9b4f-76d0337eb13f /dev/vda1
This will be available in F30. Possibly also in F29 if systemd is upgraded to 241 there, but this is not certain yet.