public void tryReconnect() { numRetryAttempt++; if(numRetryAttempt<6 || (numRetryAttempt%12)==0) { // initially retry several times quickly, and after that, do it infrequently. logger.info("Attempting to reconnect "+nodeName); connect(true); } }
@RequirePOST @Override public void doLaunchSlaveAgent(StaplerRequest req, StaplerResponse rsp) throws IOException { checkPermission(CONNECT); if(channel!=null) { try { req.getView(this, "already-launched.jelly").forward(req, rsp); } catch (IOException x) { throw x; } catch (/*Servlet*/Exception x) { throw new IOException(x); } return; } connect(true); // TODO: would be nice to redirect the user to "launching..." wait page, // then spend a few seconds there and poll for the completion periodically. rsp.sendRedirect("log"); }
public void run() { try { c.connect(true).get(); if (c.isOnline()) { LOGGER.log(INFO, "Launched computer {0} per schedule", new Object[]{c.getName()}); } if (keepUpWhenActive && c.isOnline() && !c.isAcceptingTasks()) { LOGGER.log(INFO, "Enabling new jobs for computer {0} as it has started its scheduled uptime", new Object[]{c.getName()}); c.setAcceptingTasks(true); } } catch (InterruptedException | ExecutionException e) { } } });
@Override protected void setNode(final Node node) { super.setNode(node); launcher = grabLauncher(node); // maybe the configuration was changed to relaunch the agent, so try to re-launch now. // "constructed==null" test is an ugly hack to avoid launching before the object is fully // constructed. if(constructed!=null) { if (node instanceof Slave) { Queue.withLock(new Runnable() { @Override public void run() { ((Slave)node).getRetentionStrategy().check(SlaveComputer.this); } }); } else { connect(false); } } }
c.connect(false);
@Override public void start(SlaveComputer c) { c.connect(false); }
public void tryReconnect() { numRetryAttempt++; if (numRetryAttempt < 6 || (numRetryAttempt % 12) == 0) { // initially retry several times quickly, and after that, do it infrequently. logger.info("Attempting to reconnect " + nodeName); connect(true); } }
public void tryReconnect() { numRetryAttempt++; if(numRetryAttempt<6 || (numRetryAttempt%12)==0) { // initially retry several times quickly, and after that, do it infrequently. logger.info("Attempting to reconnect "+nodeName); connect(true); } }
public void tryReconnect() { numRetryAttempt++; if(numRetryAttempt<6 || (numRetryAttempt%12)==0) { // initially retry several times quickly, and after that, do it infrequently. logger.info("Attempting to reconnect "+nodeName); connect(true); } }
public void tryReconnect() { numRetryAttempt++; if(numRetryAttempt<6 || (numRetryAttempt%12)==0) { // initially retry several times quickly, and after that, do it infrequently. logger.info("Attempting to reconnect "+nodeName); connect(true); } }
public void tryReconnect() { numRetryAttempt++; if(numRetryAttempt<6 || (numRetryAttempt%12)==0) { // initially retry several times quickly, and after that, do it infrequently. logger.info("Attempting to reconnect "+nodeName); connect(true); } }
public void doLaunchSlaveAgent(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { if(channel!=null) { rsp.sendError(HttpServletResponse.SC_NOT_FOUND); return; } connect(true); // TODO: would be nice to redirect the user to "launching..." wait page, // then spend a few seconds there and poll for the completion periodically. rsp.sendRedirect("log"); }
public void doLaunchSlaveAgent(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { if (channel != null) { rsp.sendError(HttpServletResponse.SC_NOT_FOUND); return; } connect(true); // TODO: would be nice to redirect the user to "launching..." wait page, // then spend a few seconds there and poll for the completion periodically. rsp.sendRedirect("log"); }
public void doLaunchSlaveAgent(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { if(channel!=null) { rsp.sendError(HttpServletResponse.SC_NOT_FOUND); return; } connect(true); // TODO: would be nice to redirect the user to "launching..." wait page, // then spend a few seconds there and poll for the completion periodically. rsp.sendRedirect("log"); }
public void doLaunchSlaveAgent(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { if(channel!=null) { rsp.sendError(HttpServletResponse.SC_NOT_FOUND); return; } connect(true); // TODO: would be nice to redirect the user to "launching..." wait page, // then spend a few seconds there and poll for the completion periodically. rsp.sendRedirect("log"); }
@RequirePOST public void doLaunchSlaveAgent(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { if(channel!=null) { req.getView(this,"already-launched.jelly").forward(req, rsp); return; } connect(true); // TODO: would be nice to redirect the user to "launching..." wait page, // then spend a few seconds there and poll for the completion periodically. rsp.sendRedirect("log"); }
public void run() { try { c.connect(true).get(); if (c.isOnline()) { LOGGER.log(INFO, "Launched computer {0} per schedule", new Object[]{c.getName()}); } if (keepUpWhenActive && c.isOnline() && !c.isAcceptingTasks()) { LOGGER.log(INFO, "Enabling new jobs for computer {0} as it has started its scheduled uptime", new Object[]{c.getName()}); c.setAcceptingTasks(true); } } catch (InterruptedException e) { } catch (ExecutionException e) { } } });
@Override protected void setNode(Node node) { super.setNode(node); launcher = grabLauncher(node); // maybe the configuration was changed to relaunch the slave, so try to re-launch now. // "constructed==null" test is an ugly work around to avoid launching before the object is fully // constructed. if(constructed!=null) { if (node instanceof Slave) ((Slave)node).getRetentionStrategy().check(this); else connect(false); } }
public DumbSlave createSlave(JenkinsRule j) throws Exception { DumbSlave s = j.createSlave(); s.getComputer().connect(false).get(); // wait for the slave to fully get connected return s; }
@Override protected void setNode(Node node) { super.setNode(node); launcher = grabLauncher(node); // maybe the configuration was changed to relaunch the slave, so try to re-launch now. // "constructed==null" test is an ugly hack to avoid launching before the object is fully // constructed. if(constructed!=null) { if (node instanceof Slave) ((Slave)node).getRetentionStrategy().check(this); else connect(false); } }