RFE - Implement debug hooks
Bug #1962191 reported by
Nate Sias
This bug affects 5 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
Undecided
|
Unassigned |
Bug Description
Filed on behalf of client.
Requesting snap-native method of returning debug info akin to anonymouse64's snap-debug-info.sh (https:/
Per original ticket:
```
We need a way to collect the snap info to be triggered remotely from within a snap, this is currently not supported.
This sort of info:
https:/
We currently collect the syslog so if it could be triggered to be written to syslog somehow that would work.
```
Best regards,
~ Nate
affects: | snapcraft → snapd |
Changed in snapd: | |
status: | New → Triaged |
To post a comment you must log in.
Hi Nate, thanks for filing this!
Can you please double-check with the client whether that "remotely" is meant to mean that the data collection must be triggered by a remote machine or if it's just a word which accidentally ended up in the sentence (because, from the rest of the message it seems that the data collection should all happen locally)?
As for a snap requesting for collection of local debug data, I think that this is a good idea. We just need to make sure that the generated data is not stored in a location where unprivileged snaps can access it, and then we could make this work without the need of any special privileges.
It could be something like
snapctl debug-report -k -u snapd -f extra_file.log -f more_logs.txt
where -k and -u options are forwarded to journalctl, and -f means to include one log file generated by the snap itself. The path of the created report file could be printed out on stdout, so that the snap could prompt the user to upload it to wherevere it's needed.