Open Fred78290 opened 2 months ago
@Fred78290 out of interest, why are you setting network.ovn.northbund_connection, as it defaults to unix:/var/run/ovn/ovnnb_db.sock
anyway: https://documentation.ubuntu.com/lxd/en/latest/server/#server-miscellaneous:network.ovn.northbound_connection
LXD appending /var/lib/snapd/hostfs/
to the supplied path is correct in order to access files outside of the snap package.
This part is confusing me:
ovn-nbctl --timeout=10 --db unix:/var/lib/snapd/hostfs/run/ovn/ovnsb_db.sock
Why is ovn-nbctl (which manages the northbound database) being passed the path for the OVN southbound database (ovnsb_db.sock)?
Can you try lxc config unset network.ovn.northbound_connection
and then also provide the output of:
sudo ovs-vsctl get open_vswitch . external_ids:ovn-remote
Which is where LXD gets the address of the OVN southbound database.
Have you followed the setup guide here btw?
@tomponline
After exec lxc config unset network.ovn.northbound_connection
i'm able to run lxc network create ovntest --type=ovn network=lxdbr0
succesfully.
https://documentation.ubuntu.com/lxd/en/latest/howto/network_ovn_setup/#set-up-a-standalone-ovn-network
Yes I followed the setup guide.
sudo ovs-vsctl get open_vswitch . external_ids:ovn-remote
got: unix:/var/run/ovn/ovnsb_db.sock
@tomponline
This part is confusing me:
ovn-nbctl --timeout=10 --db unix:/var/lib/snapd/hostfs/run/ovn/ovnsb_db.sock
It's returned as error message the executed sub command.
I have setted the network.ovn.northbound_connection explicitly to network.ovn.northbound_connection because in my real environment I share ovn system beetwen openstack and LXd on the same machine and the connection is SSL and lxd won't connect to ovn when I fill SSL infos and remote IP but it connect thru the unix socket (default value). and I'm looking what is the problem.
It's mean actually setting the network.ovn.northbound_connection to something is not working.
because in my real environment I share ovn system beetwen openstack and LXd on the same machine
I've never tried that, but its not supported, so you might be unexpected conflicts/problems doing that.
I've never tried that, but its not supported, so you might be unexpected conflicts/problems doing that.
Has unexpected it's work but without setting network.ovn.northbound_connection.
On the same machine I run multipass, vmware workstation pro, openstack, devstack and lxd without conflicts.
@boltmark as you're going to start looking into OVN uplink VLAN feature, please could you take a look at recreating this issue first as you setup your OVN environment? Thanks
Required information
Distribution: Ubuntu
Distribution version: 24.04
The output of "snap list --all lxd core20 core22 core24 snapd":
The output of "lxc info" or if that fails:
Issue description
Unable to setup OVN network, the command
lxc network create ovntest --type=ovn network=lxdbr0
fail returningError: Failed to run: ovn-nbctl --timeout=10 --db unix:/var/lib/snapd/hostfs/run/ovn/ovnsb_db.sock --wait=sb ha-chassis-group-add lxd-net7: exit status 1 (ovn-nbctl: unix:/var/lib/snapd/hostfs/run/ovn/ovnsb_db.sock: database connection failed ())
The reason is snapped lxd append /var/lib/snapd/hostfs to ovn socket pathSteps to reproduce
multipass lxd-test launch -c 4 -m 8G -d 40G
sudo snap install lxd --channel=6.1/stable
lxc config set network.ovn.northbound_connection=unix:/var/run/ovn/ovnnb_db.sock
lxc network create ovntest --type=ovn network=lxdbr0
Problem in the source location
File:
./lxd/network/openvswitch/ovn.go
Line: 305 Method:func (o *OVN) xbctl(southbound bool, extraArgs ...string) (string, error) {
Wrong code:if strings.HasPrefix(dbAddr, "unix:") { dbAddr = fmt.Sprintf("unix:%s", shared.HostPathFollow(strings.TrimPrefix(dbAddr, "unix:"))) }
shared.HostPathFollow(...) detect lxd snapped and append /var/lib/snapd/hostfs path