Bug 1239226 - rd.live.check - [FAILED] Failed to start checkisomd5@-dev-sr0.service
Summary: rd.live.check - [FAILED] Failed to start checkisomd5@-dev-sr0.service
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: dracut-maint-list
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-04 15:33 UTC by poma
Modified: 2015-07-10 11:05 UTC (History)
10 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2015-07-10 09:32:28 UTC


Attachments (Terms of Use)
dmsquash-live/dmsquash-live-root.sh: fixup checkisomd5 for systemd (3.04 KB, patch)
2015-07-10 08:16 UTC, poma
no flags Details | Diff

Description poma 2015-07-04 15:33:55 UTC
https://kojipkgs.fedoraproject.org/mash/rawhide-20150704/rawhide/x86_64/os/images/boot.iso

isolinux/isolinux.cfg:

label check
  menu label Test this ^media & install Fedora rawhide
  menu default
  kernel vmlinuz
  append initrd=initrd.img inst.stage2=hd:LABEL=Fedora-rawhide-x86_64 rd.live.check quiet


[    8.110775] dracut-initqueue[654]: mount: /dev/sr0 is write-protected, mounting read-only
[  OK  ] Created slice system-checkisomd5.slice.
[FAILED] Failed to start checkisomd5@-dev-sr0.service.
See 'systemctl status checkisomd5@-dev-sr0.service' for details.
         Starting checkisomd5@-dev-sr0.service...
[    8.683283] dracut-initqueue[654]: Job for checkisomd5@-dev-sr0.service failed because a configured resource limit was exceeded. See "systemctl status checkisomd5@-dev-sr0.service" and "journalctl -xe" for details.

Comment 1 poma 2015-07-04 16:14:51 UTC
https://kojipkgs.fedoraproject.org/work/tasks/8873/10288873/Fedora-Live-Xfce-x86_64-rawhide-20150704.iso

isolinux/isolinux.cfg:

label check0
  menu label ^Test this media & start Fedora Live
  kernel vmlinuz0
  append initrd=initrd0.img root=live:CDLABEL=Fedora-Live-Xfce-x86_64-rawhide- rootfstype=auto ro rd.live.image quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0 rd.live.check


[  OK  ] Created slice system-checkisomd5.slice.
[FAILED] Failed to start checkisomd5@-dev-di...2dx86_64\x2drawhide\x2d.service.
See 'systemctl status "checkisomd5@-dev...2drawhide\\x2d.service"' for details.
         Starting checkisomd5@-dev-disk-by\x...x86_64\x2drawhide\x2d.service...
[    3.688399] dracut: FATAL: CD check failed!
[    3.688958] dracut: Refusing to continue
[    3.693824] dracut-initqueue[459]: Job for checkisomd5@-dev-disk-by\x2dlabel-Fedora\x2dLive\x2dXfce\x2dx86_64\x2drawhide\x2d.service failed because a configured resource limit was exceeded. See "systemctl status "checkisomd5@-dev-disk-by\\x2dlabel-Fedora\\x2dLive\\x2dXfce\\x2dx86_64\\x2drawhide\\x2d.service"" and "journalctl -xe" for details.
[    3.773944] reboot: System halted

Comment 2 poma 2015-07-05 13:25:06 UTC
             S Y S T E M D

            | 219-15 | 219-18 | 220-1  | 220-9  | 221-1
    -----------------------------------------------------
D    041-14 |   OK   |   OK   |   X    |        |   X    
R   -----------------------------------------------------
A    043-2  |   OK   |        |   X    |   X    |   X    
C   -----------------------------------------------------
U
T


The problem arises >= systemd-220

Comment 3 poma 2015-07-05 14:57:31 UTC
[anaconda root@localhost ~]# systemctl status checkisomd5@-dev-sr0.service -l
● checkisomd5@-dev-sr0.service
   Loaded: not-found (Reason: No such file or directory)
   Active: failed (Result: resources)

Jul 05 14:52:19 localhost systemd[1]: [/etc/systemd/system/checkisomd5@.service:2] Failed to resolve unit specifiers on Media check on %f, ignoring: Invalid argument

Jul 05 14:52:19 localhost systemd[1]: checkisomd5@-dev-sr0.service: Failed to run 'start' task: Invalid argument
Jul 05 14:52:19 localhost systemd[1]: Failed to start checkisomd5@-dev-sr0.service.


