071f05 mkdumprd: Fix makedumpfile parameter check.

1 file Authored by Coiby Xu 6 months ago, Committed by liutgnu 6 months ago,
1 file changed. 1 lines added. 1 lines removed.
    mkdumprd: Fix makedumpfile parameter check.
    
    Resolves: https://issues.redhat.com/browse/RHEL-35811
    Conflict: None
    
    Upstream Status: git@github.com:rhkdump/kdump-utils.git
    
    commit 247c7a5f39b305f9a83bad2d936d00237165b7e0
    Author: Mamoru Nishibe (Fujitsu) <nishibe.mamoru@fujitsu.com>
    Date:   Wed Apr 24 08:11:12 2024 +0000
    
        mkdumprd: Fix makedumpfile parameter check.
    
        If only "makedumpfile" is written in "core_collector" of /etc/kdump.conf
        and try to run makedumpfile without options,
        "makedumpfile --check-params" fails and terminates abnormally.
    
            # grep ^core_collector /etc/kdump.conf
            core_collector makedumpfile
            # /usr/bin/kdumpctl start
            :
            Commandline parameter is invalid.
            Try `makedumpfile --help' for more information.
            kdump: makedumpfile parameter check failed.
            kdump: mkdumprd: failed to make kdump initrd
            kdump: Starting kdump: [FAILED]
    
        On the other hand, "makedumpfile --check-params" works fine without any options.
    
            # makedumpfile --check-params vmcore dumpfile
            # echo $?
            0
    
        In addition, before verify_core_collector() was implemented,
        initial RAM for kdump was successfully created using only "core_collector makedumpfile".
        I consider it a regression.
    
        This is due to a parameter extraction error in verify_core_collector().
        Fix it to correctly extract only the options as follows.
    
        Fixes: a1c28126 ("mkdumprd: Use makedumpfile --check-params option")
        Signed-off-by: Mamoru Nishibe <nishibe.mamoru@fujitsu.com>
        Reviewed-by: Coiby Xu <coxu@redhat.com>
    
    Signed-off-by: Coiby Xu <coxu@redhat.com>
    
        
file modified
+1 -1