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

sosreport: Use "-v" instead of "-vvv" for verbose logging #17571

Merged
merged 1 commit into from Jul 20, 2022

Conversation

mvollmer
Copy link
Member

Using "-vvv" will write DEBUG messages to stdout which will all get
trasmitted to the browser and then mostly ignored there. With "-v",
DEBUG messages will still end up in the archive, but stdout will only
receive WARNING messages, as normal.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2107667

@mvollmer mvollmer requested a review from martinpitt July 18, 2022 09:56
@mvollmer mvollmer temporarily deployed to cockpit-dist July 18, 2022 10:01 Inactive
martinpitt
martinpitt previously approved these changes Jul 18, 2022
Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

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

Nice solution! 😉

@mvollmer mvollmer temporarily deployed to cockpit-dist July 18, 2022 10:58 Inactive
@@ -71,6 +71,7 @@ only-plugins=release,date,host,cgroups,networking
b.set_input_text("#sos-dialog .pf-c-form__group:contains(Report label) input", "mylabel")
b.set_input_text("#sos-dialog .pf-c-form__group:contains(Encryption passphrase) input", "foobar")
b.set_checked("#sos-dialog .pf-c-check:contains(Obfuscate) input", True)
b.set_checked("#sos-dialog .pf-c-check:contains(Use verbose logging) input", True)
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 please test the default as well, not only verbose mode.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, good point.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@martinpitt
Copy link
Member

Enabling the verbose option in the basic test broke pixels as well. Let's just do another sos run with verbosity and without a pixel test, and ensure that the tarball has debug messages?

@mvollmer mvollmer temporarily deployed to cockpit-dist July 19, 2022 08:48 Inactive
@mvollmer mvollmer requested a review from martinpitt July 19, 2022 08:56
@martinpitt
Copy link
Member

not ok 2 /static-code/test-flake8
# test/verify/check-sosreport:151:126: W605 invalid escape sequence '\['
# test/verify/check-sosreport:151:142: W605 invalid escape sequence '\]'

Plus some failures

@martinpitt martinpitt added the release-blocker Targetted for next release label Jul 20, 2022
Using "-vvv" will write DEBUG messages to stdout which will all get
trasmitted to the browser and then mostly ignored there.  With "-v",
DEBUG messages will still end up in the archive, but stdout will only
receive WARNING messages, as normal.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2107667

# There should be one archive and it should contain a bunch of debug messages
self.assertEqual(m.execute("ls -l /var/tmp/sosreport*mylabel*.tar.xz | wc -l").strip(), "1")
self.assertGreater(int(m.execute("tar --wildcards -xaOf /var/tmp/sosreport*mylabel*.tar.xz '*/sos_logs/sos.log' | grep -c 'DEBUG: \\[plugin:release\\]'")), 5)
Copy link
Member

Choose a reason for hiding this comment

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

OK like this, just for the future: you can use a Python raw string for that, i.e. r"DEBUG: \[".

@mvollmer mvollmer temporarily deployed to cockpit-dist July 20, 2022 07:43 Inactive
@martinpitt
Copy link
Member

kdump failure in C9S -- retrying, but this likely points out a recent regression. Not for this PR, but for my pilot radar.

@martinpitt
Copy link
Member

Meh, why is kdump and bonding broken on all TF tests all of a sudden!?

Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

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

Danke!

@martinpitt
Copy link
Member

Oh, your branch is behind 9 commits, I suppose that's why the TF tests look so sorry. They are quite alright in other current PRs. Ignoring for now, as this is RC.

@martinpitt
Copy link
Member

sos tests succeeded, the rest is due to cockpit-project/cockpituous#506. EOUTOFPATIENCE.

@martinpitt martinpitt merged commit 33639ff into cockpit-project:main Jul 20, 2022
32 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker Targetted for next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants