Merge ~bladernr/plainbox-provider-checkbox:add-sosreport-job into plainbox-provider-checkbox:master

Proposed by Jeff Lane 
Status: Merged
Approved by: Jeff Lane 
Approved revision: c727cf315f546ca939aed0c100c38f812ac8d720
Merged at revision: bdfca11de6c0670b49f759f3162bd5643a7fa1b2
Proposed branch: ~bladernr/plainbox-provider-checkbox:add-sosreport-job
Merge into: plainbox-provider-checkbox:master
Diff against target: 28 lines (+20/-0)
1 file modified
jobs/miscellanea.txt.in (+20/-0)
Reviewer Review Type Date Requested Status
Jonathan Cave (community) Approve
Jeff Lane  Needs Resubmitting
Review via email: mp+327137@code.launchpad.net

Description of the change

Add new sosreport job to generate a baseline sosreport for support to use if needed for support cases.

To post a comment you must log in.
Revision history for this message
Jonathan Cave (jocave) wrote :

I think miscellanea/sosreport needs resource requirements added to make sure sosreport is available.

Given we are moving to provide support for the server plans in checkbox delivered both by deb and snap the pattern we have been using is:

requires:
 package.name == 'sosreport' or executable.name == 'sosreport'

(Excutable may not always be same as package name!)

review: Needs Fixing
Revision history for this message
Jeff Lane  (bladernr) wrote :

Added. I don't get specifcying exectuable.name if it's the same, nor can I see specifcying both, when one is sufficient.

For example, why is:

requires: executable.name == 'foo'
OR
requires package.name == 'bar'

not sufficient on their own?

If it's requires: package.name = 'bar'

it's pretty safe to assume that the script knows to call executable foo, otherwise it won't work.

IN any case, sosreport is part of the default server seed, so it's always there. I've added a requirement for the package to be there, that should be sufficient, and the executable will always be called 'sosreport'. That is unlikely to ever change, as it is an industry wide recognized tool for gathering support information.

Revision history for this message
Jeff Lane  (bladernr) :
review: Needs Resubmitting
Revision history for this message
Jonathan Cave (jocave) wrote :

Thanks for the requires field.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/miscellanea.txt.in b/jobs/miscellanea.txt.in
2index dc79a32..6dec07d 100644
3--- a/jobs/miscellanea.txt.in
4+++ b/jobs/miscellanea.txt.in
5@@ -334,3 +334,23 @@ _steps:
6 2. Compare items on System Manifest to the devices known to udev
7 _verification:
8 Do the devices reported by udev match the devices on the Manifest?
9+
10+plugin: shell
11+category_id: com.canonical.plainbox::miscellanea
12+estimated_duration: 20.0
13+id: miscellanea/sosreport
14+user: root
15+requires: executable.name == 'sosreport'
16+command: sosreport --batch --tmp-dir $PLAINBOX_SESSION_SHARE
17+_summary: Generate baseline sosreport
18+_description: Generates a baseline sosreport of logs and system data
19+
20+plugin: attachment
21+category_id: com.canonical.plainbox::miscellanea
22+estimated_duration: 5.0
23+id: miscellanea/sosreport_attachment
24+depends: miscellanea/sosreport
25+user: root
26+command:
27+ SOSFILE=`ls -t $PLAINBOX_SESSION_SHARE/sosreport*xz | head -1`; [ -e ${SOSFILE} ] && base64 $SOSFILE
28+_summary: Attach the baseline sosreport file

Subscribers

People subscribed via source and target branches