Skip to content

feat(ha): support multiple OpenNebula VIPs - #325

Open
cgroschupp wants to merge 4 commits into
OpenNebula:masterfrom
cgroschupp:feature/multiple-vips-pr
Open

cgroschupp wants to merge 4 commits into
OpenNebula:masterfrom
cgroschupp:feature/multiple-vips-pr

Conversation

@cgroschupp

Copy link
Copy Markdown

OpenNebula HA deployments currently support only one virtual IP. This change adds support for assigning multiple VIPs through the RAFT failover hooks.

one_vips accepts either full mappings:

one_vips:
  - address: 10.11.12.13
    interface: eth0
    cidr: 24
  - address: 10.11.13.13
    interface: eth1
    cidr: 24

or scalar addresses with global defaults:

one_vip_if: eth0
one_vip_cidr: 24
one_vips:
  - 10.11.12.13
  - 10.11.13.13

The first entry is used as the primary endpoint when one_vip is undefined. Defining one_vip explicitly continues to override the primary endpoint while all entries in one_vips are managed by the failover hooks.

Compatibility

Existing deployments using one_vip, one_vip_if and one_vip_cidr continue to work unchanged.

@sk4zuzu sk4zuzu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cgroschupp,

Thank you for your contribution.
I'd like to request a change before accepting this PR.

If I'm not wrong what you want to automate is the modification of certificates and more arguments passed to vip.sh. However it looks like the same code is repeated in several places. I think a cleaner approach would be to decide early what one_vip should be via set_fact in the opennebula.deploy.common role. The one_vip fact could be just extracted from one_vips and stored via set_fact, that way most of the code would stay without modification in the correct simple form. Then in only those two mentioned places you could provide a list of VIPs constructed from one_vips if present.

If you agree with these modifications please change your PR accordingly and I'll accept this contribution.

@cgroschupp
cgroschupp force-pushed the feature/multiple-vips-pr branch from 4a7048b to 3c57426 Compare November 4, 2026 11:11
@cgroschupp

Copy link
Copy Markdown
Author

Thank you for the review. I agree that resolving the primary one_vip early in opennebula.deploy.common would avoid the repeated fallback logic and keep the existing code simpler.
I’ll update the PR to derive one_vip from the first entry in one_vips when it isn’t explicitly set, and use the full VIP list only for certificate configuration and the arguments passed to vip.sh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants