-
Notifications
You must be signed in to change notification settings - Fork 271
Description
The IPA_SERVER_IP environment variable is not respected when used with ipa-replica-install. This causes a range of failure behaviors when adding a replica in domain-level 1 environments.
Steps to reproduce
There are a variety of failure behaviors that show up. I ran into a lot of them chasing this down :-). I've included two easy-to-test scenarios below.
For all scenarios, put the master and replica containers on different hosts or VMs. That way they are not on the same docker network. Obviously, the docker networks shouldn't be connected via swarm
Scenario: Master has no knowledge of replica, replica tries to join master - per the docs.
Test
On the master
- Just have a vanilla master container setup. Nothing special.
On the replica
- Configure replica options that you would expect to in a non-docker environment. For example:
--principal=admin
--admin-password={{ password }}
--domain={{ domain }}
--server={{ freepia_master_server_fqdn }}
--setup-ca
--setup-dns
--no-host-dns
--no-reverse
--forwarder=8.8.8.8
--forwarder=8.8.4.4
--no-ntp
--no-ssh
--no-sshd
--unattended
Outcome
- The client configuration will step will create a DNS entry for the hostname associated with the container. That entry will have an A record with the docker container's IP address.
- The replica configuration process will hang indefinitely at the
conncheckstep
Note, repeating this exact test with the --skip-conncheck option produces a LDAP authentication error after client setup. This is a particularly confusing error and sent us down the wrong path for a while.
Scenario: Master has a pre-existing A record for the replica, replica skips conncheck
Test
On the master
- Setup an A record for the replica's hostname, using the
IPA_SERVER_IP
On the replica
- Use installation options that include
--skip-conncheck, but not--no-reverseor--no-host-dnsentries.
Outcome
- A warning about being unable to have a reverse IP entry will be shown. The reverse entry was for the docker container's address.
- The existing DNS entry in the master will be updated with an additional A record using the docker container's address.
- An error will be displayed at the end of the configuration in the form of
incorrect section name: <IP_ADDRESS>
(This is the error referenced in #92 that couldn't be reproduced.)
Workaround
To work around the issue requires some prep work on the master:
- Create a DNS entry matching the replica's hostname on the master, with an A record for the
IPA_SERVER_IP. - (Optional, but recommended) Create a reverse DNS entry for the
IPA_SERVER_IPand point it back to the DNS entry in 1. - Add the
--skip-conncheckipa-replica-install option. If using--setup-dns, also add the--no-host-dns, and--no-reverseoptions.