Archlinux Bugs

Bug #1706593 reported by Rich Lees
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Unassigned

Bug Description

This is a copy of an existing bug report, except the patch is created from the latest master and by myself who has signed the Canonical agreement.

Taken from: https://bugs.launchpad.net/cloud-init/+bug/1555605

I needed to patch a few places in distros/arch.py to get cloud-init to work on Arch. This is with an OpenNebula-based cloud, but that shouldn't matter. In /etc/cloud/cloud.cfg I obviously used "arch" for system_info -> distro.

I checked against current trunk version of distros/arch.py. There's 3 issues in arch.py that this patch fixes (in order of appearance in the patch):

1. The loopback device is returned as an entry by net_util.translate_network(), leading to it gettingprocessed to configure settings like IP address, netmask, etc, but these aren't available and leads to an exception. I simply removed the "lo" entry from the dictionary.

2. The netctl command expects its profile files to be named /etc/netctl/<iface>. The code in arch.py leaves out the last separator, leading to files like /etc/netctleth0, which doesn't work

3. The function convert_resolv_conf() can't possibly work, as it tries to iterate over the "list" type instead of the "settings" list.

Related branches

Revision history for this message
Rich Lees (rlees85) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

Hi,
I'd put a bit of work into the arch code (discussion that lead to it at [1]).
See my branch [2] which I'm pretty sure fixes '2' and '3' above, and adds some unit tests that can be extended to fix and validate '1'.

I can add the change for '1' , and submit a merge proposal if you (Rich) will review and validate.

--
[1] https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/327914
[2] https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+ref/bug/1663045-archlinux-empty-dns

Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Rich Lees (rlees85) wrote :

Hi Scott,

Thanks for the reply.

I agree that:

https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+ref/bug/1663045-archlinux-empty-dns

Solves issue 2 (and probably loads of other things that are not listed here).

Issue 3 is already solved on Master and I can't see how the changes you make affect that.

I would be more than happy to review/validate/test locally if you were to extend the existing/create a new merge to fix issue 1.

Revision history for this message
Scott Moser (smoser) wrote :

The fix for 1 (loopback device) and 2 (path for netctl config) are in
  https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/328114

You're right about 3. I'm not sure when that got fixed, looking at logs I dont see it quickly. But I dont think it is a problem now, and the test I've added verifies a simple nameserver field gets populated.

Please go ahead and comment in the merge proposal and I can pull that.
Thanks.
Scott

Scott Moser (smoser)
Changed in cloud-init:
status: Confirmed → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote : Fixed in Cloud-init 17.1

This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.