Re: NM in the initrd for Fedora CoreOS

2020-01-04 Thread Colin Walters



On Sat, Jan 4, 2020, at 10:00 AM, Thomas Haller wrote:
> Hi,
> 
> 
> On Fri, 2020-01-03 at 14:21 -0500, Colin Walters wrote:
> > I was trying out the current F31 dracut network-manager module, and
> > couldn't get it to do anything useful.
> > See: https://github.com/coreos/fedora-coreos-config/pull/259
> 
> 
> I don't understand what exactly didn't work (or what you tried).

https://github.com/coreos/fedora-coreos-config/pull/259#issuecomment-570671191

> Is the "network-manager" dracut module loaded? That should be done by
> modules.d/40network/module-setup.sh

Yes.

> I understand this is Fedora 31 CoreOS. But I am not familiar with that,
> which versions of dracut and NetworkManager is that using exactly? Is
> there something special compared to a "regular" Fedora installation?

Part of the idea of all of this is we're not making a separate operating 
system.  There are details here but broadly speaking, same packages from the 
Fedora repos.

See https://getfedora.org/en/coreos/download/ for main releases, and 
https://builds.coreos.fedoraproject.org/browser for development builds, which 
can answer that question directly, click on "commitmeta.json" e.g. 
https://builds.coreos.fedoraproject.org/prod/streams/testing-devel/builds/31.20191222.20.0/x86_64/commitmeta.json

> > If anyone has a bit of time to help out that'd be appreciated!
> > 
> > One higher level architectural question; why is the NM initrd code
> > structured as "run once and quit" rather than running as a systemd
> > unit, same way as the main OS, and default to having the switchroot
> > stop the service?
> 
> Good question. I don't know. Lubomir might know.
> 
> Maybe: if you run it as systemd service, you would need to know when NM
> is done with configuration. In main OS, that works by NetworkManager-
> wait-online.service. However, that internally uses D-Bus to find out
> when NetworkManager is ready. 

Currently, our main use case for networking in the initrd is Ignition, which 
just polls in a loop.  Explicitly watching NM's status for being online would 
be a potential optimization, but not necessary.

(I think the better way to do this anyways is the code we landed in GLib to 
monitor netlink for a default route)

> But it doesn't seem much of a difference, is it? What would be the
> advantage of running NM as a systemd service? Yes, I don't see why that
> couldn't be done.

There are several advantages, the main reason I'm asking now is avoiding the 
dracut "initqueue" which is like a weird separate init system glued onto the 
side.  But the general argument here is just having it work the same as the 
main system.
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: NM in the initrd for Fedora CoreOS

2020-01-04 Thread Thomas Haller via networkmanager-list
Hi,


On Fri, 2020-01-03 at 14:21 -0500, Colin Walters wrote:
> I was trying out the current F31 dracut network-manager module, and
> couldn't get it to do anything useful.
> See: https://github.com/coreos/fedora-coreos-config/pull/259


I don't understand what exactly didn't work (or what you tried).

Isn't it a dracut thing that when you boot with rd.debug that it
enables heavy debug logging? Do you have the logs of such a boot?

Is the "network-manager" dracut module loaded? That should be done by
modules.d/40network/module-setup.sh

I understand this is Fedora 31 CoreOS. But I am not familiar with that,
which versions of dracut and NetworkManager is that using exactly? Is
there something special compared to a "regular" Fedora installation?


> If anyone has a bit of time to help out that'd be appreciated!
> 
> One higher level architectural question; why is the NM initrd code
> structured as "run once and quit" rather than running as a systemd
> unit, same way as the main OS, and default to having the switchroot
> stop the service?

Good question. I don't know. Lubomir might know.

Maybe: if you run it as systemd service, you would need to know when NM
is done with configuration. In main OS, that works by NetworkManager-
wait-online.service. However, that internally uses D-Bus to find out
when NetworkManager is ready. In initrd that would need to be solved
without D-Bus -- which of course is doable. How it is currently, is
that NM runs with `--configure-and-quit=initrd`. This quits when
configuration is complete, and is thereby the signal to proceed.

Note that since you (usually) don't have D-Bus in initrd, you couldn't
talk to NetworkManager anyway, if it keeps running as a service. In the
past NM had a private socket to talk to, but that wasn't used, then it
bitrot and was eventually dropped. If need be, it could be added again.
What would be the use case?

But it doesn't seem much of a difference, is it? What would be the
advantage of running NM as a systemd service? Yes, I don't see why that
couldn't be done.


best,
Thomas


signature.asc
Description: This is a digitally signed message part
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


NM in the initrd for Fedora CoreOS

2020-01-03 Thread Colin Walters
I was trying out the current F31 dracut network-manager module, and couldn't 
get it to do anything useful.
See: https://github.com/coreos/fedora-coreos-config/pull/259

If anyone has a bit of time to help out that'd be appreciated!

One higher level architectural question; why is the NM initrd code structured 
as "run once and quit" rather than running as a systemd unit, same way as the 
main OS, and default to having the switchroot stop the service?
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list