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

unattended_install: Two tweaks to attempt_to_log_useful_files #2489

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ldoktor
Copy link
Contributor

@ldoktor ldoktor commented Mar 25, 2020

The commands might not be available on the systems or might fail for a different reason so let's just rely on errors from files logging. Also add "udevadm" dump on failure.

ldoktor added 2 commits March 25, 2020 13:16
Currently when the command is not available on the target distro another
loop will be initiated on the next available session (serial console).
Let's just rely on the files to prove the session is stable and ignore
the status for commands.

Signed-off-by: Lukáš Doktor <[email protected]>
This dump is very useful when looking for udev issues.

Signed-off-by: Lukáš Doktor <[email protected]>
@@ -1217,7 +1217,7 @@ def attempt_to_log_useful_files(test, vm):
fd_dst.write("Unknown exception while getting "
"content: %s" % details)
failures = True
for cmd in ["journalctl --no-pager"]:
for cmd in ["journalctl --no-pager", "udevadm info --export-db"]:
Copy link

Choose a reason for hiding this comment

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

@ldoktor cmd run once is enough, That code should not be in the outermost loop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In case there are no failures, the commands will only be executed just once. Otherwise it makes sense to execute them multiple times as it's likely they failed to execute as well (this usually happens when net becomes unusable).

Copy link
Contributor

Choose a reason for hiding this comment

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

This may be a question I've asked before (during the initial feature review), but doesn't this make it possible to overwrite dst file in a different iteration of the loop (over sessions)? Shouldn't this:

  1. Check if dst exists
  2. If not, run the command
  3. If successful, create the dst file with the content from the command

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, each iteration uses a different direcotry (see line 1221). In case of a failure it might be useful to have multiple copies and usually it PASSes so one ends up with a sigle dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants