d4de3e Check the existence of /sys/bus/ccwgroup/devices/*/online beforehand

Authored and Committed by Coiby Xu 3 years ago
    Check the existence of /sys/bus/ccwgroup/devices/*/online beforehand
    
    Resolves: bz1982474
    Upstream: Fedora
    Conflict: None
    
    commit b2bbb54d897959b1a6de6841ff397d6ec9565a12
    Author: Coiby Xu <coxu@redhat.com>
    Date:   Thu Jul 15 09:18:33 2021 +0800
    
        Check the existence of /sys/bus/ccwgroup/devices/*/online beforehand
    
        On s390x KVM machines, the following errors would show when building kdump
        initramfs that dumps vmcore to a remote target,
            $ kdumpctl rebuild
            /usr/lib/dracut/modules.d/99kdumpbase/module-setup.sh: line 475: /sys/bus/ccwgroup/devices/online: No such file or directory
            /usr/lib/dracut/modules.d/99kdumpbase/module-setup.sh: line 476: [: -ne: unary operator expected
    
        This happens because s390x KVM machines use virtual network and
        /sys/bus/ccwgroup/devices/ exists but is empty. Fix it by check
        the existence of file "/sys/bus/ccwgroup/devices/*/online".
    
        Fixes: commit 7d472515688fb330eee76dac1c39ae628398f757
               ("Iterate /sys/bus/ccwgroup/devices to tell if we should set up rd.znet")
    
        BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1982474
        Reported-by: Jie Li <jieli@redhat.com>
        Signed-off-by: Coiby Xu <coxu@redhat.com>
        Acked-by: Kairui Song <kasong@redhat.com>
    
    Signed-off-by: Coiby Xu <coxu@redhat.com>
    
        
file modified
+1 -0