swapon: unrecognized option '--show'

Bug #1635722 reported by Felipe Reyes on 2016-10-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sosreport (Ubuntu)
Undecided
Unassigned
Trusty
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 Edit Tag help
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) on 2017-01-10
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) on 2017-01-17
Changed in sosreport (Ubuntu):
status: Fix Released → Invalid
Louis Bouchard (louis) on 2017-01-17
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers