Skip to content

Conversation

@troglobit
Copy link
Contributor

Description

This PR adds a support script tailored for gathering system information. The recommended way of running the script is:

$ ssh user@device support collect > support-device-$(date -Iseconds).tar.gz

Also included is an initial prototype of a support analysis utility tool. Implemented in python using the textual framework, tui mode only atm., but possible to extend with a web front-end later on.

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

@jovatn jovatn added this to the Infix v25.11 milestone Dec 1, 2025
Copy link
Contributor

@wkz wkz left a comment

Choose a reason for hiding this comment

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

Excellent work! 🙏

Copy link
Contributor

@jovatn jovatn left a comment

Choose a reason for hiding this comment

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

LGTM! Note: I have only looked at user documentation and test documentation.
Perhaps you'd like to include gpg encryption in the test too?

@troglobit
Copy link
Contributor Author

troglobit commented Dec 1, 2025

LGTM! Note: I have only looked at user documentation and test documentation.

Thank you! 🙏

Perhaps you'd like to include gpg encryption in the test too?

I'd a good idea, I considered it myself first but decided against it since we don't have gpg installed on all builds. I'm mostly concerned that the data gathering might break in the future. The gpg tool is checked for in the script and is not load bearing. Update: I ended up adding this anyway since we now also have custom --work-dir PATH support and needed to verify that too.

This commit adds optional support for encrypting the tarball before it
leaves the target system.  Documentation and usage text updated.

Signed-off-by: Joachim Wiberg <[email protected]>
Also, adjust file suffix for json files.

Signed-off-by: Joachim Wiberg <[email protected]>
Sync with latest updates, including test path changes.

Signed-off-by: Joachim Wiberg <[email protected]>
@troglobit
Copy link
Contributor Author

@wkz would you mind having a final look and approve if you like what you see?

Copy link
Contributor

@wkz wkz left a comment

Choose a reason for hiding this comment

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

Super trooper! 🎖️

if os.path.exists(output_file):
os.remove(output_file)

if has_gpg:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if has_gpg:
if not has_gpg:
test.succeed()

Just for future endeavors: this pattern should work, IIRC. Avoids having to indent the whole following block 🤓

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, of course. Thanks!

@troglobit troglobit merged commit 76bc8da into main Dec 2, 2025
6 checks passed
@troglobit troglobit deleted the support branch December 2, 2025 14:22
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.

4 participants