Project

General

Profile

Actions

action #138995

closed

coordination #95371: Self Service/Self Paced Onboarding and training for openQA

[qe-core] how to get debug logs when emergency shell appears

Added by zluo 7 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
2023-11-02
Due date:
% Done:

0%

Estimated time:

Description

related to poo#138200
additional logs requested by developer: /run/initramfs/rdsosdebug.txt

need to add rd.udev.log_level=debug in boot option

To reproduce the issue and catch the logs, use following command for example:

openqa-clone-job --from https://openqa.suse.de/tests/12725295 --skip-chained-deps --skip-download --repeat=100 _GROUP=0 $job BUILD=poo_138200 EXTRABOOTPARAMS="debug rd.udev.log_level=debug"
Actions #1

Updated by zluo 7 months ago

  • Category set to Spike/Research
Actions #2

Updated by zluo 7 months ago

the code comes from lib/utils.pm


sub handle_emergency {
    if (match_has_tag('emergency-shell')) {
        # get emergency shell logs for bug, scp doesn't work
        type_password;
        send_key 'ret';
        script_run "cat /run/initramfs/rdsosreport.txt > /dev/$serialdev";
        script_run "echo \"\n--------------Beginning of journalctl--------------\n\" > /dev/$serialdev";
        script_run "journalctl --no-pager -o short-precise > /dev/$serialdev";
        die "hit emergency shell";
    }
    elsif (match_has_tag('emergency-mode')) {
        type_password;
        send_key 'ret';
        script_run "journalctl --no-pager -o short-precise > /dev/$serialdev";
        die "hit emergency mode";
    } 
}

Actions

Also available in: Atom PDF