Re: 'unmanaged' via keyfile plugin - not quite - discotheque



On 25.03.2014 02:34, poma wrote:
On 23.03.2014 17:43, poma wrote:
On 23.03.2014 15:57, poma wrote:

~~~~~~~~~~~~~~~~
ifcfg-rh plugin:
~~~~~~~~ ~~~~~~~

/etc/NetworkManager/NetworkManager.conf:
[main]
plugins=ifcfg-rh

/etc/sysconfig/network-scripts/ifcfg-enp3s0:
...
NM_CONTROLLED=no

$ nmcli device status
DEVICE  TYPE      STATE         CONNECTION
...
enp3s0  ethernet  unmanaged     --
...

$ nmcli -f GENERAL.STATE device show enp3s0
GENERAL.STATE:                          10 (unmanaged)

# journalctl -b -u NetworkManager --no-pager
...
NetworkManager[1462]: <info> NetworkManager (version
0.9.9.1-4.git20140319.fc20) is starting...
NetworkManager[1462]: <info> Read config:
/etc/NetworkManager/NetworkManager.conf and conf.d: 00-server.conf
NetworkManager[1462]: ifcfg-rh: Acquired D-Bus service com.redhat.ifcfgrh1
NetworkManager[1462]: <info> Loaded plugin ifcfg-rh: (c) 2007 - 2013 Red
Hat, Inc.  To report bugs please use the NetworkManager mailing list.
NetworkManager[1462]: <info> Loaded plugin keyfile: (c) 2007 - 2013 Red
Hat, Inc.  To report bugs please use the NetworkManager mailing list.
NetworkManager[1462]: ifcfg-rh: parsing
/etc/sysconfig/network-scripts/ifcfg-enp3s0 ...
NetworkManager[1462]: ifcfg-rh:     read connection 'enp3s0'
NetworkManager[1462]: ifcfg-rh: Ignoring connection 'enp3s0' / device
'...' due to NM_CONTROLLED=no.
NetworkManager[1462]: <info> Networking is enabled by state file
NetworkManager[1462]: <info> (enp3s0): carrier is OFF (but ignored)
NetworkManager[1462]: <info> (enp3s0): new Ethernet device (driver:
'r8169' ifindex: 4)
NetworkManager[1462]: <info> (enp3s0): exported as
/org/freedesktop/NetworkManager/Devices/3
systemd[1]: Started Network Manager.
NetworkManager[1462]: <info> startup complete

                          -- unmanaged OK --

~~~~~~~~~~~~~~~
keyfile plugin:
~~~~~~~ ~~~~~~~

/etc/NetworkManager/conf.d/custom.conf:
[main]
plugins=keyfile

[keyfile]
unmanaged-devices=interface-name:enp3s0

/etc/NetworkManager/system-connections/enp3s0:
...
[connection]
id=enp3s0
...

$ nmcli device status
DEVICE  TYPE      STATE         CONNECTION
enp3s0  ethernet  connected     enp3s0
...

$ nmcli -f GENERAL.STATE device show enp3s0
GENERAL.STATE:                          100 (connected)