Jul 05 14:52:19 localhost systemd[1]: checkisomd5@-dev-sr0.service: Unit entered failed state.

Jul 05 14:52:19 localhost systemd[1]: checkisomd5@-dev-sr0.service: Failed with result 'resources'.
Jul 05 14:52:19 localhost systemd[1]: Starting checkisomd5@-dev-sr0.service...
Jul 05 14:52:20 localhost systemd[1]: [/etc/systemd/system/checkisomd5@.service:2] Failed to resolve unit specifiers on Media check on %f, ignoring: Invalid argument

Comment 4 poma 2015-07-05 15:02:46 UTC
http://git.kernel.org/cgit/boot/dracut/dracut.git/plain/modules.d/90dmsquash-live/checkisomd5@.service
[Unit]
Description=Media check on %f
DefaultDependencies=no
Before=shutdown.target

[Service]
Type=oneshot
RemainAfterExit=no
ExecStart=/bin/checkisomd5 --verbose %f
StandardInput=tty-force
StandardOutput=inherit
StandardError=inherit
TimeoutSec=0
SuccessExitStatus=2


http://git.kernel.org/cgit/boot/dracut/dracut.git/plain/modules.d/90dmsquash-live/dmsquash-live-root.sh
# CD/DVD media check
[ -b $livedev ] && fs=$(blkid -s TYPE -o value $livedev)
if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; then
    check="yes"
fi
getarg rd.live.check -d check || check=""
if [ -n "$check" ]; then
    type plymouth >/dev/null 2>&1 && plymouth --hide-splash
    if [ -n "$DRACUT_SYSTEMD" ]; then
        p=$(str_replace "$livedev" "-" '\x2d')
        systemctl start checkisomd5@${p}.service
    else
        checkisomd5 --verbose $livedev
    fi
    if [ $? -eq 1 ]; then
        die "CD check failed!"
        exit 1
    fi
    type plymouth >/dev/null 2>&1 && plymouth --show-splash
fi

ln -s $livedev /run/initramfs/livedev

Comment 5 poma 2015-07-05 15:06:45 UTC
What has changed in systemd-220, so %f isn't properly translated?

Comment 6 poma 2015-07-06 02:45:29 UTC
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
@@ -41,10 +41,10 @@ getarg rd.live.check -d check || check=""
 if [ -n "$check" ]; then
     type plymouth >/dev/null 2>&1 && plymouth --hide-splash
     if [ -n "$DRACUT_SYSTEMD" ]; then
+        checkisomd5 --verbose $livedev
+    else
         p=$(str_replace "$livedev" "-" '\x2d')
         systemctl start checkisomd5@${p}.service
-    else
-        checkisomd5 --verbose $livedev
     fi
     if [ $? -eq 1 ]; then
         die "CD check failed!"


[   13.653853] dracut-initqueue[431]: The media check is complete, the result is: PASS.
[   13.657371] dracut-initqueue[431]: It is OK to use this media.

Comment 7 poma 2015-07-06 02:53:01 UTC
Whether it may be a problem with 'str_replace',
http://git.kernel.org/cgit/boot/dracut/dracut.git/plain/modules.d/99base/dracut-lib.sh

"the leading hyphen is the problem"
https://github.com/coreos/bugs/issues/382

Comment 8 poma 2015-07-06 08:06:12 UTC
Surprise, surprise ... not really.
Yet another case of the dracut losing step with the systemd.


--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
@@ -41,7 +41,7 @@ getarg rd.live.check -d check || check=""
 if [ -n "$check" ]; then
     type plymouth >/dev/null 2>&1 && plymouth --hide-splash
     if [ -n "$DRACUT_SYSTEMD" ]; then
-        p=$(str_replace "$livedev" "-" '\x2d')
+        p=dev/sr0
         systemctl start checkisomd5@${p}.service
     else
         checkisomd5 --verbose $livedev


[  OK  ] Created slice system-checkisomd5.slice.
         Starting Media check on /dev/sr0...
