canonical / canonical/cloud-init

19.04 minimal images on GCE intermittently fail to set up networking

Open
#3,361 7 comments 0 reactions 0 assignees View on GitHub
launchpad priority
Dominant language
Python
Stars
3.8k
Forks
1.1k
Avg merge
2d 23h
Merged PRs (30d)
18

Description

This bug was originally filed in Launchpad as [LP: #1822353](https://bugs.launchpad.net/cloud-init/+bug/1822353)

Launchpad details

affected_projects = []

assignee = None
assignee_name = None
date_closed = 2020-11-07T04:17:19.483991+00:00
date_created = 2019-03-29T17:26:50.547993+00:00
date_fix_committed = None
date_fix_released = None
id = 1822353
importance = high
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1822353
milestone = None
owner = philroche
owner_name = Philip Roche
private = False
status = expired
submitter = philroche
submitter_name = Philip Roche
tags = ['id-5c7fbddcf1364b63892a22c9', 'id-5c9d168ed6c5704cac05e595', 'id-5d0a33dc7c02f24574ae04aa']
duplicates = []

_Launchpad user **Philip Roche(philroche)** wrote on 2019-03-29T17:26:50.547993+00:00_

Related to https://bugs.launchpad.net/cloud-init/+bug/1766287 I'd like to open a new bug following Disco minimal images failing to set up networking due to similar reasons as lp:1766287 with the only difference being that no nic was found.

A workaround was found to set up cloud-init service config:

/etc/systemd/system/cloud-init-local.service.d/gcp.conf
```
[Unit]
After=systemd-udev-trigger.service

[Service]
ExecStartPre=/bin/udevadm settle
```

The goal of this workaround is to:

1) ensure that cloud-init-local.service runs after
systemd-udev-trigger.service starts (this is what triggers
udev coldplug events, like plugging in the nic)
2) Run udevadm settle before we start cloud-init local so that any
nic processing is completed before cloud-init starts looking for
a nic.

Currently this is only required on minimal images but there is a
chance it could occur in base images too should they boot quick
enough. Minimal disco does not have snap preseeding as base images do and
due to snap preseeding running before cloud-init it makes it extremely unlikely to
happen in base images.

I understand that cloud-init might not be the place to fix the issue for all images but I'd like to re-open this bug to start that discussion.

I have attached cloud-init logs, netplan yaml, image manifest and sosreports from an instance that failed to set up networking.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.