logger.info("Nodes needed to be set password: " + ipsOfNodes.toString());
boolean succeed = true;
List<Callable<Void>> storeProcedures = new ArrayList<Callable<Void>>();
for (NodeEntity node : nodes) {
SetLocalRepoSP setLocalRepoSP =
new SetLocalRepoSP(node, repoId, localRepoURL);
storeProcedures.add(setLocalRepoSP);
}
AuAssert.check(!storeProcedures.isEmpty());
try {
Callable<Void>[] storeProceduresArray =
storeProcedures.toArray(new Callable[0]);
NoProgressUpdateCallback callback = new NoProgressUpdateCallback();
ExecutionResult[] result =
Scheduler
.executeStoredProcedures(
com.vmware.aurora.composition.concurrent.Priority.BACKGROUND,
storeProceduresArray, callback);
for (int i = 0; i < storeProceduresArray.length; i++) {
SetLocalRepoSP sp = (SetLocalRepoSP) storeProceduresArray[i];
NodeEntity node = sp.getNodeEntity();
String vmNameWithIP = node.getVmNameWithIP();
if (result[i].finished && result[i].throwable == null) {
updateNodeData(node, true, null, null);
logger.info("Set local repo: store procedure succeed for "
+ vmNameWithIP);