diff options
| author | zsdc <taras@vyos.io> | 2020-12-25 17:52:03 +0200 |
|---|---|---|
| committer | zsdc <taras@vyos.io> | 2020-12-25 17:52:03 +0200 |
| commit | 526c2760b85ff625a10f4a1c9ba83759d8de1441 (patch) | |
| tree | c7a87d78a7944dd6a9d02544d1605f3a7d77e313 /cloudinit/config/cc_mounts.py | |
| parent | 66dc53b1b3f8786f3bbb25e914c1dc8161af0494 (diff) | |
| parent | 47f4229ebcef9f83df8b549bb869a2dbf6dff17c (diff) | |
| download | vyos-cloud-init-526c2760b85ff625a10f4a1c9ba83759d8de1441.tar.gz vyos-cloud-init-526c2760b85ff625a10f4a1c9ba83759d8de1441.zip | |
T2117: Cloud-init updated to 20.4
Merged with 20.4 tag from the upstream Cloud-init repository
Diffstat (limited to 'cloudinit/config/cc_mounts.py')
| -rw-r--r-- | cloudinit/config/cc_mounts.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py index 54f2f878..c22d1698 100644 --- a/cloudinit/config/cc_mounts.py +++ b/cloudinit/config/cc_mounts.py @@ -255,8 +255,9 @@ def create_swapfile(fname: str, size: str) -> None: try: subp.subp(cmd, capture=True) except subp.ProcessExecutionError as e: - LOG.warning(errmsg, fname, size, method, e) + LOG.info(errmsg, fname, size, method, e) util.del_file(fname) + raise swap_dir = os.path.dirname(fname) util.ensure_dir(swap_dir) @@ -269,9 +270,8 @@ def create_swapfile(fname: str, size: str) -> None: else: try: create_swap(fname, size, "fallocate") - except subp.ProcessExecutionError as e: - LOG.warning(errmsg, fname, size, "dd", e) - LOG.warning("Will attempt with dd.") + except subp.ProcessExecutionError: + LOG.info("fallocate swap creation failed, will attempt with dd") create_swap(fname, size, "dd") if os.path.exists(fname): |
