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

runOnceCloud symbol is not unique and break component CasC loading

XMLWordPrintable

    • anka-build-plugin 2.9.0

      The anka-build and vsphere-cloud plugins both have a CloudRetentionStrategy of the same name without using a unique idientifier.:

      This breaks casc loading with:

      Jul 18, 2022 3:44:20 PM io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator handleDuplicateSymbols
      WARNING: Found multiple implementations for symbol = runOnceCloud: [com.veertu.plugin.anka.RunOnceCloudRetentionStrategy$DescriptorImpl@539f8b17, org.jenkinsci.plugins.vsphere.RunOnceCloudRetentionStrategy$DescriptorImpl@115d690a]. Please report to plugin maintainer.
      

      And example like the following reproduce the problem:

      jenkins:
        agentProtocols:
        - "Diagnostic-Ping"
        - "JNLP4-connect"
        - "OperationsCenter2"
        - "Ping"
        clouds:
          - ankaMgmt:
              ankaMgmtUrl: "https://company-anka"
              cloudInstanceCap: -1
              cloudName: "anka"
              launchRetryWaitTime: 10
              maxLaunchRetries: 10
              skipTLSVerification: false
              sshLaunchDelaySeconds: 60
              templates:
              - cloudName: "anka"
                credentialsId: "anka-creds"
                deleteLatest: false
                dontAppendTimestamp: false
                keepAliveOnError: false
                label: "windows anka"
                launchDelay: 0
                launchMethod: "ssh"
                masterVmId: "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
                nameTemplate: "windows-anka"
                numberOfExecutors: 1
                priority: 0
                remoteFS: "C:/jenkins"
                retentionStrategy:
                  runOnceCloud:
                    idleMinutes: 1
                saveImage: false
                saveImageParameters:
                  deleteLatest: false
                  dontAppendTimestamp: false
                  saveImage: false
                  suspend: false
                  templateID: "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
                  waitForBuildToFinish: false
                schedulingTimeout: 1800
                suspend: false
                templateId: "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
                waitForBuildToFinish: false
          - vSphere:
              instanceCap: 100
              maxOnlineSlaves: 0
              templates:
                - cloneNamePrefix: "windows-"
                  cluster: "Company"
                  datastore: "Company-FMD-01"
                  folder: "Company/Jenkins agents/Linked clones"
                  forceVMLaunch: true
                  guestInfoProperties:
                    # ^ escapes the secret
                    - name: "JENKINS_URL"
                      value: "^${JENKINS_URL}"
                  labelString: "windows vsphere"
                  launchDelay: 60
                  launcher:
                    jnlp:
                      tunnel: "jenkins:"
                  limitedRunCount: 1
                  linkedClone: true
                  masterImageName: "windows-server-2019"
                  mode: EXCLUSIVE
                  numberOfExecutors: 1
                  remoteFS: "C:/jenkins"
                  resourcePool: "Resources"
                  retentionStrategy:
                    runOnceCloud:
                      idleMinutes: 2
                  saveFailure: false
                  templateInstanceCap: 5
                  useSnapshot: true
                  waitForVMTools: true
              vsConnectionConfig:
                vsHost: "https://company-vsphere"
              vsDescription: "Company vSphere"
      

            niv_keidan_veertu niv keidan
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: