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

Bug 1408678

Summary: [aaa-ldap-setup] Duplicate profile names definitions on availableProfiles
Product: [oVirt] ovirt-engine-extension-aaa-ldap Reporter: Gonza <grafuls>
Component: SetupAssignee: Ondra Machacek <omachace>
Status: CLOSED CURRENTRELEASE QA Contact: Gonza <grafuls>
Severity: high Docs Contact:
Priority: unspecified    
Version: masterCC: bugs, gklein, grafuls, mperina, oourfali, ylavi
Target Milestone: ovirt-4.1.1Keywords: Reopened
Target Release: 1.3.1Flags: rule-engine: ovirt-4.1+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-extension-aaa-ldap-1.3.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-21 09:31:06 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
setup log none

Description Gonza 2016-12-26 11:04:54 UTC
Created attachment 1235350 [details]
setup log

Description of problem:
Seems like default values for base DN are being taken from supportedLDAPVersion returned when performing search for base DN.

Version-Release number of selected component (if applicable):
ovirt-engine-extension-aaa-ldap-setup-1.3.1-0.0.master.20161219093217.git9a5d8da.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Run ovirt-engine-extension-aaa-ldap-setup and follow configuration for RHDS

Actual results:
Please enter base DN (2,3) [2]: 

Expected results:
setup should show proper default values for base DN

Additional info:
ovirt-engine-extension-aaa-ldap-setup log attached

Comment 1 Ondra Machacek 2017-01-04 21:05:24 UTC
Strange, I can't reproduce. Did you see this issue only for RHDS with round-robin, or also for other providers or server sets?

Comment 2 Gonza 2017-01-06 14:36:41 UTC
Only RHDS but I had this occur with single server too.
Not able to reproduce it anymore neither.

Comment 3 Oved Ourfali 2017-01-09 13:08:03 UTC
It still happens on this one server?

Comment 4 Gonza 2017-01-10 09:01:04 UTC
(In reply to Oved Ourfali from comment #3)
> It still happens on this one server?

not anymore

Comment 5 Gonza 2017-02-09 12:31:08 UTC
Found out the culprit for this issue.
When running ovirt-engine-extension-aaa-ldap-setup with config file that contains rhds profile, the default baseDN is not correct.

[environment:default]
OVAAALDAP_LDAP/profile=str:rhds

Comment 6 Gonza 2017-02-09 12:44:53 UTC
After further investigation, this is due to the profile name being invalid after the rhds profile names for both rhds and rhds rfc2307 being the same.
From log:
2017-02-09 14:34:03 DEBUG otopi.context context.dumpEnvironment:770 ENV OVAAALDAP_LDAP/availableProfiles=list:'[
...
{'profile': 'rfc2307-rhds', 'basedn': 'defaultNamingContext', 'display': 'RHDS RFC-2307 Schema'},
...
{'profile': 'rfc2307-rhds', 'basedn': 'defaultNamingContext', 'display': 'RHDS'}]'

Comment 7 Gonza 2017-02-09 12:57:14 UTC
Same issue with Oracle UD sharing profile name with openldap:
{'rfc2307-openldap', 'basedn': 'namingContexts', 'display': 'OpenLDAP RFC-2307 Schema'}, 
{'rfc2307-openldap', 'basedn': 'namingContexts', 'display': 'Oracle Unified Directory RFC-2307 Schema'},

Comment 8 Ondra Machacek 2017-02-09 16:33:03 UTC
(In reply to Gonza from comment #7)
> Same issue with Oracle UD sharing profile name with openldap:
> {'rfc2307-openldap', 'basedn': 'namingContexts', 'display': 'OpenLDAP
> RFC-2307 Schema'}, 
> {'rfc2307-openldap', 'basedn': 'namingContexts', 'display': 'Oracle Unified
> Directory RFC-2307 Schema'},

This is fine.

Comment 9 Martin Perina 2017-02-13 13:35:13 UTC
Fix is present in ovirt-engine-extension-aaa-ldap-1.3.1

Comment 10 Gonza 2017-04-03 14:00:51 UTC
Verified with:
ovirt-engine-extension-aaa-ldap-setup-1.3.1-1.el7ev.noarch