canonical / canonical/cloud-init

Archlinux Netctl Bringup

Open
#2,991 2 comments 0 reactions 0 assignees View on GitHub
bug launchpad
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: #1714495](https://bugs.launchpad.net/cloud-init/+bug/1714495)

Launchpad details

affected_projects = []

assignee = None
assignee_name = None
date_closed = None
date_created = 2017-09-01T12:33:25.522556+00:00
date_fix_committed = None
date_fix_released = None
id = 1714495
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1714495
milestone = None
owner = rlees85
owner_name = Rich Lees
private = False
status = confirmed
submitter = rlees85
submitter_name = Rich Lees
tags = []
duplicates = []

_Launchpad user **Rich Lees(rlees85)** wrote on 2017-09-01T12:33:25.522556+00:00_

I have been banging my head a bit with this one, especially as I am sure it *used* to work although in theory it should never have done! I would imagine a systemd update would have broken things.

I can't get cloud-init to configure the network when using `distro: arch`. What seems to happen is this:

  - systemd looks at current units/services to start and begins boot.
  - cloud-init-local.service runs, mode in cmd/main.py is 'local'.
  - init.apply_network_config happens with bringup=False.
  - arch.py writes out a netctl config and enables it using netctl reenable enp0s3.
  - netctl creates a new systemd unit (netctl@enp0s3) and enables it
  - systemd list of services already resolved, so does not start netctl@enp0s3 as it was created after the boot process started

So after the system is fully brought up, the interface is configured but NOT started. A subsequent reboot makes the network become available.

A few things and thoughts:

  - I tried making bringup=True by force but cloud-init-local is too early in the boot process and netctl barfs when trying to do a restart on an interface here.
  - Debian and RHEL based seem to have their own ways of managing network that involve putting files in a certain place that an *already existing* service then comes along and processes later.
  - Tried from "master" and from 0.7.9.tar.gz

I can't think of a way netctl could ever work with cloud-init. Possibly using systemd-networkd instead would be wise but then things like Vagrant and no doubt other "cloud" providers expect Arch to be using netctl.

Thoughts? Ideas? Even a .patch so I can bodge something to work would be a big help right now but everything I have tried fails for one reason or another.

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.