Actions
action #138995
closedcoordination #95371: Self Service/Self Paced Onboarding and training for openQA
[qe-core] how to get debug logs when emergency shell appears
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"
Updated by zluo about 1 year 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