Can't create OVS bridge - device is strictly unmanaged



I am trying to switch from using old-style ifcfg files to NetworkManager
to set up an OVS bridge on my (Fedora 30) laptop.  Because this is a
laptop, no physical interface is connected to the bridge; all VM traffic
to the outside world is "NAT'ed" by iptables.  Also, for reasons that I
can't even remember, the NAT'ed network is on VLAN 122 on the OVS
bridge.

If I were setting this all up manually, I would use the following
commands:

# # Create the bridge
# ovs-vsctl add-br ovs0

# # Add a VLAN interface on top; doing it this way allows the VLAN
# # interface to have a smaller MTU than the bridge
# ip link add link ovs0 name ovs0.122 type vlan id 122

# # Enable jumbo frames on the bridge
# ip link set dev ovs0 mtu 9000

# # Set the IP address and bring up the links
# ip addr add dev ovs0.122 192.168.122.254/24
# ip link set dev ovs0 up
# ip link set dev ovs0.122 up

This would give me:

# ovs-vsctl show
8336c756-0c04-4e7e-8fc1-c0ffb0aba2e4
    Bridge "ovs0"
        Port "ovs0"
            Interface "ovs0"
                type: internal
    ovs_version: "2.10.1"

# ip a show ovs0
17: ovs0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether a6:7c:c7:a2:b6:40 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a47c:c7ff:fea2:b640/64 scope link
       valid_lft forever preferred_lft forever

# ip a show ovs0.122
18: ovs0.122@ovs0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether a6:7c:c7:a2:b6:40 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.254/24 scope global ovs0.122
       valid_lft forever preferred_lft forever
    inet6 fe80::a47c:c7ff:fea2:b640/64 scope link
       valid_lft forever preferred_lft forever

Now with nmcli, following the instructions at
https://developer.gnome.org/NetworkManager/stable/nm-openvswitch.html
(modified to make the connection IDs more friendly).

First things first, clean up:

# ip link del ovs0.122
# ovs-vsctl del-br ovs0

# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: wlp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DORMANT group default qlen 1000
    link/ether be:66:e5:39:f0:c0 brd ff:ff:ff:ff:ff:ff
3: enp13s0u1u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether d4:81:d7:37:f2:29 brd ff:ff:ff:ff:ff:ff

# ovs-vsctl show
8336c756-0c04-4e7e-8fc1-c0ffb0aba2e4
    ovs_version: "2.10.1"

Create the NetworkManager connections:

# nmcli conn add type ovs-bridge conn.id ovs0-bridge conn.interface ovs0-br
Connection 'ovs0-bridge' (2b11edc1-b177-400f-a073-71aab7436c4f) successfully added.

# nmcli conn add type ovs-port conn.id ovs0-int-port conn.interface ovs0-port master ovs0-bridge Connection 'ovs0-int-port' (a0d6ac98-b73b-4340-844a-ffb04dc47d65) successfully added.

# nmcli conn add type ovs-interface conn.id ovs0-int-iface conn.interface ovs0 master ovs0-int-port Connection 'ovs0-int-iface' (1a672dd1-825b-4d61-9945-0d75dc25accc) successfully added.

Everything looks good, but ...

# ovs-vsctl show
8336c756-0c04-4e7e-8fc1-c0ffb0aba2e4
    ovs_version: "2.10.1"

# nmcli conn
NAME UUID TYPE DEVICE Wired connection 1 583c913f-d016-3018-bb41-2076f54930ef ethernet enp13s0u1u2 ovs0-bridge 2b11edc1-b177-400f-a073-71aab7436c4f ovs-bridge ovs0-br ovs0-int-port a0d6ac98-b73b-4340-844a-ffb04dc47d65 ovs-port ovs0-port enp61s0u1 f9e64db2-3ea5-312e-ae56-55ae5e728716 ethernet -- ovs0-int-iface 1a672dd1-825b-4d61-9945-0d75dc25accc ovs-interface --

Hmm.  Maybe I need to bring the interface up?

# nmcli conn up ovs0-int-iface
Error: Connection activation failed: Connection 'ovs0-int-iface' is not available on device ovs0 because device is strictly unmanaged

Can we make it managed?

# nmcli dev set ovs0 managed yes

# nmcli dev show ovs0
GENERAL.DEVICE:                         ovs0
GENERAL.TYPE:                           ovs-interface
GENERAL.HWADDR:                         (unknown)
GENERAL.MTU:                            0
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --

# nmcli conn up ovs0-int-iface
Error: Connection activation failed: Connection 'ovs0-int-iface' is not available on device ovs0 because device is strictly unmanaged

Negatory, Batman.

Any ideas?

--
========================================================================
Ian Pilcher                                         arequipeno gmail com
-------- "I grew up before Mark Zuckerberg invented friendship" --------
========================================================================



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