#174 network not coming up in fah25 qcow2
Closed: Fixed 7 years ago Opened 7 years ago by jasonbrooks.

As reported on the ML, when the current fedora 25 atomic qcow2 image comes up, the default nic is down.

On first boot, clout-init generates an ifcg-eth0 that contains "NM_CONTROLLED=no". if there's already an ifcfg-eth0 in place, cloud-init will overwrite it with one that disables NM. Our kickstart disables the network service (see here for discussion), so we end up with only NetworkManager able to manage adapters, and with our adapter configured not to be managed by NM.

While I've been able to modify our kickstart to disable cloud-config network handling all together, this has prevented me from then managing the network (I tried w/ a static ip) from a cloud-init datasource. I'm pretty sure we don't want that.

The cloud base image enables the network service. I think we should do the same.

I tested a patch that does three things:

  • removes the extra ens3 ifcfg that seems to be added by dracut at some point (cloud base did this in their ks a year ago in c509863)
  • adds net.ifnames=0 to the bootloader line, because that seems to be necessary to actually disable consistent device naming
  • enables the network service

This results in a qcow with an ifcfg-eth0 that cloud-init creates, and that adapter is up and working when the system starts.

I'll experiment a bit more today to see if all three of those are actually needed, or if enabling the network service does the trick.

Also, would we want to disable NM? In the image I just described, both NM and network are running, and in that thread on disabling the network service, people seemed to think that that might have been the cause of some issues, but there wasn't much detail provided on that.

Finally, I know that the network service is the past, etc. etc., but we need booting media right now! :)


+1 booting media now, make elegant next.

It sounds like, assuming we want to use NetworkManager, the real fix is to change cloud-init to stop disabling it.

FWIW, NetworkManager's ability to use the "internal" (systemd) dhcp client (and its one-shot config-and-stop mode for static networking) make my reasons for not wanting to use it in the cloud image obsolete.

It sounds like, assuming we want to use NetworkManager, the real fix is to change cloud-init to stop disabling it.

Dusty's looking at this now, I hope he can figure out a quick fix

FWIW, NetworkManager's ability to use the "internal" (systemd) dhcp client (and its one-shot config-and-stop mode for static networking) make my reasons for not wanting to use it in the cloud image obsolete.

So we can close this one. Thanks @jasonbrooks

@trishnag changed the status to Closed

7 years ago

Err wait, so can't we revert this now?

@walters. what exactly do you want to revert? We added the patch to cloud-init to make it so that networkmanager can read the files and bring up networking.

@gholms we need to send that patch upstream. Are you game?

I think this:

``
this has prevented me from then managing the network (I tried w/ a static ip) from a cloud-init datasource. I'm pretty sure we don't want that.
```

is independent of the "no networking on boot" problem, which is what was fixed by cloud-init.

One should be able to configure static IPs via nmcli in bootcmd hooks in cloud-init, so I'd like to back out the change to enable network.service.

Somehow I want to shout "networkd" "networkd" :)

We talked about enabling the network service, but we instead patched cloud-init to make NM work.

One should be able to configure static IPs via nmcli in bootcmd hooks in cloud-init, so I'd like to back out the change to enable network.service.

hmm. I don't think we enabled network.service

-bash-4.3# systemctl status NetworkManager | cat
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2016-11-22 20:20:04 UTC; 19h ago
     Docs: man:NetworkManager(8)
 Main PID: 32401 (NetworkManager)
    Tasks: 4 (limit: 4915)
   Memory: 44.0M
      CPU: 1min 29.555s
   CGroup: /system.slice/NetworkManager.service
           ├─32401 /usr/sbin/NetworkManager --no-daemon
           └─32465 /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-eth0.pid -lf /var/lib/NetworkManager/dhclient-5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03-eth0.lease -cf /var/lib/NetworkManager/dhclient-eth0.conf eth0

Nov 23 15:45:56 ip-10-0-177-155.ec2.internal NetworkManager[32401]: <info>  [1479915956.6560] device (veth01b40c4): state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
Nov 23 15:45:56 ip-10-0-177-155.ec2.internal NetworkManager[32401]: <info>  [1479915956.6563] policy: disabling autoconnect for connection 'Wired connection 6'.
Nov 23 15:45:56 ip-10-0-177-155.ec2.internal NetworkManager[32401]: <warn>  [1479915956.6564] device (veth01b40c4): Activation: failed for connection 'Wired connection 6'
Nov 23 15:45:56 ip-10-0-177-155.ec2.internal NetworkManager[32401]: <info>  [1479915956.6565] device (veth158a7ac): state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
Nov 23 15:45:56 ip-10-0-177-155.ec2.internal NetworkManager[32401]: <info>  [1479915956.6567] policy: disabling autoconnect for connection 'Wired connection 5'.
Nov 23 15:45:56 ip-10-0-177-155.ec2.internal NetworkManager[32401]: <warn>  [1479915956.6568] device (veth158a7ac): Activation: failed for connection 'Wired connection 5'
Nov 23 15:45:56 ip-10-0-177-155.ec2.internal NetworkManager[32401]: <info>  [1479915956.6575] device (veth01b40c4): state change: failed -> disconnected (reason 'none') [120 30 0]
Nov 23 15:45:56 ip-10-0-177-155.ec2.internal NetworkManager[32401]: <info>  [1479915956.6584] device (veth158a7ac): state change: failed -> disconnected (reason 'none') [120 30 0]
Nov 23 15:45:56 ip-10-0-177-155.ec2.internal NetworkManager[32401]: <info>  [1479915956.6595] device (veth01b40c4): enslaved to non-master-type device ovs-system; ignoring
Nov 23 15:45:56 ip-10-0-177-155.ec2.internal NetworkManager[32401]: <info>  [1479915956.6597] device (veth158a7ac): enslaved to non-master-type device ovs-system; ignoring
Warning: NetworkManager.service changed on disk. Run 'systemctl daemon-reload' to reload units.
-bash-4.3# 
-bash-4.3# systemctl status network | cat
Warning: network.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network; generated; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

Oh, sorry, I was reading the git log and missed that we already did back out the change:

https://pagure.io/fedora-kickstarts/c/6f3661e3a5f2625b73ee8e998087285d7c6e7e63?branch=f25

Nevermind.

Login to comment on this ticket.

Metadata