<< Back to previous view

[QB-2752] Node Distributions
Created: 06/Jul/16  Updated: 21/Jul/16

Status: Closed
Project: QuickBuild
Component/s: None
Affects Version/s: 6.1.14
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Phong Trinh Assigned To: Robin Shen
Resolution: Fixed Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown


 Description   
 Hi Support Team,

  I have Step1, Step2, Step3 and Step4 which are running in parallel, and they are running on 2 nodes which are in resource pool: Pool1. Each of these steps is doing several tests and then revert the node (to what it was before the test) after the test is completed. I am having an issue with this node distribution. For example, Step1 and Step2 are running on those 2 nodes, and Step3 and Step4 are waiting for available nodes. Let said Step1 is completed and executed the revert, but the step3 kicks in before the node to be inactive. The step 3 is failed because the node is down at a middle of the test. Looks like the node doesn't go in active node quick enough. May you advise me on how to handle this node distribution?

 Thanks,
ptrinh

 Comments   
Comment by Robin Shen [ 06/Jul/16 11:51 PM ]
QB does not expect the node to be restarted during use. A workaround is to wrap your ordinary steps under a sequential step, together with two additional steps. Taking step1 for instance, add a sequential step seq1 with node selection setting specified as requiring resource "Pool1", and add below children:
1. the original step1, but set its node selection setting as "run on parent node"
2. add a step "remove from pool" running on server node executing below script:
groovy:
def attributes = parent.node.userAttributes;
attributes["active"] = "yes";
parent.node.setUserAttributes(attributes);
3. add a step "revert node" and set its node selection setting as "run on parent node", and have it execute the node reverting logic

Also make sure to modify Pool1 to add another constraint of only selecting node with attribute "active" defined as "yes".

This way you can exclude the node from Pool1 before it is reverted.
  
Comment by Phong Trinh [ 07/Jul/16 02:13 PM ]
 Thank you for promptly response.

 I got: 14:09:03,272 ERROR - Step 'master>seq>set Attr' is failed: java.lang.NullPointerException: Cannot get property 'node' on null object
 Looks like the issue is with def attributes = parent.node.userAttributes;
Comment by Robin Shen [ 08/Jul/16 01:53 AM ]
My fault, please use below script:
groovy:
def attributes = step.parent.node.userAttributes;
attributes["active"] = "yes";
step.parent.node.setUserAttributes(attributes);
Comment by Phong Trinh [ 20/Jul/16 04:44 PM ]
 It works. Thank you very much.
Generated at Wed May 15 19:39:12 UTC 2024 using JIRA 189.