Skip to content

Commit

Permalink
Add _netdev option to mount Azure ephemeral disk (#1213)
Browse files Browse the repository at this point in the history
The ephemeral disk depends on a functional network to be mounted. Even
though it depends on cloud-init.service, sometimes an ordering cycle is
noticed on the instance. If the option "_netdev" is added the problem is
gone.

rhbz: #1998445

Signed-off-by: Eduardo Otubo otubo@redhat.com
  • Loading branch information
otubo authored Feb 4, 2022
1 parent aa47ec0 commit a1cfd1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cloudinit/config/cc_mounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,9 @@ def handle(_name, cfg, cloud, log, _args):
def_mnt_opts = "defaults,nobootwait"
uses_systemd = cloud.distro.uses_systemd()
if uses_systemd:
def_mnt_opts = "defaults,nofail,x-systemd.requires=cloud-init.service"
def_mnt_opts = (
"defaults,nofail, x-systemd.requires=cloud-init.service, _netdev"
)

defvals = [None, None, "auto", def_mnt_opts, "0", "2"]
defvals = cfg.get("mount_default_fields", defvals)
Expand Down

0 comments on commit a1cfd1b

Please sign in to comment.