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

Jenkins slave node via libvirt appears not to work in JCasC

XMLWordPrintable

      After configuring a Jenkins node to be controlled via libvirt and connect via ssh. Visiting the Jenkins configuration as code export page produces the following error:

      ...
      nodes:
        - virtualMachineSlave:
            delegateLauncher:
              ssh:
                credentialsId: "jenkins-slave"
                host: "jenkins-slave.example.org"
                port: 22
                sshHostKeyVerificationStrategy: "knownHostsFileKeyVerificationStrategy"
            hypervisorDescription: "QEMU+ssh - 192.168.0.2"
            labelString: "docker"
            launcher: |-
              FAILED TO EXPORT
              hudson.plugins.libvirt.VirtualMachineSlave#launcher: io.jenkins.plugins.casc.ConfiguratorException: Can't read attribute 'waitingTimeSecs' from hudson.plugins.libvirt.VirtualMachineLauncher@3d5d735a
                at io.jenkins.plugins.casc.Attribute._getValue(Attribute.java:461)
                at io.jenkins.plugins.casc.Attribute.getValue(Attribute.java:235)
                at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:289)
                at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:328)
                at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:264)
                at io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator.describe(DataBoundConfigurator.java:316)
                at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$convertToNode$de0cd4f8$1(HeteroDescribableConfigurator.java:282)
                at io.vavr.CheckedFunction0.lambda$unchecked$52349c75$1(CheckedFunction0.java:247)
                at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.convertToNode(HeteroDescribableConfigurator.java:282)
                at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.lambda$describe$5(HeteroDescribableConfigurator.java:107)
                at io.vavr.control.Option.map(Option.java:392)
                at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:107)
                at io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:55)
                at io.jenkins.plugins.casc.Attribute._describe(Attribute.java:328)
                at io.jenkins.plugins.casc.Attribute.describe(Attribute.java:257)
                at io.jenkins.plugins.casc.Configurator.describe(Configurator.java:183)
            mode: EXCLUSIVE
            name: "jenkins-slave-libvirt"
            numExecutors: 2
            rebootAfterRun: false
            remoteFS: "/home/jenkins"
            retentionStrategy:
              demand:
                idleDelay: 5
                inDemandDelay: 5
            shutdownMethod: "shutdown"
            startupTimesToRetryOnFailure: 0
            startupWaitingPeriodSeconds: 10
            virtualMachineName: "jenkins-slave"
      ...
      

            mmornati mmornati
            urvnyaroufsht Y K
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: