Skip to content

Commit

Permalink
mounts: fix mount opts string for ephemeral disk
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
  • Loading branch information
cjp256 committed Feb 7, 2022
1 parent 826783d commit 5cc8149
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cloudinit/config/cc_mounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
4 changes: 4 additions & 0 deletions tests/integration_tests/modules/test_disk_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ def test_device_alias(self, create_disk, client: IntegrationInstance):
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() == ""


PARTPROBE_USERDATA = """\
Expand Down

0 comments on commit 5cc8149

Please sign in to comment.