How to?: Devices unmanaged by default, persist "nmcli managed yes" across reboots [debug log included]


# Purpose
To use NM to configure USB modem only and leave other devices unmanaged. Why? Because the machine in question is a router which has a complex network configuration.

# Description
According to the manual, NM can be configured to set all devices unmanaged, and make overrides per-device via DBUS API. I assumed this meant that NM also has a mechanism to persist overrides when devices are manually set as managed.

$ cat '/etc/NetworkManager/conf.d/50-my.conf'

After starting NM, `nmcli dev` shows all devices as "unmanaged", which is correct. Executing the following command:
$ nmcli dev set ttyUSB0 autoconnect yes managed yes
Causes the device to become managed, and because I have "gsm" connection defined, it will be automatically connected.

# Bug
The problem is that after a reboot, the device stays unmanaged. I assume it is either a bug or that there exists no mechanism to persist this manually set managed state for a device.

If this feature doesn't exist and needs to be implemented, I think it would be necessary to also implement a way for the device to know which connection to use (though I think this is already implemented somewhere else).

# Attachments
`at_startup.log` - trace logging of NM startup regarding the usbmodem
`after_cmd.log` - trace logging of NM after setting the device as managed and autoconnect

Attachment: at_startup.log
Description: Text Data

Attachment: after_cmd.log
Description: Text Data

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