# journalctl -b -u NetworkManager
...
NetworkManager[1446]: <info> NetworkManager (version
0.9.9.1-4.git20140319.fc20) is starting...
NetworkManager[1446]: <info> Read config:
/etc/NetworkManager/NetworkManager.conf and conf.d: 00-server.conf,
custom.conf
NetworkManager[1446]: <info> Loaded plugin keyfile: (c) 2007 - 2013 Red
Hat, Inc.  To report bugs please use the NetworkManager mailing list.
NetworkManager[1446]: keyfile: new connection
/etc/NetworkManager/system-connections/enp3s0
systemd[1]: Started Network Manager.
NetworkManager[1446]: <info> Networking is enabled by state file
NetworkManager[1446]: <info> (enp3s0): carrier is OFF (but ignored)
NetworkManager[1446]: <info> (enp3s0): new Ethernet device (driver:
'r8169' ifindex: 4)
NetworkManager[1446]: <info> (enp3s0): exported as
/org/freedesktop/NetworkManager/Devices/3
NetworkManager[1446]: <info> (enp3s0): device state change: unmanaged ->
unavailable (reason 'managed') [10 20 2]
NetworkManager[1446]: <info> (enp3s0): preparing device
NetworkManager[1446]: <info> (enp3s0): device state change: unavailable
-> disconnected (reason 'none') [20 30 0]
NetworkManager[1446]: <info> Auto-activating connection 'enp3s0'.
NetworkManager[1446]: <info> Activation (enp3s0) starting connection
'enp3s0'
NetworkManager[1446]: <info> Activation (enp3s0) Stage 1 of 5 (Device
Prepare) scheduled...
NetworkManager[1446]: <info> Activation (enp3s0) Stage 1 of 5 (Device
Prepare) started...
NetworkManager[1446]: <info> (enp3s0): device state change: disconnected
-> prepare (reason 'none') [30 40 0]
NetworkManager[1446]: <info> NetworkManager state is now CONNECTING
NetworkManager[1446]: <info> Activation (enp3s0) Stage 2 of 5 (Device
Configure) scheduled...
NetworkManager[1446]: <info> Activation (enp3s0) Stage 1 of 5 (Device
Prepare) complete.
NetworkManager[1446]: <info> Activation (enp3s0) Stage 2 of 5 (Device
Configure) starting...
NetworkManager[1446]: <info> (enp3s0): device state change: prepare ->
config (reason 'none') [40 50 0]
NetworkManager[1446]: <info> Activation (enp3s0) Stage 2 of 5 (Device
Configure) successful.
NetworkManager[1446]: <info> Activation (enp3s0) Stage 2 of 5 (Device
Configure) complete.
NetworkManager[1446]: <info> (enp3s0): link connected
NetworkManager[1446]: <info> Activation (enp3s0) Stage 3 of 5 (IP
Configure Start) scheduled.
NetworkManager[1446]: <info> Activation (enp3s0) Stage 3 of 5 (IP
Configure Start) started...
NetworkManager[1446]: <info> (enp3s0): device state change: config ->
ip-config (reason 'none') [50 70 0]
NetworkManager[1446]: <info> Activation (enp3s0) Stage 5 of 5 (IPv4
Configure Commit) scheduled...
NetworkManager[1446]: <info> Activation (enp3s0) Stage 3 of 5 (IP
Configure Start) complete.
NetworkManager[1446]: <info> Activation (enp3s0) Stage 5 of 5 (IPv4
Commit) started...
NetworkManager[1446]: <info> (enp3s0): device state change: ip-config ->
ip-check (reason 'none') [70 80 0]
NetworkManager[1446]: <info> Activation (enp3s0) Stage 5 of 5 (IPv4
Commit) complete.
NetworkManager[1446]: <info> (enp3s0): device state change: ip-check ->
secondaries (reason 'none') [80 90 0]
NetworkManager[1446]: <info> (enp3s0): device state change: secondaries
-> activated (reason 'none') [90 100 0]
NetworkManager[1446]: <info> NetworkManager state is now CONNECTED_LOCAL
NetworkManager[1446]: <info> Policy set 'enp3s0' (enp3s0) as default for
IPv4 routing and DNS.
NetworkManager[1446]: <info> Activation (enp3s0) successful, device
activated.
NetworkManager[1446]: <info> startup complete
NetworkManager[1446]: <info> NetworkManager state is now CONNECTED_GLOBAL

                          -- unmanaged NOPE --


In the end it turns out that even with "unmanaged" via NetworkManager's
'ifcfg-rh' plugin(NM_CONTROLLED=no) the whole thing is broken.
If the systemd-networkd is running side by side with NetworkManager,
trying to drive the "unmanaged" devices, both services collide and the
network is cowabungad. It only works if the one of the services is
offline, no tricks.
So the story of the synergy of these two tools is just a theory, for now.

How the 'NetworkManager' is configured:

$ ls /etc/sysconfig/network-scripts/ifcfg*
ls: cannot access /etc/sysconfig/network-scripts/ifcfg*: No such file or
directory

$ ls /etc/NetworkManager/
conf.d  dispatcher.d  dnsmasq.d  NetworkManager.conf  system-connections
 VPN

