Bug 1079816

Summary: quiescent period is not obeyed for consecutive power commands
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: lab controllerAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.16CC: aigao, asaha, dcallagh, mjia, rmancy, xjia
Target Milestone: 0.16.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-26 23:54:22 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:
Bug Depends On:    
Bug Blocks: 1079603    

Description Dan Callaghan 2014-03-24 04:55:21 UTC
Description of problem:
Power quiescent period does not take effect when multiple queued commands are handled consecutively.

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

How reproducible:
easily

Steps to Reproduce:
1. Queue several power commands in quick succession, so that they run consecutively
2. Watch provision.log to see the commands being handled

Actual results:
beaker-provision claims to delay each command for 5 seconds but actually each delay starts at the same time:

Mar 24 14:26:20 bkr.labcontroller.provision DEBUG Entering quiescent period, delaying 5 seconds for command 60148
Mar 24 14:26:20 bkr.labcontroller.provision DEBUG Entering quiescent period, delaying 5 seconds for command 60147
Mar 24 14:26:20 bkr.labcontroller.provision DEBUG Entering quiescent period, delaying 5 seconds for command 60146
Mar 24 14:26:25 bkr.labcontroller.provision DEBUG Handling command {... 'id': 60146}
Mar 24 14:26:26 bkr.labcontroller.provision DEBUG Launching power script ...
Mar 24 14:26:26 bkr.labcontroller.provision DEBUG Waiting on power script pid 25579
Mar 24 14:26:32 bkr.labcontroller.provision DEBUG Finished handling command 60146
Mar 24 14:26:32 bkr.labcontroller.provision DEBUG Handling command {... 'id': 60147}
Mar 24 14:26:32 bkr.labcontroller.provision DEBUG Launching power script ...
Mar 24 14:26:32 bkr.labcontroller.provision DEBUG Waiting on power script pid 25583
Mar 24 14:26:36 bkr.labcontroller.provision DEBUG Finished handling command 60147
Mar 24 14:26:36 bkr.labcontroller.provision DEBUG Handling command {... 'id': 60148}
Mar 24 14:26:38 bkr.labcontroller.provision DEBUG Launching power script ...
Mar 24 14:26:38 bkr.labcontroller.provision DEBUG Waiting on power script pid 25588
Mar 24 14:26:40 bkr.labcontroller.provision DEBUG Polling for queued commands
Mar 24 14:26:42 bkr.labcontroller.provision DEBUG Finished handling command 60148
Mar 24 14:26:42 bkr.labcontroller.provision DEBUG Handling command {... 'id': 60149}
Mar 24 14:26:43 bkr.labcontroller.provision DEBUG Launching power script ...
Mar 24 14:26:43 bkr.labcontroller.provision DEBUG Waiting on power script pid 25592
Mar 24 14:26:48 bkr.labcontroller.provision DEBUG Finished handling command 60149

(The 4 seconds between Launching and Finished is the time taken to actually run the power script, not any delay.)

Expected results:
beaker-provision should actually delay 5 seconds between finishing handling one command and starting the next one.

Comment 2 Dan Callaghan 2014-03-24 07:06:51 UTC
On Gerrit: http://gerrit.beaker-project.org/2494

Comment 3 matt jia 2014-03-24 23:30:59 UTC
The link in the comment 2 is not right .Here it is .

http://gerrit.beaker-project.org/#/c/2949/

Cheers,Matt Jia

Comment 6 Dan Callaghan 2014-03-26 23:54:22 UTC
Beaker 0.16.1 has been released.