Passing --label or --name (deprecated) does nothing

Bug #1852104 reported by David A. Desrosiers
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sosreport (Ubuntu)
Fix Released

Bug Description

When using v3.6 of sosreport and creating a sosreport with the default values, for example an hourly sosreport that is created via cron, using a syntax like the following:

   sosreport --batch -a --all-logs -z xz -t 16 --verify --label hourly

The '--label' option here doesn't actually apply the label it claims to, per the manpage:

   --label LABEL
   Specify an arbitrary identifier to associate with the archive.
   Labels will be appended after the system's short hostname and may
   contain alphanumeric characters.

The resulting sosreport gets named as follows:


I would expect to see 'hourly' in the resulting report name as the intended label.

While testing this, I also noticed that --case-id is ignored as well:

   sosreport --batch -z xz -t 16 --verify --label foo --case-id 123 --ticket-number 456

This generates a sosreport with the following name, but is missing the '123' passed above:


My intent was to create an hourly sosreport that can be overwritten, because it will always be created with the same name, vs. creating a directory of pooled sosreports that have to be cleaned up later on with another reaping script.

Tags: bitesize
Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Indeed, I also recently found this issue.

This is fixed from this PR:

Revision history for this message
Bryce Harrington (bryce) wrote :

From the linked fix, it seems that sosreport supports two styles of name-patterns for the output, a 'legacy' one and a 'friendly' one. --label and --case-id only have an effect when the 'friendly' name pattern is in use, but for Debian/Ubuntu, the code comes configured to use the 'legacy' style.

The fix is simple enough, the main question is if changing how the output files are named could potentially be disruptive to users if this were SRU'd.

Changed in sosreport (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
tags: added: bitesize
Revision history for this message
Eric Desrochers (slashd) wrote :

'friendly' pattern will enable label in 3.9 version -> LP: #1862830

The sosreport version bump in stable release is currently in progress.

Changed in sosreport (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers