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

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

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:

   sosreport-cloudserver-r024n17-20191111115506.tar.xz

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:

   sosreport-cloudserver-r024n17.456-20191111120325.tar.xz

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: https://github.com/sosreport/sos/pull/1819

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

Remote bug watches

Bug watches keep track of this bug in other bug trackers.