Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61238

Missing start function in configuration of a slave which is a virtual machine

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • slave-setup-plugin
    • None
    • Jenkins 2.22 running on a linux machine as master

      If you select the agent management and you try to reconfigure an agent, you will not see the field startfunction if the agent is a virtual machine, which can be started over a vcenter.
      If the agent is a real unix system you will see the field.
      In the attachment I show the configration of 2 different agent. The agent with name "sst-j-a7w9d0" is a real server with operating system AIX 7.2. The agent will be started by SSH.
      The second agent with name "sst-j-r7e7o2" is a linux virtual machine managed by a vcenter. The machine will be reset to a snapshot and then started by the vcenter. After some time (currently we wait about 5 minutes) the jenkins slave is started by SSH like the slave on AIX. But you cant't change the start method in the configuration.
      If you create a new node by copying an existing you will also not be able to change the primary start method.
      You are not able to change the start method to JNLP connection if the agent is a windows virtual machine with the jenkins slave installed as a windows service.
      If you save the configuration of a so configured windows agent (jenkins slave as windows service) the slave will no longer be able to connect to the jenkins master, because the save removed the class of the JNLP connection in the nodes configuration file.

      For instance in the "nodes/computername/config.xml" the line with the classname "hudson.slaves.JNLPLauncher" will be removed, if you save the configuration of the windows node.

      <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/>
      <launcher class="org.jenkinsci.plugins.vSphereCloudLauncher">
      <launcher class="hudson.slaves.JNLPLauncher">
      <workDirSettings>
      <disabled>true</disabled>
      <internalDir>remoting</internalDir>
      <failIfWorkDirIsMissing>false</failIfWorkDirIsMissing>
      </workDirSettings>
      <webSocket>false</webSocket>
      </launcher>
      <overrideLaunchSupported>true</overrideLaunchSupported>
      <vsDescription>VC4</vsDescription>
      <vmName>sst-j-w6j0p9</vmName>
      <waitForVMTools>true</waitForVMTools>
      <snapName></snapName>
      <launchDelay>60</launchDelay>
      <idleAction>NOTHING</idleAction>
      <LimitedTestRunCount>0</LimitedTestRunCount>
      </launcher>

          [JENKINS-61238] Missing start function in configuration of a slave which is a virtual machine

          Reiner Wirtz added a comment -

          Possible it depends on a duplicate name ("launcher") in the xml-structure.
          After saving the configuration the inner block with name "launcher" is missing in the configuration file "config.xml" for the node.
          If the inner block in the node confguration is missing, there are problems in connecting the slave.
          This is true for both slaves, linux (connected by ssh-launcher) or windows (slave as windows service).

          Reiner Wirtz added a comment - Possible it depends on a duplicate name ("launcher") in the xml-structure. After saving the configuration the inner block with name "launcher" is missing in the configuration file "config.xml" for the node. If the inner block in the node confguration is missing, there are problems in connecting the slave. This is true for both slaves, linux (connected by ssh-launcher) or windows (slave as windows service).

            peppe Giuseppe Landolfi
            rw250155 Reiner Wirtz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: