Skip to content

plugins: force IP version depending on static HE IP#91

Merged
dupondje merged 1 commit intomasterfrom
ip_version_static
Mar 6, 2026
Merged

plugins: force IP version depending on static HE IP#91
dupondje merged 1 commit intomasterfrom
ip_version_static

Conversation

@dupondje
Copy link
Copy Markdown
Member

@dupondje dupondje commented Mar 4, 2026

When a Static Hosted Engine IP is provided, we automatically set the he_force_ip6 or he_force_ip4 variables.

This because otherwise we end up in situations where the hosted engine has an IPv6 address, but tries to connect to the host via IPv4 or the other way around.

When a Static Hosted Engine IP is provided, we automatically set the
he_force_ip6 or he_force_ip4 variables.

This because otherwise we end up in situations where the hosted engine
has an IPv6 address, but tries to connect to the host via IPv4 or the
other way around.

If we start hosted-engine-setup and we specify a static IP address for
the Hosted Engine. We need to handle this better.
Cause now the following could happen:
- A static IPv6 is passed to hosted-engine-setup for the HE
- he_host_ip is not defined
- No he_force_ip6/he_force_ip4 specified

-> As no he_host_ip is passed, this is defined within the playbook
-> he_host_ip is derived from the intersection of IPs the
he_host_address resolves to and the output of `hostname -I`.
The first IP from that intersect is chosen as he_host_ip.
-> This host is added to /etc/hosts on the HE.

But now, if you specify a static IP for the HE, this will get configured
independently from what was set as he_host_ip.
This means that if your host has both IPv4 and IPv6, the he_host_ip
could be an IPv4, and thus the /etc/hosts in the HE contains the IPv4
address of the host.
But if you then specified an IPv6 address for the HE, the HE will be
configured with an IPv6-only address. And in the final stages the HE
will try to connect to your host, it resolves to IPv4 address, and this
will fail, because the HE only has an IPv6 address.

Therefor we set he_force_ip6 or he_force_ip4 depending on the address
version you specify as HE IP.

Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
Copy link
Copy Markdown
Member

@peter-boden peter-boden left a comment

Choose a reason for hiding this comment

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

LGTM

@dupondje dupondje merged commit af825aa into master Mar 6, 2026
8 checks passed
@dupondje dupondje deleted the ip_version_static branch March 6, 2026 08:08
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.

3 participants