yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #81541
[Bug 1862417] [NEW] cloud-init: Attempt to mkswap on a partition fails: invalid block count argument: ''
Public bug reported:
If an attempt is made to configure a swap partition on an Ubuntu Bionic
machine as follows (not a swap file, a swap partition), the attempt to
mkswap fails.
The expected behaviour is that mkswap and swapon are executed correctly,
and /dev/xvdg becomes a valid swap disk. In addition, when filename
points at a partition, size and maxsize should be ignored.
fs_setup:
- label: vidi
device: /dev/xvde
filesystem: ext4
- label: swap
device: /dev/xvdg
filesystem: swap
mounts:
- [ /dev/xvde, /var/lib/vidispine, ext4, defaults, 0, 0 ]
- [ /dev/xvdg, none, swap, sw, 0, 0 ]
swap:
filename: /dev/xvdg
size: auto
maxsize: 17179869184
mount_default_fields: [ None, None, "auto", "defaults", "0", "2" ]
When the machine starts up for the first time, the following error is
logged after the swap size parameter is passed as the empty string:
2020-02-07 20:21:55,242 - cc_disk_setup.py[WARNING]: Force flag for swap is unknown.
2020-02-07 20:21:55,255 - util.py[WARNING]: Failed during filesystem operation
Failed to exec of '['/sbin/mkswap', '/dev/xvdg', '-L', 'swap', '']':
Unexpected error while running command.
Command: ['/sbin/mkswap', '/dev/xvdg', '-L', 'swap', '']
Exit code: 1
Reason: -
Stdout:
Stderr: mkswap: invalid block count argument: ''
2020-02-07 20:21:55,530 - cc_mounts.py[WARNING]: Activate mounts: FAIL:swapon -a
2020-02-07 20:21:55,530 - util.py[WARNING]: Activate mounts: FAIL:swapon -a
** Affects: cloud-init
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1862417
Title:
cloud-init: Attempt to mkswap on a partition fails: invalid block
count argument: ''
Status in cloud-init:
New
Bug description:
If an attempt is made to configure a swap partition on an Ubuntu
Bionic machine as follows (not a swap file, a swap partition), the
attempt to mkswap fails.
The expected behaviour is that mkswap and swapon are executed
correctly, and /dev/xvdg becomes a valid swap disk. In addition, when
filename points at a partition, size and maxsize should be ignored.
fs_setup:
- label: vidi
device: /dev/xvde
filesystem: ext4
- label: swap
device: /dev/xvdg
filesystem: swap
mounts:
- [ /dev/xvde, /var/lib/vidispine, ext4, defaults, 0, 0 ]
- [ /dev/xvdg, none, swap, sw, 0, 0 ]
swap:
filename: /dev/xvdg
size: auto
maxsize: 17179869184
mount_default_fields: [ None, None, "auto", "defaults", "0", "2" ]
When the machine starts up for the first time, the following error is
logged after the swap size parameter is passed as the empty string:
2020-02-07 20:21:55,242 - cc_disk_setup.py[WARNING]: Force flag for swap is unknown.
2020-02-07 20:21:55,255 - util.py[WARNING]: Failed during filesystem operation
Failed to exec of '['/sbin/mkswap', '/dev/xvdg', '-L', 'swap', '']':
Unexpected error while running command.
Command: ['/sbin/mkswap', '/dev/xvdg', '-L', 'swap', '']
Exit code: 1
Reason: -
Stdout:
Stderr: mkswap: invalid block count argument: ''
2020-02-07 20:21:55,530 - cc_mounts.py[WARNING]: Activate mounts: FAIL:swapon -a
2020-02-07 20:21:55,530 - util.py[WARNING]: Activate mounts: FAIL:swapon -a
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1862417/+subscriptions
Follow ups