plugins: force IP version depending on static HE IP#91
Merged
Conversation
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>
d5b400b to
4da06a3
Compare
JasperB-TeamBlue
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.