#6467 client reenrollment results in incorrect host record on master
Closed: Invalid Opened by ofayans.

With client hostname belonging to IPA domain, and master already containing client's host record, when I reenroll the client with '--force-join' option, server registers client's "external" hostname instead of configured hostname. As a result, server has 2 host records for the same client.

client-install.log is attached

How to reproduce[[BR]]
1. Setup master.
2. On the client setup the hostname to match IPA domain of the master, for instance: vm-058-210.dom-058-121.
3. Setup client without --hostname option
4. Run 'ipa host-find' on master, the result should contain 2 records: master's and client's, the client hostname should be vm-058-210.dom-058-121.
5. On client block everything except port 22:
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -j DROP
6. Uninstall the client
7. Repeat step 4: results should be the same
7. Flush iptables rules on client
8. Run ipa-client-install on a client without '--hostname' option.
9. Repeat step 4.

Expected results[[BR]]

Master contains 2 host records:

  • master external hostname, e.g. vm-058-121.
  • client's configured hostname, e.g. vm-058-210.dom-058-121.[[BR]]

Actual results[[BR]]

Master contains 3 records:

  • master external hostname, e.g. vm-058-121.
  • client's configured hostname, e.g. vm-058-210.dom-058-121.
  • client's external hostname, e.g. vm-058-210.

Note: step 8 with --hostname option works as expected


It turns out to be a RHEVM issue. RHEVM sometimes renames the VM back to how it was named before. I can not reproduce it anymore today on the same VMs.

Metadata Update from @ofayans:
- Issue assigned to someone
- Issue set to the milestone: 0.0 NEEDS_TRIAGE

Metadata