Re: NM refuses to manage a VLAN



On Fri, 11 Jul 2014 14:45:43 -0500
Dan Williams <dcbw redhat com> wrote:

Do you have NM_CONTROLLED=no
in /etc/sysconfig/network-scripts/ifcfg-ethmain.4?

Removing that file makes no difference. Here's the console capture:

[root elanor zaitcev]# ls /etc/NetworkManager/
dispatcher.d  dnsmasq.d  NetworkManager.conf  system-connections  VPN
[root elanor zaitcev]# ls /etc/NetworkManager/system-connections/
[root elanor zaitcev]# rm /etc/sysconfig/network-scripts/ifcfg-ethmain.4 
[root elanor zaitcev]# ip link delete dev ethmain.4
[root elanor zaitcev]# systemctl mask NetworkManager
 <--- already masked, so no console output
[root elanor zaitcev]# /usr/sbin/NetworkManager --log-level=debug
<debug> [1405260297.790837] [config/nm-config.c:304] read_config(): Reading config file 
'/etc/NetworkManager/NetworkManager.conf'
[root elanor zaitcev]# systemctl stop radvd
 <---- too noisy in logs otherwise
[root elanor zaitcev]# nmcli dev
DEVICE     TYPE      STATE
wlp1s0     wifi      disconnected
ethmain    ethernet  unmanaged
lo         loopback  unmanaged
ethmain.2  vlan      unmanaged
ethmain.3  vlan      unmanaged
ethmain.4  vlan      unmanaged
ethmain.5  vlan      unmanaged
 <---- woops, ethmain.4 floated up somehow, let's kill it again
[root elanor zaitcev]# ip link delete dev ethmain.4
[root elanor zaitcev]# nmcli dev
DEVICE     TYPE      STATE
wlp1s0     wifi      disconnected
ethmain    ethernet  unmanaged
lo         loopback  unmanaged
ethmain.2  vlan      unmanaged
ethmain.3  vlan      unmanaged
ethmain.5  vlan      unmanaged
[root elanor zaitcev]# nmcli c up id vlan-ethgray
Error: Connection activation failed: Device not managed by NetworkManager or unavailable
[root elanor zaitcev]# killall NetworkManager

Messages file:
 http://www.zaitcev.us/things/messages.nm.02

But basically it's the same story. Device removal:

Jul 13 08:05:34 elanor NetworkManager[26437]: <debug> [1405260334.724967] [platform/nm-platform.c:1969] 
log_link(): signal: link removed: ethmain.4 (15)
Jul 13 08:05:34 elanor NetworkManager[26437]: <debug> [1405260334.727207] [platform/nm-linux-platform.c:2856] 
handle_udev_event(): UDEV event: action 'remove' subsys 'net' device 'ethmain.4'

Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.89416] [platform/nm-platform.c:485] 
nm_platform_link_get_ifindex(): link not found: ethmain.4
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.89494] [platform/nm-platform.c:956] 
nm_platform_vlan_add(): link: adding vlan 'ethmain.4' parent 2 vlanid 4 vlanflags 0
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.96545] [platform/nm-linux-platform.c:253] 
get_kernel_object(): get_kernel_object for link: ethmain.4 (16, family 0)
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.96666] [platform/nm-platform.c:1969] 
log_link(): signal: link added: ethmain.4 (16)
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.97828] [devices/nm-device.c:7086] 
nm_device_update_hw_address(): (ethmain.4): hardware address is 00:23:54:9F:BE:A5
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.97942] [devices/nm-device-vlan.c:92] 
update_initial_hw_address(): (ethmain.4): read initial MAC address 00:23:54:9F:BE:A5
Jul 13 08:05:52 elanor NetworkManager[26437]: <info> (ethmain.4): carrier is OFF
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.98238] [devices/nm-device-vlan.c:532] 
constructed(): (ethmain.4): kernel ifindex 16
Jul 13 08:05:52 elanor NetworkManager[26437]: <info> (ethmain.4): VLAN ID 4 with parent ethmain
Jul 13 08:05:52 elanor NetworkManager[26437]: <info> (ethmain.4): new VLAN device (driver: '8021q' ifindex: 
16)
Jul 13 08:05:52 elanor NetworkManager[26437]: <info> (ethmain.4): exported as 
/org/freedesktop/NetworkManager/Devices/7
Jul 13 08:05:52 elanor NetworkManager[26437]: <info> (ethmain.4): No existing connection detected.
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.107049] [nm-manager.c:1474] 
system_create_virtual_devices(): creating virtual devices...
Jul 13 08:05:52 elanor NetworkManager[26437]: <warn> connection /org/freedesktop/NetworkManager/Settings/0 
failed to activate: (2) Device not managed by NetworkManager or unavailable
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.115628] [platform/nm-linux-platform.c:1333] 
event_notification(): netlink event (type 16) for link: ethmain (2, family 0)
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.115841] [platform/nm-linux-platform.c:253] 
get_kernel_object(): get_kernel_object for link: ethmain (2, family 0)
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.118589] [platform/nm-linux-platform.c:2856] 
handle_udev_event(): UDEV event: action 'add' subsys 'net' device 'ethmain.4'
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.118860] [platform/nm-platform.c:1969] 
log_link(): signal: link added: ethmain.4 (16)
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.122765] [platform/nm-linux-platform.c:1333] 
event_notification(): netlink event (type 16) for link: ethmain.4 (16, family 0)
Jul 13 08:05:52 elanor NetworkManager[26437]: <debug> [1405260352.123024] [platform/nm-linux-platform.c:253] 
get_kernel_object(): get_kernel_object for link: ethmain.4 (16, family 0)

