swapon: unrecognized option '--show'

Bug #1635722 reported by Felipe Reyes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sosreport (Ubuntu)
Invalid
Undecided
Unassigned
Trusty
Invalid
Medium
Louis Bouchard

Bug Description

[SRU justification]
The memory.py plugin generate an error

[Impact]
The swapon information is unavailable on Trusty

[Fix]
Replace command by 'swapon -s'

[Test Case]
Run the sosreport memory plugin :
$ sudo sosreport --batch -omemory

Without the patch, the file sos_commands/memory/swapon_--bytes_--show will only contain an error. With the patch, the file will be replaced by sos_commands/memory/swapon_-s which will contain the result of swapon -s

[Regression]
None, only one command replaced

[Original description of the problem]
swapon from trusty, used by sosreport since 3.2, doesn't support the option --show.

sos_commands/memory/swapon_--bytes_--show
swapon: unrecognized option '--bytes'

Usage:
 swapon [options] [<spec>]

Options:
 -a, --all enable all swaps from /etc/fstab
 -d, --discard discard freed pages before they are reused
 -e, --ifexists silently skip devices that do not exis
 -f, --fixpgsz reinitialize the swap space if necessary
 -h, --help display help and exit
 -p, --priority <prio> specify the priority of the swap device.
 -s, --summary display summary about used swap devices and exit
 -v, --verbose verbose mode
 -V, --version display version and exit

The <spec> parameter:
 -L <label> LABEL of device to be used
 -U <uuid> UUID of device to be used
 LABEL=<label> LABEL of device to be used
 UUID=<uuid> UUID of device to be used
 <device> name of device to be used
 <file> name of file to be used

Tags: sts
Revision history for this message
Felipe Reyes (freyes) wrote :

this is a problem since 3.2+git276-g7da50d6-2 , the version available in trusty-backport is not affected.

tags: removed: trusty
Louis Bouchard (louis)
Changed in sosreport (Ubuntu):
status: New → Fix Released
Changed in sosreport (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Louis Bouchard (louis-bouchard)
Louis Bouchard (louis)
Changed in sosreport (Ubuntu):
status: Fix Released → Invalid
Louis Bouchard (louis)
description: updated
Changed in sosreport (Ubuntu Trusty):
status: Triaged → Invalid
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.