Lxd cluster, ovn and static ha-chassis-group priority

hi,
it is possible to set persistent priority for chassie in ha-chassis-group?
I’m trying to setup static ingress nodes for lxd cluster (4.18) with lxc network port forward on it.

ovn-nbctl ha-chassis-group-add-chassis lxd-net6 dmz-01 32767
ovn-nbctl ha-chassis-group-add-chassis lxd-net6 dmz-02 32766

work ok, but after lxd restart loose priorities :frowning:

As a general rule you should not use the ovn-nbctl or direct DB modification to alter/add config for LXD’s OVN networks, that is a good route to bad times :slight_smile:

LXD’s OVN networks already add use HA groups with stable chassis IDs in a cluster, see:

and

LXD’s OVN networks support linking to an uplink network (either bridge or physical) and support network port forwards using lxc network forward create.

Does this fulfil the need?

not exactly,
I can’t directly bind ovn router to lxd cluster members

without it I can’t “port forward” traffic to sublayer ovn networks

ok, I have 5 servers with 5 external ips. I want setup only two ingress nodes. For this I use port forward from external addresses to internal gw. But if internal gw is accessible from chassie, having it

ovn-nbctl ha-chassis-group-add-chassis lxd-net6 dmz-01 32767
ovn-nbctl ha-chassis-group-add-chassis lxd-net6 dmz-02 32766

in this case I can reache “internal gw” from dmz-01 , but not from dmz-02

Can you give some examples of what you’re trying to do?

I’m afraid the terminology you’re using is unfamiliar and I don’t understand the case you’re trying to achieve.

Can you expand further on what an ingress node is, I’ve not come across that before? Is that OVN concept or a LXD concept?

Perhaps a network diagram would be more helpful.

But to suffice to say, in LXD an OVN logical router can only be active on any one node at once (because it only has a single IP on the uplink network), the stable chassis priorities set allow for failover if one chassis goes down.

So there are only be one active ingress point operational at a time.

Yes, you right,
and I try to set ovn logical router to be active on exactly predefined group of servers :slight_smile:

okay, more specific example:
server1 — i need to get ovn virtual router here and forward traffic to this router
server2 — i want to get ovn virtual router here in case when server1 is unreacheble
server3 — i don’t need ovn virtual router

I can achieve with by priorities of nb-ctl , but this is not good , as you say before :slight_smile:

Right I see. So setting manual chassis priorities is not possible at the moment in LXD.

In a LXD cluster all members are considered to be potential candidates to become leader, and so they are considered equal.

As such each OVN network will generate per-network random stable chassis IDs, with one of the cluster members being the preferred ingress/egress member.

The reason we generate this on a per OVN network basis is so that if you have multiple OVN networks, the same cluster member won’t be used as the primary for all networks, and instead the ingress/egress traffic will be roughly distributed across the cluster members.

It is expected that every cluster member be connected to the OVN network’s uplink network so they can potentially become the preferred ingress/egress member.

Perhaps you can open an issue over at https://github.com/lxc/lxd/issues where we can discuss the viability of your idea to have more manual control over these priorites.

ok , i’ll open a ticket :slight_smile: