[JIRA] (JENKINS-41567) Vsphere plugin and dynamic slaves

11 views
Skip to first unread message

rafael.werner.85@gmail.com (JIRA)

unread,
Jan 30, 2017, 11:52:02 AM1/30/17
to jenkinsc...@googlegroups.com
Rafael Werner created an issue
 
Jenkins / Bug JENKINS-41567
Vsphere plugin and dynamic slaves
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: CloudConfiguration.jpg, NodeConfiguration.jpg, SlaveStartupError.jpg
Components: vsphere-cloud-plugin
Created: 2017/Jan/30 4:51 PM
Environment: Jenkins version: 2.7.1
Vsphere-cloud-plugin version 2.15
VMWare version: 6
Labels: plugin jenkins vsphere
Priority: Major Major
Reporter: Rafael Werner

Hello all,

After doing a lot of research I had to come here and do my question "in person" cause I couldnt find my answer.

what I am trying to do: Configure vsphere cloud and start a dynamic slave using the template configured on the vsphere cloud plugin.

What is going on so far?
I have a job which only has the following:
node('nodeLabel')

{ bat 'dir' }

"nodeLabel" is the name I gave on the template configuration of the vsphere cloud. Once I start the job, I can see that a new machine is created (cloned from my template) and it is started and then nothing happens anymore. The job cannot login to the machine cause it doesnt now the user name and password to it and also, even if I login myself, jenkins cannot start the node as a slave.

On the wiki of the page there is an image where it shows that you can give an user name and password to the template, but with the newer version this is not existing anymore.

How can I make this to work? Is this a known issue or am I missing something?

There are three pictures attached:
CloudConfiguration.jpg: How I configured my vsphere cloud
SlaveStartupError.jpg: the error that happens when the slave is trying to be created.
NodeConfiguration.jpg: The dynamic node that the plugin created (strange thing here is that there is no execution line for the slave and also no "secret" code)

Thank you all in advance,
Rafael

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

pjdarton@gmail.com (JIRA)

unread,
Mar 23, 2018, 10:53:02 AM3/23/18
to jenkinsc...@googlegroups.com
pjdarton closed an issue as Not A Defect
 

FYI I've updated the wiki page with a bit of additional explanatory text.  Hopefully that should give enough detail to get things working.

In any case, this is not a bug.

Change By: pjdarton
Status: Open Closed
Resolution: Not A Defect
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

kanageswari.k@microfocus.com (JIRA)

unread,
Aug 27, 2019, 2:08:02 AM8/27/19
to jenkinsc...@googlegroups.com
Kanageswari K commented on Bug JENKINS-41567
 
Re: Vsphere plugin and dynamic slaves

We have a pipeline that requires multiple VMs eg: master and worker nodes that execute script on all of them. 

When I use nested statements of

def MASTER_NODE= “”

def WORKER_NODE=””

node('node-label) {    // master

MASTER_NODE = sh(script: 'hostname -f', returnStdout: true).trim()

node('node- label)

{   // worker WORKER_NODE = sh(script: 'hostname -f', returnStdout: true).trim() …… .... }

}

it creates VMs and made it as slave nodes but the scope in the jenkins file remains to the inner most VM  which is worker in my case. I have to switch the context between master and slave VMs multiple times and run scripts.   Is there a way to achieve this usecase?

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

kanageswari.k@microfocus.com (JIRA)

unread,
Aug 27, 2019, 2:09:03 AM8/27/19
to jenkinsc...@googlegroups.com
Kanageswari K edited a comment on Bug JENKINS-41567
We have a pipeline that requires multiple VMs eg: master and worker nodes that execute script on all of them. 

When I use nested statements of

def MASTER_NODE= “”

def WORKER_NODE=””

node('node-label) {    // master

MASTER_NODE = sh(script: 'hostname -f', returnStdout: true).trim()

node('node- label)
  {   // worker

WORKER_NODE = sh(script: 'hostname -f', returnStdout: true).trim()

……


....

}

}

it plugin creates VMs and made it as slave nodes but the *scope in the jenkins file remains to the inner most VM*  which is worker in my case. I have to *switch the context between master and slave VMs* multiple times and run scripts.   Is there a way to achieve this usecase?

kanageswari.k@microfocus.com (JIRA)

unread,
Aug 27, 2019, 2:10:02 AM8/27/19
to jenkinsc...@googlegroups.com
Kanageswari K edited a comment on Bug JENKINS-41567
We have a pipeline that requires multiple VMs eg: master and worker nodes that execute script on all of them. 

When I use nested statements of

def MASTER_NODE= “”

def WORKER_NODE=””

node('node-label) {    // master

MASTER_NODE = sh(script: 'hostname -f', returnStdout: true).trim()

node('node- label) {   // worker
 

 

WORKER_NODE = sh(script: 'hostname -f', returnStdout: true).trim()

 

…… ....

}

}

plugin creates VMs and made it as slave nodes but the *scope in the jenkins file remains to the inner most VM*  which is worker in my case. I have to *switch the context between master and slave VMs* multiple times and run scripts.   Is there a way to achieve this usecase?

pjdarton@gmail.com (JIRA)

unread,
Aug 27, 2019, 5:10:05 AM8/27/19
to jenkinsc...@googlegroups.com
pjdarton commented on Bug JENKINS-41567

I have no idea if your usecase is possible - I'd guess it is as most things are possible (especially using a pipeline), but I don't know how, and this isn't the place for general support questions.
I'd suggest you ask in the Jenkins forums about how to alternate between master & slave contexts - your usecase is unlikely to be specific to the vSphere plugin.

kanageswari.k@microfocus.com (JIRA)

unread,
Aug 27, 2019, 5:16:02 AM8/27/19
to jenkinsc...@googlegroups.com

Thanks for your response. Sorry if my question is not very obvious. It is already a working pipeline in which we have implemented this specific usecase with both static slaves and pooled nodes. The question here is about how to use the vsphere cloud plugin to create and use multiple VMs in the pipeline.  using node('node-label) {  the scope is limited to that particular slave node.

kanageswari.k@microfocus.com (JIRA)

unread,
Aug 27, 2019, 5:17:02 AM8/27/19
to jenkinsc...@googlegroups.com
Kanageswari K edited a comment on Bug JENKINS-41567
Thanks for your response. Sorry if my question is not very obvious. It is already a working pipeline in which we have implemented this specific usecase with both static slaves and pooled nodes. The question here is about * how to use the vsphere cloud plugin to create and use multiple VMs in the pipeline * .  using node('node-label) {  the scope is limited to that particular slave node.
Reply all
Reply to author
Forward
0 new messages