It would be useful to have a function that removes existing logs. This easily allows CI tests to use a fresh set of logs
Looks good. I have one question...
Why you have to have 2 %s's for one fullCmd variable?
255 rc = os.system("%s %s" % (fullCmd)) 260 rc = os.system("%s %s" % (fullCmd))
{{{ … … class DirSrvTools(object): 241 252 done = True 242 253 elif line.find("Initialization Failed") >= 0: 243 254 # sometimes the server fails to start - try again 244 rc = os.system("%s" % (fullCmd)) 255 rc = os.system("%s %s" % (fullCmd)) 245 256 pos = logfp.tell() 246 257 break 247 258 elif line.find("exiting.") >= 0: 248 259 # possible transient condition - try again 249 rc = os.system("%s" % (fullCmd)) 260 rc = os.system("%s %s" % (fullCmd)) 250 261 pos = logfp.tell() 251 262 break 252 263 pos = logfp.tell() }}}
Replying to [comment:2 nhosoi]:
Looks good. I have one question... Why you have to have 2 %s's for one fullCmd variable? 255 rc = os.system("%s %s" % (fullCmd)) 260 rc = os.system("%s %s" % (fullCmd)) {{{ … … class DirSrvTools(object): 241 252 done = True 242 253 elif line.find("Initialization Failed") >= 0: 243 254 # sometimes the server fails to start - try again 244 rc = os.system("%s" % (fullCmd)) 255 rc = os.system("%s %s" % (fullCmd)) 245 256 pos = logfp.tell() 246 257 break 247 258 elif line.find("exiting.") >= 0: 248 259 # possible transient condition - try again 249 rc = os.system("%s" % (fullCmd)) 260 rc = os.system("%s %s" % (fullCmd)) 250 261 pos = logfp.tell() 251 262 break 252 263 pos = logfp.tell() }}}
Oh this is a rebase issue - I'll reattach a new patch shortly...
I'm not sure that I like this using a searchFile interface. I feel it could go wrong very easily if things were in the wrong location.
I know that during instance creation opening, we have the ability to parse out keys from dse.ldif into the DirSrv.props dict. Maybe it would be worth using that to pull out the correct log locations for deletion candidates?
Otherwise, I approve highly of the default timeouts and the commenting of functions :)
Replying to [comment:4 firstyear]:
I'm not sure that I like this using a searchFile interface. I feel it could go wrong very easily if things were in the wrong location. I know that during instance creation opening, we have the ability to parse out keys from dse.ldif into the DirSrv.props dict. Maybe it would be worth using that to pull out the correct log locations for deletion candidates?
self.errlog and friends are pulled in from dse.ldif in init.py. Am I missing something?
William, can you respond to my response please. Thanks
Hi Mark,
I think there are some merge(?)/cherry-pick(?) errors...
1). I think I asked you about this same diff once before... ;) {{{ … … class DirSrvTools(object): 241 252 done = True 242 253 elif line.find("Initialization Failed") >= 0: 243 254 # sometimes the server fails to start - try again 244 rc = os.system("%s" % (fullCmd)) 255 rc = os.system("%s %s" % (fullCmd)) 245 256 pos = logfp.tell() 246 257 break 247 258 elif line.find("exiting.") >= 0: 248 259 # possible transient condition - try again 249 rc = os.system("%s" % (fullCmd)) 260 rc = os.system("%s %s" % (fullCmd)) }}}
2) A conflict? {{{ 32 <<<<<<< 568b7767ba5dd27f9c3dcf17a69703bbe92bf37b 32 33 import subprocess 34 ======= 35 import time 36 >>>>>>> Ticket 48796 - add function to remove logs }}}
And I have one tiny request about the access log... Could it be possible to make it easy to disable access log buffering in the CI test?
Otherwise, you have my ack.
revision 0001-Ticket-48796-add-function-to-remove-logs.patch
Replying to [comment:7 nhosoi]:
Hi Mark, I think there are some merge(?)/cherry-pick(?) errors... 1). I think I asked you about this same diff once before... ;) {{{ … … class DirSrvTools(object): 241 252 done = True 242 253 elif line.find("Initialization Failed") >= 0: 243 254 # sometimes the server fails to start - try again 244 rc = os.system("%s" % (fullCmd)) 255 rc = os.system("%s %s" % (fullCmd)) 245 256 pos = logfp.tell() 246 257 break 247 258 elif line.find("exiting.") >= 0: 248 259 # possible transient condition - try again 249 rc = os.system("%s" % (fullCmd)) 260 rc = os.system("%s %s" % (fullCmd)) }}}
Ugh it snuck back in! My bad.
2) A conflict? {{{ 32 <<<<<<< 568b7767ba5dd27f9c3dcf17a69703bbe92bf37b 32 33 import subprocess 34 ======= 35 import time 36 >>>>>>> Ticket 48796 - add function to remove logs }}} And I have one tiny request about the access log... Could it be possible to make it easy to disable access log buffering in the CI test?
There already is:
{{{ topology.standalone.setAccessLogBuffering(True/False) }}}
New patch attached.
Thanks, Mark
Great! Thanks a lot, Mark!
Thanks Noriko!
568b776..2aef04f master -> master commit 2aef04fac99d2fed54c72b019aced11ed36133b6 Author: Mark Reynolds mreynolds@redhat.com Date: Fri May 13 16:14:08 2016 -0400
Metadata Update from @mreynolds: - Issue assigned to mreynolds - Issue set to the milestone: lib389 1.0.2
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/1856
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.