Re: NetworkManager behavior answers not found in docs

On Fri, 2018-10-26 at 12:01 +0200, Thomas HUMMEL wrote:
On 10/26/2018 10:05 AM, Thomas Haller wrote:

Ah, there is also `nmcli -f GENERAL.NM-MANAGED device show eth0 `,
this just returns (state != "unmanaged").

Wait : what's the diffence (if any) between GENERAL.NM-MANAGED == no
GENERAL.STATE == 10 (unmanaged) ?

There is none:

Optimally, there would be a nother flag which is the opposite of
device set $DEV managed $VALUE`. So, when you issue device-set, it
would succeed and would toggle this flag, but that alone may not be
sufficient to make the device (fully) GENERAL.NM-MANAGED yet.

I don't see what you mean here by "the opposite" : maybe just a flag
reflect the request (and its ack) of the desire to manage the device

 I mean, a flag (in NetworkManager public API) that exposes the user's
intent of managing the device. That is, what `nmcli device set $DEV
managed yes` sets.
... which may be slighly different than whether the device is actually
"state != unmanaged".

# nmcli device set eth1 managed yes
# echo $?
# nmcli -f GENERAL.DEVICE,GENERAL.STATE device show
GENERAL.DEVICE:                         eth1
GENERAL.STATE:                          20 (unavailable)

state "unavailable", looks like the device has no cable plugged in
carrier). You'd also see that with `ip link show eth1` saying "NO-

Well, it's a VMWare virtual interface but 'connected' in VMWare and 
iproute shows :

3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode 
DEFAULT group default qlen 1000
     link/ether 00:50:56:8a:42:bf brd ff:ff:ff:ff:ff:ff

It seems normal to me the device is down since no one as configured
But it seems I'm in a different case than no carrier'...
Maybe I'm supposed to see a LOWER_DOWN ?

Activation of the created profile then probably fails, because the
device has no carrier (which is required for successful DHCP).

Obviously the reason here is that the device is still unavailable
the question is why ? ;-)

hm, good question. I don't know, I would need to see the level=TRACE
syslog (journal) of NM.

Btw, for hints for getting the logfile see

Generally, there are the device states "unmanaged" -> "unavailable" ->
and "disconnected". For ethernet devices, a device is usually
"unavailable" because it has no carrier.


Attachment: signature.asc
Description: This is a digitally signed message part

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