Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s390x: Collect linuxrc logs in post_fail_hook #4725

Merged
merged 1 commit into from Mar 29, 2018

Conversation

Soulofdestiny
Copy link
Contributor

@Soulofdestiny Soulofdestiny commented Mar 28, 2018

@Soulofdestiny
Copy link
Contributor Author

@okurz
@rwx788
WDYT? should help to find the root cause for issues before the installer is actually running

@Soulofdestiny Soulofdestiny force-pushed the medium_not_available branch 2 times, most recently from d440292 to 42e0831 Compare March 28, 2018 12:28
Copy link
Member

@rwx788 rwx788 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks promising. Even though I miss experience of using s390x specific calls.

assert_screen 'linuxrc-shell';

# collect linuxrc logs
#$s3270->sequence_3270((String(\"cat /var/log/linuxrc.log\"), ENTER));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this line

output_delim => qr/LINUXRC_LOG_SAVED/,
timeout => 60
);
$r ? record_info 'Logs collected', 'Linuxrc logs can be found in autoinst-log.txt' : die "Could not save linuxrc logs";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'n not sure how exactly it sequence_3270 works, but will it be in autoinst log, or in serial or in both?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only in autoinst-log.txt


# collect linuxrc logs
#$s3270->sequence_3270((String(\"cat /var/log/linuxrc.log\"), ENTER));
$s3270->sequence_3270("String(\"cat /var/log/linuxrc.log && echo 'LINUXRC_LOG_SAVED'\")", "ENTER",);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we don't need comma in the end

Copy link
Member

@okurz okurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great achievement already!

@@ -15,6 +15,7 @@
use base "installbasetest";

use testapi;
use opensusebasetest;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this module ISA installbasetest which ISA opensusebasetest so I do not get why this should be needed

my $s3270 = console('x3270');
my $r;

if (check_screen 'linuxrc') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meh, as you probably know by know I consider a check_screen with default timeout a bad practice but this time, being in the post_fail_hook … ok

output_delim => qr/LINUXRC_LOG_SAVED/,
timeout => 60
);
$r ? record_info 'Logs collected', 'Linuxrc logs can be found in autoinst-log.txt' : die "Could not save linuxrc logs";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only in autoinst-log.txt


# Collect Linuxrc logs
type_line_svirt "'cat /var/log/linuxrc.log > /dev/$serialdev && echo 'LINUXRC_LOG_SAVED' > /dev/$serialdev'";
wait_serial "LINUXRC_LOG_SAVED" ? record_info 'Logs collected', 'Linuxrc logs can be found in serial0.txt' : die "could not collect linuxrc logs";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all three type_line_svirt+wait_serial tuples: type_line_svirt has the "expect" parameter, see opensusebasetest::rewrite_static_svirt_network_configuration how it's used. So the section could/should be rewritten as:

    # Enter Linuxrc extra mode
    type_line_svirt 'x', expect => 'Linuxrc extras';

    # Start linuxrc shell
    type_line_svirt '3', expect => 'ttysclp0:install';

    # Collect Linuxrc logs
    type_line_svirt "'cat /var/log/linuxrc.log > /dev/$serialdev && echo 'LINUXRC_LOG_SAVED' > /dev/$serialdev'";
    wait_serial "LINUXRC_LOG_SAVED" ? record_info 'Logs collected', 'Linuxrc logs can be found in serial0.txt' : die "could not collect linuxrc logs";

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Didn't know that. Will change

@okurz
Copy link
Member

okurz commented Mar 28, 2018

needles merged

@Soulofdestiny
Copy link
Contributor Author

updated - will retrigger verification runs to be sure

@Soulofdestiny
Copy link
Contributor Author

@okurz okurz merged commit b24dcb9 into os-autoinst:master Mar 29, 2018
Soulofdestiny added a commit to Soulofdestiny/os-autoinst-distri-opensuse that referenced this pull request Mar 29, 2018
pevik pushed a commit to pevik/os-autoinst-distri-opensuse that referenced this pull request Apr 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants