private static void fireOnStarted(final Cloud cloud, final Label label, final Collection<NodeProvisioner.PlannedNode> plannedNodes) { for (CloudProvisioningListener cl : CloudProvisioningListener.all()) { try { cl.onStarted(cloud, label, plannedNodes); } catch (Error e) { throw e; } catch (Throwable e) { LOGGER.log(Level.SEVERE, "Unexpected uncaught exception encountered while " + "processing onStarted() listener call in " + cl + " for label " + label.toString(), e); } } } }
/** * Returns a human readable text that explains this label. */ @Exported public String getDescription() { Set<Node> nodes = getNodes(); if(nodes.isEmpty()) { Set<Cloud> clouds = getClouds(); if(clouds.isEmpty()) return Messages.Label_InvalidLabel(); return Messages.Label_ProvisionedFrom(toString(clouds)); } if(nodes.size()==1) return nodes.iterator().next().getNodeDescription(); return Messages.Label_GroupOf(toString(nodes)); }
private static String getCustomImage(Label label) { Matcher m = CUSTOM_IMAGE_FROM_LABEL_PATTERN.matcher(label.toString()); if (m.find()) { return m.group(1); } return null; }
private static Label getLabelWithoutCustomImage(Label label, String customDockerImage) { return Label.get(label.toString().replace(CUSTOM_IMAGE_SEPARATOR + customDockerImage, "")); }
/** * @deprecated Use {@link Builder} instead. */ @Deprecated public KubernetesSlave(PodTemplate template, String nodeDescription, KubernetesCloud cloud, Label label) throws Descriptor.FormException, IOException { this(template, nodeDescription, cloud.name, label.toString(), new OnceRetentionStrategy(cloud.getRetentionTimeout())) ; }
private static void fireOnStarted(final Cloud cloud, final Label label, final Collection<NodeProvisioner.PlannedNode> plannedNodes) { for (CloudProvisioningListener cl : CloudProvisioningListener.all()) { try { cl.onStarted(cloud, label, plannedNodes); } catch (Error e) { throw e; } catch (Throwable e) { LOGGER.log(Level.SEVERE, "Unexpected uncaught exception encountered while " + "processing onStarted() listener call in " + cl + " for label " + label.toString(), e); } } } }
public KubernetesSlave(String podName, PodRepository podRepository, KubernetesCloud kubernetesCloud, Label label) throws Descriptor.FormException,IOException { super(podName, DESCRIPTION, DEFAULT_REMOTE_FS, EXECUTORS, Mode.NORMAL, label == null ? null : label.toString(), new JNLPLauncher(), new SingleUseRetentionStrategy(IDLE_MINUTES), Collections.<NodeProperty<Node>>emptyList()); this.kubernetesCloud = kubernetesCloud; this.podRepository = podRepository; }
/** * Returns a human readable text that explains this label. */ @Exported public String getDescription() { Set<Node> nodes = getNodes(); if(nodes.isEmpty()) { Set<Cloud> clouds = getClouds(); if(clouds.isEmpty()) return Messages.Label_InvalidLabel(); return Messages.Label_ProvisionedFrom(toString(clouds)); } if(nodes.size()==1) return nodes.iterator().next().getNodeDescription(); return Messages.Label_GroupOf(toString(nodes)); }
/** * Returns a human readable text that explains this label. */ @Exported public String getDescription() { Set<Node> nodes = getNodes(); if(nodes.isEmpty()) { Set<Cloud> clouds = getClouds(); if(clouds.isEmpty()) return Messages.Label_InvalidLabel(); return Messages.Label_ProvisionedFrom(toString(clouds)); } if(nodes.size()==1) return nodes.iterator().next().getNodeDescription(); return Messages.Label_GroupOf(toString(nodes)); }
/** * Returns a human readable text that explains this label. */ @Exported public String getDescription() { Set<Node> nodes = getNodes(); if(nodes.isEmpty()) { Set<Cloud> clouds = getClouds(); if(clouds.isEmpty()) return Messages.Label_InvalidLabel(); return Messages.Label_ProvisionedFrom(toString(clouds)); } if(nodes.size()==1) return nodes.iterator().next().getNodeDescription(); return Messages.Label_GroupOf(toString(nodes)); }
/** * Returns a human readable text that explains this label. */ @Exported public String getDescription() { Set<Node> nodes = getNodes(); if(nodes.isEmpty()) { Set<Cloud> clouds = getClouds(); if(clouds.isEmpty()) return Messages.Label_InvalidLabel(); return Messages.Label_ProvisionedFrom(toString(clouds)); } if(nodes.size()==1) return nodes.iterator().next().getNodeDescription(); return Messages.Label_GroupOf(toString(nodes)); }
/** * Returns a human readable text that explains this label. */ @Exported public String getDescription() { Set<Node> nodes = getNodes(); if (nodes.isEmpty()) { Set<Cloud> clouds = getClouds(); if (clouds.isEmpty()) { return Messages.Label_InvalidLabel(); } return Messages.Label_ProvisionedFrom(toString(clouds)); } if (nodes.size() == 1) { return nodes.iterator().next().getNodeDescription(); } return Messages.Label_GroupOf(toString(nodes)); }
final String labelString = (label != null) ? label.toString() : "none"; final List<Server> runningNodes = getOpenstack().getRunningNodes(); final int globalMax = getEffectiveSlaveOptions().getInstanceCap();
if (label.toString().matches(pattern)) { LOGGER.fine("Node " + c.getNode().getDisplayName() + " is excluded from Selenium Grid because its label '" + label + "' matches exclusion pattern '" + pattern + "'");
LOGGER.info("Instance cap reached while adding capacity for label " + ((label != null) ? label.toString() : "null")); break; // maxed out
labelStr = label.toString();
"Template instance cap of {0} reached for template {1}, not provisioning: {2} running or errored in namespace {3} with label \"{4}\" and Kubernetes labels {5}", new Object[] { template.getInstanceCap(), template.getName(), slaveListItems.size(), templateNamespace, label == null ? "" : label.toString(), labelsMap }); return false; // maxed out
Queue.getInstance().cancel(item); throw new AbortException(MessageFormat.format("Killed {0} after waiting for {1} ms because we assume unknown Node {1} is never going to appear!", new Object[]{item, TIMEOUT_WAITING_FOR_NODE_MILLIS, placeholder.getAssignedLabel().toString()}));
public MesosSlaveInfo getMesosSlaveInfoForLabel(Label label) { if (!matchesLabel(label)) { return null; } if (label == null) { if (getLabelString() == null) { return this; } else { return null; } } if (label.matches(Label.parse(getLabelString()))) { return this; } if (!containerInfo.getDockerImageCustomizable()) { return null; } String customImage = getCustomImage(label); if (customImage == null) { return null; } return copyWithDockerImage(label.toString(), customImage); }