Re: NetworkManager behavior answers not found in docs



On Wed, 2018-10-24 at 16:40 +0200, Thomas HUMMEL wrote:
On 10/24/2018 04:11 PM, Thomas HUMMEL wrote:

Reapply doesn't seem to have any relevance with modification or
persistance.

Yes so now my understanding of reapply is more like "restore" (to
its 
original settings). Does this make sense even with non disk backed 
applied profiled (I guess that's what you tried to explain to me in
a 
previous message where you were talking about a clone of the
profile).

In fact I don't understand reapply anymore :

- it doesn't affect the profile

right, the profile is unchanged.

- a nmcli device modify <device> (802-3-ethernet.mtu for instance)
seems 
to immediatly (re)apply the change I'm doing to the active profile.

So, I don't understand anymore when I'm supposed to issue a nmcli
device 
<device> reapply ?

First of all, device-reapply might not be something that is frequently
used. So, you can be perfectly fine, without ever using it.

Remember, that a modification of the profile (`nmcli connection
modify`) does not take effect immeiately (except "connection.zone" and
"connection.metered" properties). You usually need to do a full re-
activation for the changes to take effect (`nmcli connection up`).

`nmcli device reapply` is mostly like re-activating the profile,
however it does not a full re-activation. As such, it may be less
disruptive. For example, if your device is a bridge (with vlan devices
on top of it), a full `nmcli connection up "$BRIDGE_PROFILE"` needs to
destroy all the vlans on top, and unenslave all slaves from the bridge.
That's pretty disruptive. `nmcli device reapply` wouldn't.

However, you can also reapply certain changes, like an IP address but
not a MAC address change. It would simply fail if the changes are too
invasive.

Yes, it's not unlike `nmcli device modify $DEVICE`.

For example,

   nmcli connection up "$PROFILE" ifname "$DEVICE"
   nmcli connection modify "$PROFILE" +ipv4.addresses 192.168.77.5/24
   nmcli device reapply "$DEVICE"

is basically the same as:

   nmcli connection up "$PROFILE" ifname "$DEVICE"
   nmcli connection
modify "$PROFILE" +ipv4.addresses 192.168.77.5/24
   nmcli device modify
"$DEVICE" +ipv4.addresses 192.168.77.5/24


best,
Thomas

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]