$ ls /etc/NetworkManager/system-connections/*
ls: cannot access /etc/NetworkManager/system-connections/*: No such file
or directory

$ file /etc/NetworkManager/NetworkManager.conf
/etc/NetworkManager/NetworkManager.conf: symbolic link to
`conf.d/keyfile-plugin.conf'

$ cat /etc/NetworkManager/conf.d/keyfile-plugin.conf
[main]
plugins=keyfile

[keyfile]
unmanaged-devices=interface-name:enp3s0

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

How the 'systemd-networkd' is configured:
https://bugzilla.redhat.com/attachment.cgi?id=877526

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

After the system boot:

$ systemctl is-enabled NetworkManager systemd-networkd
enabled
enabled
$ systemctl is-active NetworkManager systemd-networkd
active
active

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Dan served cold appetizer:

$ ps -o %cpu $(pidof NetworkManager)
%CPU
 0.0

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Something boiling in the Tom's kitchen:

$ ps -o %cpu $(pidof systemd-networkd)
%CPU
66.3 and still rising!

~~~~~

After turning on the cooker hood,

# systemctl restart systemd-networkd.service

everything is OK again:

$ ps -o %cpu $(pidof systemd-networkd)
%CPU
 0.0

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

How the pots are stored by Dan's recipe:

$ nmcli device
DEVICE   TYPE      STATE         CONNECTION
bridge0  bridge    disconnected  --
enp3s0   ethernet  unmanaged     --

$ nmcli device show enp3s0
GENERAL.DEVICE:                         enp3s0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         00:12:34:56:78:30
GENERAL.MTU:                            1500
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
WIRED-PROPERTIES.CARRIER:               on

$ nmcli device show bridge0
GENERAL.DEVICE:                         bridge0
GENERAL.TYPE:                           bridge
GENERAL.HWADDR:                         6E:DC:CC:FF:82:3D
GENERAL.MTU:                            1500
GENERAL.STATE:                          30 (disconnected)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --

$ nmcli connection
NAME     UUID                                  TYPE    DEVICE
bridge0  b59e371b-a7cd-4961-a16a-714e2f7d4a84  bridge  --

~~~~~~~~~~~~~~~~~~~~

Sometimes like this:

$ nmcli device
DEVICE   TYPE      STATE                                  CONNECTION
bridge0  bridge    connecting (getting IP configuration)  bridge0
enp3s0   ethernet  unmanaged                              --

$ nmcli device show bridge0
GENERAL.DEVICE:                         bridge0
GENERAL.TYPE:                           bridge
GENERAL.HWADDR:                         06:EC:EB:15:92:5F
GENERAL.MTU:                            1500
GENERAL.STATE:                          70 (connecting (getting IP
configuration))
GENERAL.CONNECTION:                     bridge0
GENERAL.CON-PATH:
/org/freedesktop/NetworkManager/ActiveConnection/0

$ nmcli connection
NAME     UUID                                  TYPE    DEVICE
bridge0  810af447-0948-4d54-b72b-4c8085bcbc10  bridge  bridge0

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

But the real fun starts after opening discotheque:

# systemctl restart NetworkManager.service

$ nmcli device
DEVICE   TYPE      STATE         CONNECTION
bridge0  bridge    connected     bridge0
enp3s0   ethernet  connected     enp3s0

$ nmcli device show enp3s0
GENERAL.DEVICE:                         enp3s0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         00:12:34:56:78:30
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     enp3s0
GENERAL.CON-PATH:
/org/freedesktop/NetworkManager/ActiveConnection/1
WIRED-PROPERTIES.CARRIER:               on

$ nmcli device show bridge0
GENERAL.DEVICE:                         bridge0
GENERAL.TYPE:                           bridge
GENERAL.HWADDR:                         00:12:34:56:78:30
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     bridge0
GENERAL.CON-PATH:
/org/freedesktop/NetworkManager/ActiveConnection/0
IP4.ADDRESS[1]:                         ip = 192.168.2.35/24, gw =
192.168.2.1
IP4.DNS[1]:                             192.168.2.1
IP6.ADDRESS[1]:                         ip =
fe80::4ec:ebff:fe15:925f/64, gw = ::

$ nmcli connection
NAME     UUID                                  TYPE            DEVICE
enp3s0   0f48af7a-579d-4bd0-af4b-094706bff2b7  802-3-ethernet  enp3s0
bridge0  fe64f886-347b-4922-aed2-e0611e544373  bridge          bridge0

In the rhythm of the "Smashed Potato Soup"! :)


Looking back on all these logs, what is obvious is,
what is needed is a true "unmanaged" functionality - not pro forma,
including devices such as bridges.
The 'keyfile' plugin should be mandatory, not 'ifcfg-rh', and this is
especially true for the Rawhide.

Thank you for your attention.


poma




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]