Also, " Ignoring connection 'System ethmain' / device
'00:23:54:9f:be:a5' due to NM_CONTROLLED/BRIDGE/VLAN." implies that the
VLAN interface will also be ignored, because it'll have the same MAC as
the parent.

That is a deeply disturbing comment. How could an alias interface
ever have a different MAC from the parent? It belongs to the same
hardware device, so its address could even be burned into EPROM on
the board. Of course they are the same!

Note that this system was in use in this configuration since Fedora 15.
I'm just experimenting on the least valuable VLAN, but actually all
of its interfaces are virtual and all of them use the same MAC.

[root elanor zaitcev]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ethmain: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:23:54:9f:be:a5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.127.1/24 brd 192.168.127.255 scope global ethmain
       valid_lft forever preferred_lft forever
    inet6 fd2d:acfb:74cc:0:221:85ff:fec4:13cb/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::223:54ff:fe9f:bea5/64 scope link
       valid_lft forever preferred_lft forever
5: ethmain 2 ethmain: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default  
    link/ether 00:23:54:9f:be:a5 brd ff:ff:ff:ff:ff:ff
    inet 76.113.49.212/22 brd 255.255.255.255 scope global dynamic ethmain.2
       valid_lft 312516sec preferred_lft 312516sec
    inet6 2001:558:6001:10:20e8:e5ba:5385:ab98/64 scope global dynamic
       valid_lft 289551sec preferred_lft 289551sec
    inet6 fe80::223:54ff:fe9f:bea5/64 scope link
       valid_lft forever preferred_lft forever
6: ethmain 3 ethmain: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue s
tate UP group default  
    link/ether 00:23:54:9f:be:a5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.131.1/24 brd 192.168.131.255 scope global ethmain.3
       valid_lft forever preferred_lft forever
    inet6 fd2d:acfb:74cc:4::1/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::1/64 scope link
       valid_lft forever preferred_lft forever
    inet6 fe80::223:54ff:fe9f:bea5/64 scope link
       valid_lft forever preferred_lft forever
7: ethmain 5 ethmain: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default  
    link/ether 00:23:54:9f:be:a5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.128.1/24 brd 192.168.128.255 scope global ethmain.5
       valid_lft forever preferred_lft forever
    inet6 fd2d:acfb:74cc:1::1/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80:0:0:1::1/64 scope link
       valid_lft forever preferred_lft forever
    inet6 fe80::223:54ff:fe9f:bea5/64 scope link
       valid_lft forever preferred_lft forever
12: wlp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:22:43:57:a3:8d brd ff:ff:ff:ff:ff:ff
16: ethmain 4 ethmain: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 00:23:54:9f:be:a5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.132.1/24 brd 192.168.132.255 scope global ethmain.4
       valid_lft forever preferred_lft forever
    inet6 fd2d:acfb:74cc:5::1/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80:0:0:5::1/64 scope link
       valid_lft forever preferred_lft forever
    inet6 fe80::223:54ff:fe9f:bea5/64 scope link
       valid_lft forever preferred_lft forever
[root elanor zaitcev]# 

All I need is to migrate to NM. This does not even have any of OVS
bridging or other complex enterpris-y thingies. I imagined we would
have a cookbook recipy for something of this nature, but I was unable
to find it so far.

-- Pete


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