Bug 839033 - The engine-config tool doesn't update correctly AdUserPassword
Summary: The engine-config tool doesn't update correctly AdUserPassword
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-config
Version: unspecified
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: ---
Assignee: Yair Zaslavsky
QA Contact:
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-10 18:13 UTC by Juan Hernández
Modified: 2015-03-05 00:18 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-09 21:34:03 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)

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/


Note You need to log in before you can comment on or make changes to this bug.