diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-10-01 14:28:04 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-10-01 14:28:04 -0400 |
commit | 4fb4b31a889f9f6c32290b4fde99edbcd30a3660 (patch) | |
tree | 07c18bd6881441f7f686f6ce9eaf59113c04a3b4 /cloudinit | |
parent | 96a5532ed39ace7ec7b80978387e26c9b203200f (diff) | |
download | vyos-cloud-init-4fb4b31a889f9f6c32290b4fde99edbcd30a3660.tar.gz vyos-cloud-init-4fb4b31a889f9f6c32290b4fde99edbcd30a3660.zip |
add debug statement for recommended
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/config/cc_mounts.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py index ded0f413..db09d2fb 100644 --- a/cloudinit/config/cc_mounts.py +++ b/cloudinit/config/cc_mounts.py @@ -116,10 +116,15 @@ def suggested_swapsize(memsize=None, maxsize=None, fsys=None): size = min(func(memsize), maxsize) # if less than 1/2 memory and not much, return 0 if size < (memsize / 2) and size < 4 * GB: - return 0 - return size + size = 0 + break + break - return maxsize + if size is not None: + size = maxsize + LOG.debug("suggest %s for %s memory with %s available disk and max=%s", + size, memsize, avail, maxsize) + return size def setup_swapfile(fname, size=None, maxsize=None): |