History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-2752
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: Phong Trinh
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Node Distributions

Created: 06/Jul/16 02:08 AM   Updated: 21/Jul/16 01:31 AM
Component/s: None
Affects Version/s: 6.1.14
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
 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

 All   Comments   Work Log   Change History      Sort Order:
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.
  

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;

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);

Phong Trinh [20/Jul/16 04:44 PM]
 It works. Thank you very much.