Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Priority for node #4409

Leemool ·

Hello,

I couldn't find a solution in the support pages.
For a configuration I can use 10 machines.
But I want to use 6 of them as a priority and if these are not available, use the other 4.
I don't know if I should create two different resources and use the node preferences setting.
Knowing that the 6 machines have a different name base than the last 4 to use.
Do you have a clue to help me?

Regards

  • replies 4
  • views 123
  • stars 0
robinshen ADMIN ·

No need to use two difference resources. Just use node preference setting to select preferred node out of candidate nodes.

Leemool ·
2022-04-12_163444.jpg

using this?
I try to use "first matched node", but seems not working like expected.

Thx

robinshen ADMIN ·

Please use the option "select preferred node using script" and specify script as below:

groovy:
def listOfNodes = new ArrayList(nodes);
listOfNodes.sort{it -> it.getAttribute("priority", "100") as int};
return listOfNodes.get(0);

Then for nodes you prefer to use, define user attribute "priority" with a value less than 100.

Leemool ·

Thx a lot it works well,i understand now
I maybe will modify it to use a verification with the name insted of a user attribute verification.

Thx a lot again

Regards