yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #81542
[Bug 1862417] Re: cloud-init: Attempt to mkswap on a partition fails: invalid block count argument: ''
<minfrin> The machine I'm working on uses cloud-init to update itself, it might only have the fix after the updates.
<rharper> ah, interesting
<rharper> cat /etc/cloud/build.info
<rharper> that'll give us a point in time for which version you have
<rharper> and I suspect you're right, the top of your cloud-init.log will the original version
<minfrin> build_name: serverserial: 20190514
<minfrin> Definitely way older than the PR.
<rharper> yep
<minfrin> I suspect the fix in our case is to use the latest image of Ubuntu from end Jan 2020.
<rharper> yep
** Changed in: cloud-init
Status: Incomplete => Invalid
--
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:
Invalid
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
References