Support collect - #1632
Draft
mattiaswal wants to merge 15 commits into
Draft
Support collect#1632mattiaswal wants to merge 15 commits into
mattiaswal wants to merge 15 commits into
Conversation
mattiaswal
force-pushed
the
support-collect
branch
2 times, most recently
from
September 17, 2026 12:32
4381677 to
f3fbfa2
Compare
The support script was installed by the bin package, and its -p option relied on gpg being in the image only as a side effect of podman pulling in libgpgme. Give it a package of its own with an encrypt option that selects gnupg2, enabled in all non-minimal defconfigs, so the dependency is explicit. The WebUI calls the tool, so it selects the package. Signed-off-by: Mattias Walström <lazzer@gmail.com>
One wedged command stalled the whole collection, and the EXIT trap removed the log a failed run needed, which is why #1303 closed without a root cause. -o FILE writes the archive to a file so a dropped session does not lose the only copy. Signed-off-by: Mattias Walström <lazzer@gmail.com>
Lets clients that only speak the management protocol collect support data. Archives up to 16 MiB come back base64 encoded, larger ones stay on the device, and the RPC is nacm:default-deny-all like install-bundle since the archive carries password hashes and logs. Signed-off-by: Mattias Walström <lazzer@gmail.com>
No transport could read an RPC reply, and ssh ran with LogLevel QUIET, which turned a dead transport into a bare exit code 255. That is why the support_collect flake in #1303 never got a root cause. Signed-off-by: Mattias Walström <lazzer@gmail.com>
Streaming the archive over ssh made a dead transport look like a failed collection, and the collection.log fallback could never work since the tool removes the file. Signed-off-by: Mattias Walström <lazzer@gmail.com>
The status check in rpc_output() was dead code, so callers only saw the status line. The reason is in the body, which is how support_collect tells a device without gpg from a real failure. Signed-off-by: Mattias Walström <lazzer@gmail.com>
sysrepo raises it when the callback finishes after the caller's timeout has expired, and the handler ran the whole collection a second time, with confd blocked for the duration. Signed-off-by: Mattias Walström <lazzer@gmail.com>
libxml2 refuses text nodes over 10 MB and netconf_client's receive thread dies silently on the error, so a support-collect archive over about 7.5 MB timed out after 120 s with no message at all. That is the failure on alder, where the logs at the end of a full run push the archive past that. Signed-off-by: Mattias Walström <lazzer@gmail.com>
libxml2 stops at 10 MB text nodes, so a stock lxml or ncclient cannot receive an archive above about 7.5 MB without XML_PARSE_HUGE. Signed-off-by: Mattias Walström <lazzer@gmail.com>
It was in gpg's argv, readable by any local process while the archive was being written. Hand it over on a private descriptor, give gpg a throwaway home so its agent stays out of /root, and read the prompted line verbatim. Signed-off-by: Mattias Walström <lazzer@gmail.com>
The event session's user is confd's own, root, the NETCONF username travels as originator data. An oversized archive stays in its 0700 directory instead of under a predictable name in the shared /tmp, cleanup is recursive, and a password with a line break is rejected since the tool reads one line. Signed-off-by: Mattias Walström <lazzer@gmail.com>
Any exception passed as denied, a login failure included, and a host without gpg silently skipped the decrypt step. Signed-off-by: Mattias Walström <lazzer@gmail.com>
Exports a datastore without its secrets, the way NACM filters them for a user without read access. The models already mark what is secret, so new ones are covered as they come. The user password in ietf-system predates the convention and is matched by name. Signed-off-by: Mattias Walström <lazzer@gmail.com>
Private keys, password hashes and RADIUS secrets are of no use to support and a hazard in transit. Export the datastores with copy -r and drop the environment dump. --no-redact keeps them, the RPC always redacts. Signed-off-by: Mattias Walström <lazzer@gmail.com>
mattiaswal
force-pushed
the
support-collect
branch
from
September 17, 2026 12:32
f3fbfa2 to
ce1674d
Compare
This is tracked by #1614 when it is fixed, this test should be removed, but for now, we hide the issue. No need to stop tests for this issue, that is tracked but unplanned.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist
Tick relevant boxes, this PR is-a or has-a: