Bug 839033 - The engine-config tool doesn't update correctly AdUserPassword
The engine-config tool doesn't update correctly AdUserPassword
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Community
Component: ovirt-engine-config (Show other bugs)
unspecified
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: Yair Zaslavsky
infra
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-10 14:13 EDT by Juan Hernández
Modified: 2015-03-04 19:18 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 16:34:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Juan Hernández 2012-07-10 14:13:03 EDT
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 07:25:38 EDT
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 07:47:57 EDT
Comment #1 is wrong, that patch doesn't fix this bug, but other issues.
Comment 3 Yair Zaslavsky 2012-07-12 12:07:16 EDT
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.