Re: Stop process started by MasterToSlaveCallable when connection to master is lost
Yea I figured as much, thanks :/ -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/51a4e2b6-26b5-4659-a8de-7039e9236b39%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Stop process started by MasterToSlaveCallable when connection to master is lost
On Sat, Jun 18, 2016 at 7:24 AM, Rouke Broersmawrote: > Does anyone have any idea if this is possible in any way? If you are asking whether there is a listener on the _agent_ side for a disconnection, I am not aware of one. `ComputerListener` runs on the master side. Even if there were a hook run on the agent side, it is questionable whether it would work reliably: an implementation would need to be very careful to force all required classes to have been loaded into the agent JVM while the connection was still alive, since after disconnection any stray code that runs which attempts to load novel classes will simply get `NoClassDefFoundError`s. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3LDQOOtUWrpuXL6Cimhvk5EsHgcLLXP7MqAyf71x3MXA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Stop process started by MasterToSlaveCallable when connection to master is lost
Does anyone have any idea if this is possible in any way? On Friday, June 10, 2016 at 7:20:33 PM UTC+2, Rouke Broersma wrote: > > I am a maintainer of the selenium grid plugin, and as part of our plugin > we start potentially multiple processes on slaves (selenium nodes, as part > of a distributed selenium grid). > We have implemented the RestartListener to shutdown all our selenium nodes > on the slaves when Jenkins is restarting, but I am unable to find how to do > this when the master becomes unavailable for some reason. > > As in, when the master becomes unavailable to a slave, I want to be able > to have the slave shut down it's selenium node processes. This is necessary > because selenium contains an automatic reconnect mechanism, > so if the connection to master is lost for unexpected reasons, we would > end up with duplicate selenium nodes on the slaves (plugin tries to create > new node on all slaves that become available and match the criteria). > This is undesirable. > > So I would like to know, is there a way to tell Jenkins slaves to clean up > any processes I started when it no longer has a connection to master? > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/a005b697-a7ee-43fb-8b2d-4a826eb87d2f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Stop process started by MasterToSlaveCallable when connection to master is lost
Um what? Pipeline builds have nothing whatsoever to do with the plugin. The plugin starts a process on boot that anyone can freely use, has nothing to do with builds. On Fri, Jun 10, 2016, 21:30 Jesse Glickwrote: > On Fri, Jun 10, 2016 at 1:20 PM, Rouke Broersma > wrote: > > when the master becomes unavailable to a slave, I want to be able to > > have the slave shut down it's selenium node processes. > > Of course if you are using Pipeline builds, they should be able to > just keep running, and reattach the log file when the master is back > up and the agent is connected to it again. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Jenkins Developers" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-dev/bOZLnvre19o/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > jenkinsci-dev+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2YAUQHHck4sET3pBfmqhEwp1np1kdKmcGDQcWCtV5aJQ%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAMcAsVo7qsYb%3DA96bE5v1akvqMMjXLOQQSRSyDXu1wh0WDtprA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Stop process started by MasterToSlaveCallable when connection to master is lost
On Fri, Jun 10, 2016 at 1:20 PM, Rouke Broersmawrote: > when the master becomes unavailable to a slave, I want to be able to > have the slave shut down it's selenium node processes. Of course if you are using Pipeline builds, they should be able to just keep running, and reattach the log file when the master is back up and the agent is connected to it again. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2YAUQHHck4sET3pBfmqhEwp1np1kdKmcGDQcWCtV5aJQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Stop process started by MasterToSlaveCallable when connection to master is lost
I am a maintainer of the selenium grid plugin, and as part of our plugin we start potentially multiple processes on slaves (selenium nodes, as part of a distributed selenium grid). We have implemented the RestartListener to shutdown all our selenium nodes on the slaves when Jenkins is restarting, but I am unable to find how to do this when the master becomes unavailable for some reason. As in, when the master becomes unavailable to a slave, I want to be able to have the slave shut down it's selenium node processes. This is necessary because selenium contains an automatic reconnect mechanism, so if the connection to master is lost for unexpected reasons, we would end up with duplicate selenium nodes on the slaves (plugin tries to create new node on all slaves that become available and match the criteria). This is undesirable. So I would like to know, is there a way to tell Jenkins slaves to clean up any processes I started when it no longer has a connection to master? -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/7d2a19ad-eed3-4c1c-958f-6e5b84f1d9e5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.