Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1134062

Summary: Enable resolver class factory to accept plain address
Product: [oVirt] ovirt-engine-extension-aaa-ldap Reporter: Ondra Machacek <omachace>
Component: CoreAssignee: Alon Bar-Lev <alonbl>
Status: CLOSED CURRENTRELEASE QA Contact: Ondra Machacek <omachace>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: masterCC: bazulay, bugs, ecohen, iheim, oourfali, yzaslavs
Target Milestone: ---   
Target Release: 1.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: vt3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:33:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine.log none

Description Ondra Machacek 2014-08-26 18:07:57 UTC
Created attachment 931072 [details]
engine.log

Description of problem:


Version-Release number of selected component (if applicable):
ovirt-engine-3.5.0-0.0.master.20140821064931.gitb794d66.el6.noarch

How reproducible:
always

Steps to Reproduce:
pool.default.serverset.type = single
pool.default.socketfactory.type = resolver
pool.default.serverset.single.server = 10.34.63.130
pool.default.auth.type = none

Actual results:
An error occurred while attempting to connect to server 10_34_63_130:389: java_io_IOException: An error occurred while attempting to establish a connection to server /10_34_63_130:389: IllegalArgumentException(trace='createSocket(ResolverSocketFactory_java:60) / run(ConnectThread_java:118)', revision=-1)

Expected results:
Works fine.

Additional info:

Comment 1 Alon Bar-Lev 2014-08-26 18:22:16 UTC
yes, it is actually a safeguard I added long ago before the unboundid-ldapsdk supported the new dynamic lookup[1].

    public Socket createSocket(InetAddress host, int port)
    throws IOException {
        if (host.toString().charAt(0) == '/' || Resolver.isAddress(host.getHostName())) {
            throw new IllegalArgumentException();
        }
        return createSocket(host.getHostName(), port);
    }

so the resolver class factory will fail if it gets InetAddress without name as it cannot resolve it, and it means that the unboundid-ldapsdk was modified to resolve hosts internally, making the resolver class factory useless.

I would like to keep this safeguard as in normal use case it will tell us if something was changed without notice, so I will add attribute for the resolver class factory to permit that explicitly.

[1] http://sourceforge.net/p/ldap-sdk/mailman/ldap-sdk-discuss/thread/5384CEB4.3020902@unboundid.com/

Comment 2 Alon Bar-Lev 2014-08-26 20:34:01 UTC
Added:

pool.default.socketfactory.resolver.enableAddressOnly = false

Comment 3 Ondra Machacek 2014-09-16 09:57:22 UTC
Works fine with 

pool.default.socketfactory.resolver.enableAddressOnly = true

in vt3.1.

Comment 4 Sandro Bonazzola 2014-10-17 12:33:53 UTC
oVirt 3.5 has been released and should include the fix for this issue.