[Bug 1410824] Re: Swap space with mounts module not working
Scott Moser
smoser at ubuntu.com
Thu Jan 15 15:48:03 UTC 2015
Hi,
what version of cloud-init are you using?
This functionality is only availble in trunk since 2014-10-01. It is only in Ubuntu vivid and utopic, not in trusty.
That said, I just launched an instance with this config:
#cloud-config
swap:
size: auto
filename: /swap.img
maxsize: 8G
/var/log/cloud-init.log says:
Jan 15 15:33:18 vivid-20150115-153256 [CLOUDINIT] cc_mounts.py[DEBUG]: suggest 8182 MB swap for 7984 MB memory with '9092 MB' disk given max=8192 MB [max=8182 MB]'
Jan 15 15:33:32 vivid-20150115-153256 [CLOUDINIT] util.py[DEBUG]: creating swap file '/swap.img' of 8182MB took 14.301 seconds
$ ls -lh /swap.img ; du /swap.img
-rw------- 1 root root 8.0G Jan 15 15:33 /swap.img
8378372 /swap.img
$ free
total used free shared buffers cached
Mem: 8176028 8009932 166096 308 9280 7680480
-/+ buffers/cache: 320172 7855856
Swap: 8378364 0 8378364
Launching another instance without the specified 'max' gives me:
Jan 15 15:44:41 vivid-20150115-154415 [CLOUDINIT] cc_mounts.py[DEBUG]: suggest 2273 MB swap for 7984 MB memory with '9092 MB' disk given max=None [max=2273 MB]'
The algorithm for 'auto' is agreeably nebulus, but I feel that any algoritm is going to seem odd/broken for some set.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1410824
Title:
Swap space with mounts module not working
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410824/+subscriptions
More information about the Ubuntu-server-bugs
mailing list