Commit af825aa
committed
plugins: force IP version depending on static HE IP
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>1 parent bfbd656 commit af825aa
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
434 | 435 | | |
435 | 436 | | |
436 | 437 | | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
437 | 457 | | |
438 | 458 | | |
439 | 459 | | |
| |||
0 commit comments