Hmmm … that change seems to have broken LXD - OVN so I’ve reverted both changes. external_ids:ovn-remote
is set as unix:/var/run/ovn/ovnsb_db.sock
and lxc config network.ovn.northbound_connection
is now set as unix:/var/run/ovn/ovnnb_db.sock
.
with the suggested settings:
edit network lxdbr0
to have:
ipv4.address: 10.1.1.1/24
ipv4.dhcp.ranges: 10.1.1.8-10.1.1.127
ipv4.ovn.ranges: 10.1.1.128-10.1.1.251
ipv4.routes: 10.3.128.0/17, 241.0.0.0/8
then …
$ lxc network create test-ovn --type=ovn network=lxdbr0
Error: Failed to run: ovn-nbctl --db tcp:10.1.0.215:6641,tcp:10.1.0.213:6641,tcp:10.1.0.214:6641 ha-chassis-group-add lxd-net46: ovn-nbctl: tcp:10.1.0.215:6641,tcp:10.1.0.213:6641,tcp:10.1.0.214:6641: database connection failed (Connection refused)
$ lxc config set network.ovn.northbound_connection=unix:/var/run/ovn/ovnnb_db.sock
$ lxc network delete test-ovn
Network test-ovn deleted
$ lxc network create test-ovn --type=ovn network=lxdbr0
Error: Failed getting OVS Chassis ID: invalid syntax
# ovs-vsctl list open_vswitch
[sudo] password for albans:
_uuid : 466b9882-6a72-4934-9dc9-1e939bb97950
bridges : [04e7f203-69e8-4365-9e40-282877f98a80]
cur_cfg : 21
datapath_types : [netdev, system]
datapaths : {}
db_version : "8.2.0"
dpdk_initialized : false
dpdk_version : none
external_ids : {hostname=albans.domuz, ovn-encap-ip="10.1.0.215", ovn-encap-type="geneve,vxlan", ovn-openflow-probe-interval="15000", ovn-remote="tcp:10.1.0.215:6641,tcp:10.1.0.213:6641,tcp:10.1.0.214:6641", ovn-remote-probe-interval="5000", rundir="/var/run/openvswitch", system-id=albans}
iface_types : [erspan, geneve, gre, internal, ip6erspan, ip6gre, lisp, patch, stt, system, tap, vxlan]
manager_options : []
next_cfg : 21
other_config : {}
ovs_version : "2.13.1"
ssl : []
statistics : {}
system_type : ubuntu
system_version : "20.04"
# ovs-vsctl show
466b9882-6a72-4934-9dc9-1e939bb97950
Bridge br-int
Port br-int
Interface br-int
type: internal
ovs_version: "2.13.1"
# ovn-nbctl show
switch cec22a68-4d83-47ec-8331-5ad314cfc557 (lxd-net47-ls-ext)
port lxd-net47-ls-ext-lsp-router
type: router
router-port: lxd-net47-lr-lrp-ext
port lxd-net47-ls-ext-lsp-provider
type: localnet
addresses: ["unknown"]
switch fa827850-c229-4602-88a6-2592001ac3e8 (lxd-net48-ls-int)
port lxd-net48-ls-int-lsp-router
type: router
router-port: lxd-net48-lr-lrp-int
switch 607470f8-fe19-4408-80d7-20a736f73a22 (lxd-net47-ls-int)
port lxd-net47-ls-int-lsp-router
type: router
router-port: lxd-net47-lr-lrp-int
switch 44adb685-a6bf-418f-8060-7aa307f5c110 (lxd-net48-ls-ext)
port lxd-net48-ls-ext-lsp-provider
type: localnet
addresses: ["unknown"]
port lxd-net48-ls-ext-lsp-router
type: router
router-port: lxd-net48-lr-lrp-ext
router a31763a4-5706-4c8a-a8f8-e0f9a10ee514 (lxd-net48-lr)
port lxd-net48-lr-lrp-int
mac: "00:16:3e:09:d5:5d"
networks: ["10.230.167.1/24"]
port lxd-net48-lr-lrp-ext
mac: "00:16:3e:09:d5:5d"
networks: ["10.1.1.128/24"]
nat a11f6768-b77d-4c02-b84d-b7934b35d81c
external ip: "10.1.1.128"
logical ip: "10.230.167.0/24"
type: "snat"
router 91203d42-3c92-4c55-aa05-f23acbd094b3 (lxd-net47-lr)
port lxd-net47-lr-lrp-ext
mac: "00:16:3e:f7:eb:62"
networks: ["10.1.1.128/24"]
port lxd-net47-lr-lrp-int
mac: "00:16:3e:f7:eb:62"
networks: ["10.4.194.1/24"]
nat bd1ab8ff-0322-48c8-af83-c34fa0eda54a
external ip: "10.1.1.128"
logical ip: "10.4.194.0/24"
type: "snat"
# ovn-sbctl show
<<nothing>>
# ovn-appctl connection-status
not connected
# ovs-vsctl set open_vswitch . \
external_ids:system-id=$( hostname ) \
external_ids:ovn-remote-probe-interval=5000 \
external_ids:ovn-openflow-probe-interval=15000 \
external_ids:ovn-remote=unix:/var/run/ovn/ovnsb_db.sock \
external_ids:ovn-encap-type=geneve,vxlan \
external_ids:ovn-encap-ip=$( hostname -I | grep -o '\b10\.1\.0\.[0-9]\+\b' )
<<stop & start the ovn-* services on each host>>
# ovn-appctl connection-status
connected
I’ve edited lxdbr0
to remove the ovn config parameters, so there’s no OVN left in LXD. Is it safe to just delete all the lxd* routers & switches which are listed?
Or better to just clear all the /var/lib/{ovn,ovs,open_vswitch}/* databases and start again?