2017-01-17 13:38:31 |
Louis Bouchard |
description |
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 |
[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 |
|