Public bug reported:

The cloud config settings

# swap can also be set up by the 'mounts' module
# default is to not create any swap files, because 'size' is set to 0
swap:
   filename: /swap.img
   size: "auto" or size in bytes
   maxsize: size in bytes

will not result in a swap space.

Some big questions are present with respect to the operational logic
behind this cloud config setting:

a) which (underlying) command is used to create the swap space? 
b) is being made use of sparse files? (not desirable for swap. Answer is 
probably "not", given "size: auto" option)
c) what are the requirements for creation of swap? (should a partition exist 
and/or should the partition type be 82. Answer is probably "no", given the fact 
that a swap file is created)

In essence, some problems encountered when creating swap manually
(instead of using the swap config setting):

1) when creating a swap file on the ephemeral disk: mkswap does not work 
probably (error: ...should at least be 40Kib)
2) when creating a separate partition of type 83 (hence preventing mkswap 
errors): 

- swap file (manually created) exists, but is not active as swap, 
- swap file (using the swap config setting) does not exist, 

3) when creating a swap partition (of type 82): swap is not active
and/or not mounted (and swap file creation therefore fails)

Note the use of partitions is not desirable for swap purposes, the sole
intent was to test for the causes of failure.

Finally, some additional documentation for creating swap space with
cloud-config would be (very) desirable).

Kind regards....

** Affects: cloud-init (Ubuntu)
     Importance: Undecided
         Status: New

-- 
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

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to