ec2-plugin icon indicating copy to clipboard operation
ec2-plugin copied to clipboard

JENKINS-25209: Add "reboot slave after build" for a slave template

Open arcivanov opened this issue 10 years ago • 32 comments

Adds slave template option to reboot a slave after a build Once reboot commences the slave is monitored, reconnects are started and the slave is reenabled once reconnect succeeds. Fixes NPEs in tag handling Make constructors more tolerant of null-strings. Fix EC2ComputerLauncher switch state handling and breaks-to-label

arcivanov avatar Oct 19 '14 16:10 arcivanov

Jenkins » ec2-plugin #50 FAILURE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Oct 19 '14 16:10 buildhive

Jenkins » ec2-plugin #51 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Oct 19 '14 16:10 buildhive

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

jenkinsadmin avatar Oct 19 '14 18:10 jenkinsadmin

Jenkins » ec2-plugin #56 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Nov 06 '14 02:11 buildhive

Jenkins » ec2-plugin #59 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Nov 13 '14 02:11 buildhive

Jenkins » ec2-plugin #60 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Nov 13 '14 03:11 buildhive

Jenkins » ec2-plugin #61 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Nov 14 '14 19:11 buildhive

retest this please

arcivanov avatar Nov 14 '14 20:11 arcivanov

Thank you for your contribution. Can you please update this to reflect the current source? After that I will test and merge it. Sorry for the delay in getting to this.

francisu avatar Dec 27 '14 17:12 francisu

Jenkins » ec2-plugin #74 FAILURE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Dec 28 '14 19:12 buildhive

Jenkins » ec2-plugin #75 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Dec 28 '14 21:12 buildhive

Rebased as requested

arcivanov avatar Dec 28 '14 22:12 arcivanov

retest this please

arcivanov avatar Jan 10 '15 04:01 arcivanov

Thanks Arcadiy, I'm having trouble testing this as there seems to be some problem with Eclipse when using the more recent Jenkins libraries. Please give me some more time on this. I'm not going to take anything else though until I have finished with your pull request.

francisu avatar Jan 21 '15 08:01 francisu

Thanks, Francis. There is something weird going on on Eclipse with older libraries indeed. I've had to modify pom to use 1.565.3 while testing locally and it worked fine. I would then change the pom.xml back to the older version of Jenkins libraries before compiling from the command line/CI and checking in.

arcivanov avatar Jan 21 '15 08:01 arcivanov

Hi Arcadiy, I spent a little time with this. I changed the version in the pom to use 1.565.3 and I had to remove the "@DataBoundConstructor" from EC2AbstractSlave to get it to compile. And then when I ran the tests, a couple of them failed: http://pastebin.com/Xqu3NNyN. With the original pom version, 35 of the tests failed (just running "mvn clean test" I spent some time trying to work out the problems with the test that I think they are in the handling of passwords, probably using the Secret class, but I ran out of time I could spend to try and come up with a fix. If you are unable to reproduce the original test failures, let me know and I can give you the output. Can you look at this some more? Thanks, Francis

francisu avatar Jan 22 '15 01:01 francisu

Jenkins » ec2-plugin #105 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Mar 28 '15 04:03 buildhive

This is the reason why the tests fail:

WARNING: Caught exception evaluating: h.getPasswordValue(attrs.value ?: instance[attrs.field]) in /configure. Reason: java.lang.SecurityException: attempted to render plaintext ‘Rc9PPykm5L1LpETfW45sWXV9A/5+rNILB2tMxC9VPt8=’ in password field; use a getter of type Secret instead

The problem is that at hudson.Functions.getPasswordValue(Functions.java:1682) we now force unit test failures for security reasons.

arcivanov avatar Mar 28 '15 07:03 arcivanov

Jenkins » ec2-plugin #106 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Mar 28 '15 08:03 buildhive

Jenkins » ec2-plugin #117 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Jun 13 '15 17:06 buildhive

Jenkins » ec2-plugin #119 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Jun 13 '15 19:06 buildhive

Jenkins » ec2-plugin #150 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Oct 05 '15 21:10 buildhive

Jenkins » ec2-plugin #151 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Oct 05 '15 22:10 buildhive

Jenkins » ec2-plugin #153 UNSTABLE Looks like there's a problem with this pull request (what's this?)

buildhive avatar Oct 06 '15 18:10 buildhive

Just a note, this option should not be enabled for spot instances as they cannot reboot.

johnnyshields avatar May 07 '16 23:05 johnnyshields

@francisu I will pickup this feature and combine it with some others I have planned. We can leave this PR open for now.

johnnyshields avatar May 09 '16 13:05 johnnyshields

@johnnyshields was this merged in one form or the other?

arcivanov avatar Dec 23 '16 21:12 arcivanov

Not yet, if you want to help with it you're welcome to.

johnnyshields avatar Dec 26 '16 02:12 johnnyshields

@johnnyshields help with what? :smile:

I have rebased on the latest master and this is ready for merge on its own merits. I have removed the reboot option for spot instances per above and the option will be ignored for them.

arcivanov avatar Dec 26 '16 17:12 arcivanov

@johnnyshields @francisu if you need "help", could you at least specify help with what?

arcivanov avatar Jan 18 '17 17:01 arcivanov