Fixing a bit of bad programming used for the first iteration of the feature. #39
Fixing a bit of bad programming used for the first iteration of the feature. #39jswager merged 5 commits intojenkinsci:masterfrom
Conversation
…h expects to reuse the provisioned machines and those provisioned machines were to stay around for a good amount of time. Also, their implementation had a bit of smelly code which I propergated to my initial implementation of provisionable templates. This check in fixes a good amount of those issues.
…re were many Hudson.getInstance calls but that was deprecated so I changed to Jenkins.getInstance. Also with this "house cleaning" I fixed many un-used imports and non-checks for nulls. 2) The new code for vsphere template slaves was messy and smelly. Therefore, I fixed it up by removing the extra computer class and sub-classing the slave class. Now the code looks a lot more clean and professional. Also, adding the benefit of being easier to manage. The second major theme was to fix the vsphere template slave in order for it to work with the workflow job type. First the slave would not be provisioned (that was fixed in a earlier commit) and second the slave would not be un-provisioned. Therefore, I referenced the methods used by Docker to handle slaves. This method more clearly uses the Jenkins' Cloud API to a higher degree. You will see that with the RunOnceCloudRetentionStrategy. With that being said (and implemented) I can add the list of retention strategies to the template so that we can have more lasting provisioned clones.
…what were re-written. This fixes that.
…what were re-written. This fixes that.
…what were re-written. This fixes that.
Fixing a bit of bad programming used for the first iteration of the feature.
|
Fix for this merge urgently requested. jmellor asked: I’m on the latest Jenkins (1.644) and latest plugin (2.9). Reverting to older Jenkins version as far back as 1.624 seems to have no effect. Reverting back to plugin version 2.8 also seems to have no effect on these critical failures. Right now, I’m editing several hundred config.xml files by hand, as the plugin is messing up all jobs pretty badly, whether or not they reference slaves that are controlled using the plugin. I see some comments online about problems with robustness of the Jenkins core API, which may also be contributing to this debacle. JENKINS-32098 also seems to be closely related, but does not describe all the observed damage. Should I wait for the fixed version, or back out to which old version to get to a sane state again? Recommendation is to contact the author of that PR. I'm not actively testing PRs as they come through. |
|
Hello, can you please explain your steps further? Thanks. |
|
Ghost1874 asked:
I have a very mixed set of slave machines. All run various flavours of I am using a somewhat undesirable workaround at this point - keeping all On Wed, Jan 20, 2016 at 9:53 AM, ghost1874 notifications@github.com wrote:
|
|
Hello jmellor, Regards, |
|
Thanks! Where do I get the updated plugin? It does not seem to be on the On Mon, Jan 25, 2016 at 10:52 AM, ghost1874 notifications@github.com
|
|
I have messaged Jason to get this merged. He normally replies in a few days. If I see a message about it being merged, then I will let you know. |
|
Kevin said:
This part of your message is intriguing, and may be something that I can On Mon, Jan 25, 2016 at 10:52 AM, ghost1874 notifications@github.com
|
|
Just released the new version. It should be available in a bit via the On Tue, Jan 26, 2016 at 6:04 AM, John Mellor notifications@github.com
|
|
hello jmellor, I wrote up how to setup Jenkins to provision slaves on-demand on the vsphere-cloud-plugin wiki. I added the link below. Basically in the manage jenkins -> configure system's cloud section, where you have already defined a vsphere cloud. You should now have a section with Slave Templates and a add button next to it. You would add a new template and put in the information as you would define a new clone during a build phase and some information like a static vsphere slave. Then using the Template's label in the job Jenkins will the provision machines based upon that template. Currently the retention strategy is run once so the provisioned clone, after the run, will be un-provisioned, automatically. Thoughtfully, https://wiki.jenkins-ci.org/display/JENKINS/vSphere+Cloud+Plugin |
|
Hi Kevin |
|
Hello Kim, I have yet to start working with Window's slaves. I was just informed, by my system operation's team, that a Windows Master has been created. Hopefully soon, with-in the next month or two, I will have this working on Windows as well. At that time I will reply with my exact steps. Thanks for the interest, |
|
Thx for your reply Kevin. Good to hear it on it’s way ☺ For now I will try to make a workaround. My requirement is to spawn sets of VM’s one windows based and one linux based (in a client server setup). My Win 7 VM template has one NIC with DHCP, and when cloned it’l have a “run once script” that do:
Don’t know how vsphere-cloud plugin will react to rebooting before it is connected. Great work by the way ☺ [capres2] From: ghost1874 [mailto:notifications@github.com] Hello Kim, I have yet to start working with Window's slaves. I was just informed, by my system operation's team, that a Windows Master has been created. Hopefully soon, with-in the next month or two, I will have this working on Windows as well. At that time I will reply with my exact steps. Thanks for the interest, — |
|
This could be pretty straight-forward if we use a WinRM library like
Hopefully this wont be easier-said-than-done, but I'll see if i can get a On another note, if you're interested, the workaround i've been using for The workaround is to configure build steps that will deploy and power on a Thanks, On Tue, Feb 23, 2016 at 11:50 PM, kimschmock notifications@github.com
|
|
Hi Eric From: Eric Lordahl [mailto:notifications@github.com] This could be pretty straight-forward if we use a WinRM library like
Hopefully this wont be easier-said-than-done, but I'll see if i can get a On another note, if you're interested, the workaround i've been using for The workaround is to configure build steps that will deploy and power on a Thanks, On Tue, Feb 23, 2016 at 11:50 PM, kimschmock <notifications@github.1485827954.workers.devmailto:notifications@github.com>
— |
The original implementation was based upon the EC2 cloud plugin, which expects to reuse the provisioned machines and those provisioned machines were to stay around for a good amount of time. Also, their implementation had a bit of smelly code which I propergated to my initial implementation of provisionable templates. This check in fixes a good amount of those issues.