/dev/sr0:   aeef4e4f54b1bdd340de602eb2d3a11e
Fragment sums: f9ef742e3e5ee94aecc288b8e96eb94eb77b49953f789fe3df5d6e15a618
Fragment count: 20
Supported ISO: no
Press [Esc] to abort check.
Checking: 007.5%[    6.723667] random: nonblocking pool is initialized
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.
[  OK  ] Started Media check on /dev/sr0.


# systemctl status checkisomd5@dev-sr0.servicecheckisomd5@dev-sr0.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

Jul 06 03:50:52 localhost systemd[1]: Starting Media check on /dev/sr0...
Jul 06 03:50:59 localhost systemd[1]: Started Media check on /dev/sr0.

Comment 9 Harald Hoyer 2015-07-06 13:14:38 UTC
        p=$(dev_unit_name "$livedev")
        systemctl start checkisomd5@${p}.service

is probably the best solution. Or:

systemctl start $(systemd-escape --template=checkisomd5@.service -p "$livedev")

Comment 10 poma 2015-07-06 13:18:09 UTC
https://github.com/pires/kubernetes-vagrant-coreos-cluster/issues/123
"the issue is systemd related. absolute paths for systemd unit templates shouldn't start anymore by - (/). (they should be the ouptut of systemd-escape -p ${PATH}). in practice one just has to cut 1st char."
AntonioMeireles

--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
@@ -41,7 +41,7 @@ getarg rd.live.check -d check || check=""
 if [ -n "$check" ]; then
     type plymouth >/dev/null 2>&1 && plymouth --hide-splash
     if [ -n "$DRACUT_SYSTEMD" ]; then
-        p=$(str_replace "$livedev" "-" '\x2d')
+        p=$(str_replace "${livedev#*/}" "-" '\x2d')
         systemctl start checkisomd5@${p}.service
     else
         checkisomd5 --verbose $livedev



[  OK  ] Created slice system-checkisomd5.slice.
         Starting Media check on /dev/disk/by-label/Rawhide-Live-Base-706...
/dev/disk/by-label/Rawhide-Live-Base-706:   7649d69836824f8c2716f63e0ee6ae97
Fragment sums: 2932d95cc95abba3f94cb1de913ebb36658c63671c16dac58f92432af912
Fragment count: 20
Supported ISO: no
Press [Esc] to abort check.
Checking: 008.1%[    6.996334] random: nonblocking pool is initialized
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.
[  OK  ] Started Media check on /dev/disk/by-label/Rawhide-Live-Base-706.



# systemctl status 'checkisomd5@dev-disk-by\x2dlabel-Rawhide\x2dLive\x2dBase\x2d706.service'
● checkisomd5@dev-disk-by\x2dlabel-Rawhide\x2dLive\x2dBase\x2d706.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

Jul 06 08:55:56 localhost systemd[1]: Starting Media check on /dev/disk/by-label/Rawhide-Live-Base-706...
Jul 06 08:56:03 localhost systemd[1]: Started Media check on /dev/disk/by-label/Rawhide-Live-Base-706.

Comment 11 poma 2015-07-06 13:20:16 UTC
Patch sent upstream.

Comment 12 poma 2015-07-10 08:16:59 UTC
Created attachment 1050605 [details]
dmsquash-live/dmsquash-live-root.sh: fixup checkisomd5 for systemd


[  OK  ] Created slice system-checkisomd5.slice.
         Starting Media check on /dev/disk/b...awhide-Live-Xfce-710-SD-221-1...
/dev/disk/by-label/Rawhide-Live-Xfce-710-SD-221-1:   026c22b8810dc1524e5c9a6bc226d297
Fragment sums: 22bedd474d57a2165a1a7df39a43774d5d35e835decf7d18afad89fc61f4
Fragment count: 20
Supported ISO: no
Press [Esc] to abort check.
Checking: 001.9%[    5.581978] random: nonblocking pool is initialized
Checking: 100.0%

The media check is complete, the result is: PASS.

It is OK to use this media.
[  OK  ] Started Media check on /dev/disk/by.../Rawhide-Live-Xfce-710-SD-221-1.

Comment 13 poma 2015-07-10 08:19:06 UTC
Please push fix release urgently.

Comment 14 Harald Hoyer 2015-07-10 09:32:28 UTC
dracut-043-40.git20150710.fc23

Comment 15 poma 2015-07-10 11:05:19 UTC
Thanks.


Note You need to log in before you can comment on or make changes to this bug.