Description of problem: When trying to add an AD domain to RHEV Manager configuration, the following error is being printed: # rhevm-manage-domains -action=add -domain=customer.com.br -user=rhev -provider=ActiveDirectory -interactive No LDAP servers can be obtained for domain customer.com.br engine-manage-domains.log has: 2013-07-17 18:18:53,068 ERROR [org.ovirt.engine.core.utils.dns.DnsSRVLocator] Error: could not find DNS SRV record name: _ldap._tcp.customer.com.br. Exception message is: Comparison method violates its general contract! Possible causes: missing DNS entries in the DNS server or DNS resolving issues from engine-core machine. Please Ensure correct DNS entries exist in the DNS server and ensure the DNS server is reachable from the engine-core machine. 2013-07-17 18:18:53,070 ERROR [org.ovirt.engine.core.utils.kerberos.ManageDomains] No LDAP servers can be obtained for domain customer.com.br DNS seems to be properly configured, as forward and reverse records are present. However this DNS domain has several _ldap._tcp, _kerberos._tcp and _kerberos._udp SRV records. Version-Release number of selected component (if applicable): rhevm-config-3.2.0-11.33.el6ev.noarch.rpm How reproducible: Tests have shown it is always reproducible with the DNS zone that will be attached to this bz. Steps to Reproduce: 1. Configure bind to use the zone file provided 2. Run "rhevm-manage-domains -action=add -domain=customer.com.br -provider=ActiveDirectory -user=rhev -interactive" (actually, provider can be any supported option) Actual results: No LDAP servers can be obtained for domain customer.com.br Expected results: User should be asked to enter password and the domain should be properly added to Manager configuration Additional info: I don't have customer actual zone files, but I could reproduce the issue with the configuration attached to this bz. It's not required to create a complete IDM or AD domain to raise this error. Having only the SRV records is sufficient.
Created attachment 775013 [details] sample dns zone to trigger error Dirty and ugly zone file. It's incomplete from a DNS perspective, but it triggers the error. If any of the following records are changed, the error is not triggered: * removal of any of the records with priority == 10 * change of any priority == 5 to priority == 10 If there's only one record with priority == 0 and one with priority == 5, all the others may have priority == 10 and it'll work properly. I couldn't understand the complete logic, though.
A coworker suggested the issue may be related to the way compareTo(SrvRecord other) is implemented in DnsSRVLocator class. @Override public int compareTo(SrvRecord other) { ... if (weight == 0 && other.weight != 0) { return -1; } if (weight != 0) { return 1; } return 0; } He said that when weight is different from 0, it's not possible to correctly order the records, raising an exception. I modified my zone file setting weight to 0 on every SRV record and the exception wasn't triggered.
*** Bug 1034798 has been marked as a duplicate of this bug. ***
Closing - RHEV 3.3 Released