Bug 839033

Summary: The engine-config tool doesn't update correctly AdUserPassword
Product: [Retired] oVirt Reporter: Juan Hernández <juan.hernandez>
Component: ovirt-engine-configAssignee: Yair Zaslavsky <yzaslavs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: unspecifiedCC: acathrow, dyasny, iheim, oourfali, shavivi, ykaul, yzaslavs
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-09 21:34:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juan Hernández 2012-07-10 18:13:03 UTC
Description of problem:

The engine-config tool doesn't update correctly the AdUserPassword configuration parameter, it always saves to the database an empty string, regardless of the value provided in the command line.

This also means that engine-manage-domains will apparently work correctly, but will not add the domains correctly to the engine.

Version-Release number of selected component (if applicable):

Master branch, commit 2e4faddde925ce4617eeec23a4e18659d6f90ae7.

How reproducible:

Always.

Steps to Reproduce:

1. Create a custom configuration file with the following content (this is to simulate the behaviour of engine-manage-domains calling engine-config):

cat > /tmp/f.conf <<.
AdUserName
AdUserPassword.type=CompositePassword
LDAPSecurityAuthentication
DomainName
AdUserId
LdapServers
LDAPProviderTypes
.

2. Create a password file with the content of updated content of AdUserPassword (as engine-manage-domains would do):

echo example.com:mypassword > /tmp/f.pass

3. Run the engine-config tool:

# engine-config -s AdUserPassword --admin-pass-file /tmp/f.pass -p /tmp/f.conf
# echo $?
0
  
Actual results:

The tool returns 0 and doesn't print any error message, but the value in the database is not updated correctly:

engine=> select * from vdc_options where option_name = 'AdUserPassword';
 option_id |  option_name   | option_value | version 
-----------+----------------+--------------+---------
        10 | AdUserPassword |              | general
(1 row)

Expected results:

The tool should either return an error value or update the database correctly.

Additional info:

I think this error has been introduced by the change that adds the --admin-pass-file option, as it doesn't handle correctly composite passwords like AdUserPassword.

Comment 1 Juan Hernández 2012-07-11 11:25:38 UTC
Take into account that there is already a change proposed to fix this bug:

http://gerrit.ovirt.org/6096

Comment 2 Juan Hernández 2012-07-11 11:47:57 UTC
Comment #1 is wrong, that patch doesn't fix this bug, but other issues.

Comment 3 Yair Zaslavsky 2012-07-12 16:07:16 UTC
Suggested patch - http://gerrit.ovirt.org/#/c/6191/