When running py.test the global dictionary "args_instance" is reused for every new instance. It needs to be reset so old values do not carry over to a new instances - giving unexpected results.
Hi Mark,
I guess it'd be a tidious thing, but comparing the existing code, the line 402 is setting PW_DM for the SER_ROOT_PW and the new code is resetting with PASSWORD. Are there any difference there? And I wonder why we have no DEFAULT_SECURE_PORT? (probably, no need... :) {{{ New code: 365 args_instance[SER_ROOT_DN] = DN_DM 366 args_instance[SER_ROOT_PW] = PASSWORD <== ??? 367 args_instance[SER_HOST] = LOCALHOST 368 args_instance[SER_PORT] = DEFAULT_PORT 369 args_instance[SER_SERVERID_PROP] = "template" 370 args_instance[SER_CREATION_SUFFIX] = DEFAULT_SUFFIX }}} {{{ Existing code: 398 self.host = args.get(SER_HOST, LOCALHOST) 399 self.port = args.get(SER_PORT, DEFAULT_PORT) 400 self.sslport = args.get(SER_SECURE_PORT) 401 self.binddn = args.get(SER_ROOT_DN, DN_DM) 402 self.bindpw = args.get(SER_ROOT_PW, PW_DM) <== ??? 403 self.creation_suffix = args.get(SER_CREATION_SUFFIX, DEFAULT_SUFFIX) }}}
Replying to [comment:2 nhosoi]:
Hi Mark, I guess it'd be a tidious thing, but comparing the existing code, the line 402 is setting PW_DM for the SER_ROOT_PW and the new code is resetting with PASSWORD. Are there any difference there? And I wonder why we have no DEFAULT_SECURE_PORT? (probably, no need... :)
I guess it'd be a tidious thing, but comparing the existing code, the line 402 is setting PW_DM for the SER_ROOT_PW and the new code is resetting with PASSWORD. Are there any difference there? And I wonder why we have no DEFAULT_SECURE_PORT? (probably, no need... :)
There is one in _constants.py: DEFAULT_SECURE_PORT = 636
It should be reset, and maybe others. I'll work the patch
{{{ New code: 365 args_instance[SER_ROOT_DN] = DN_DM 366 args_instance[SER_ROOT_PW] = PASSWORD <== ??? 367 args_instance[SER_HOST] = LOCALHOST 368 args_instance[SER_PORT] = DEFAULT_PORT 369 args_instance[SER_SERVERID_PROP] = "template" 370 args_instance[SER_CREATION_SUFFIX] = DEFAULT_SUFFIX }}} {{{ Existing code: 398 self.host = args.get(SER_HOST, LOCALHOST) 399 self.port = args.get(SER_PORT, DEFAULT_PORT) 400 self.sslport = args.get(SER_SECURE_PORT) 401 self.binddn = args.get(SER_ROOT_DN, DN_DM) 402 self.bindpw = args.get(SER_ROOT_PW, PW_DM) <== ??? 403 self.creation_suffix = args.get(SER_CREATION_SUFFIX, DEFAULT_SUFFIX) }}}
lib389 uses "password' for all the passwords: PW_DM, PASSWORD, etc. I used PASSWORD because that is what was used in _constants.py when we first initialize args_instance. I'll change it to PW_DM (across the board)
revision 0001-Ticket-48020-lib389-need-to-reset-args_instance-with.patch
New patch attached....
Thanks, Mark!
To ssh://git.fedorahosted.org/git/389/lib389.git a8cc541..ed48e5a master -> master commit ed48e5a64b1ba224df77d4f7a35e4ec2225398d9 Author: Mark Reynolds mreynolds@redhat.com Date: Fri Jan 30 14:28:16 2015 -0500
Milestone lib389 1.0 deleted
Metadata Update from @mreynolds: - Issue assigned to mreynolds
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/1351
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)
Login to comment on this ticket.