summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Patterson <cpatterson@microsoft.com>2022-02-10 17:09:03 -0500
committerGitHub <noreply@github.com>2022-02-10 15:09:03 -0700
commit8d96687e558d87fd767bdba9dff71e406f9bcf39 (patch)
tree2f34078ef642d1dfc74b0ac548e82000866afa9e
parent600b870b399feb9e072748e07ea223556261fbe7 (diff)
downloadvyos-cloud-init-8d96687e558d87fd767bdba9dff71e406f9bcf39.tar.gz
vyos-cloud-init-8d96687e558d87fd767bdba9dff71e406f9bcf39.zip
mounts: fix mount opts string for ephemeral disk (#1250)
Fixes the spaces introduced in #1213 Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
-rw-r--r--cloudinit/config/cc_mounts.py2
-rw-r--r--tests/integration_tests/modules/test_disk_setup.py8
2 files changed, 9 insertions, 1 deletions
diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py
index a81ae952..83eb5b1b 100644
--- a/cloudinit/config/cc_mounts.py
+++ b/cloudinit/config/cc_mounts.py
@@ -393,7 +393,7 @@ def handle(_name, cfg, cloud, log, _args):
uses_systemd = cloud.distro.uses_systemd()
if uses_systemd:
def_mnt_opts = (
- "defaults,nofail, x-systemd.requires=cloud-init.service, _netdev"
+ "defaults,nofail,x-systemd.requires=cloud-init.service,_netdev"
)
defvals = [None, None, "auto", def_mnt_opts, "0", "2"]
diff --git a/tests/integration_tests/modules/test_disk_setup.py b/tests/integration_tests/modules/test_disk_setup.py
index 8f9d5f40..76c132ad 100644
--- a/tests/integration_tests/modules/test_disk_setup.py
+++ b/tests/integration_tests/modules/test_disk_setup.py
@@ -73,6 +73,14 @@ class TestDeviceAliases:
assert sdb["children"][0]["mountpoint"] == "/mnt1"
assert sdb["children"][1]["name"] == "sdb2"
assert sdb["children"][1]["mountpoint"] == "/mnt2"
+ result = client.execute("mount -a")
+ assert result.return_code == 0
+ assert result.stdout.strip() == ""
+ assert result.stderr.strip() == ""
+ result = client.execute("findmnt -J /mnt1")
+ assert result.return_code == 0
+ result = client.execute("findmnt -J /mnt2")
+ assert result.return_code == 0
PARTPROBE_USERDATA = """\