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

Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher

      This simple pipeline script causes "java.io.NotSerializableException: org.jenkinsci.plugins.vSphereCloudLauncher" exception (see consoleText in attachments):

      import hudson.model.Node
      
      pipeline {
          agent {label 'master'}
          stages {
              stage('Defect reproducing stage') {
                  steps {
                      script {
                          List<Node> nodes = jenkins.model.Jenkins.get().nodes;
                          sleep(5);
                      }
                  }
              }
          }
      }
      
      

          [JENKINS-61000] Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher

          Alexandr Panshin created issue -
          Alexandr Panshin made changes -
          Description New: This simple pipeline script causes exception (see consoleText in attachments):


          {code:java}
          import hudson.model.Node

          pipeline {
              agent {label 'master'}
              stages {
                  stage('Defect reproducing stage') {
                      steps {
                          script {
                              List<Node> nodes = jenkins.model.Jenkins.get().nodes;
                              sleep(5);
                          }
                      }
                  }
              }
          }

          {code}
          Environment New: Jenkins 2.190.3
          vSphere Plugin 2.21
          Alexandr Panshin made changes -
          Description Original: This simple pipeline script causes exception (see consoleText in attachments):


          {code:java}
          import hudson.model.Node

          pipeline {
              agent {label 'master'}
              stages {
                  stage('Defect reproducing stage') {
                      steps {
                          script {
                              List<Node> nodes = jenkins.model.Jenkins.get().nodes;
                              sleep(5);
                          }
                      }
                  }
              }
          }

          {code}
          New: This simple pipeline script causes "java.io.NotSerializableException: org.jenkinsci.plugins.vSphereCloudLauncher" exception (see consoleText in attachments):


          {code:java}
          import hudson.model.Node

          pipeline {
              agent {label 'master'}
              stages {
                  stage('Defect reproducing stage') {
                      steps {
                          script {
                              List<Node> nodes = jenkins.model.Jenkins.get().nodes;
                              sleep(5);
                          }
                      }
                  }
              }
          }

          {code}
          Alexandr Panshin made changes -
          Environment Original: Jenkins 2.190.3
          vSphere Plugin 2.21
          New: Jenkins 2.204.2
          vSphere Plugin 2.21
          Alexandr Panshin made changes -
          Labels New: vSphereCloudLauncher
          Alexandr Panshin made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          vjuranek made changes -
          Assignee Original: vjuranek [ vjuranek ]

            Unassigned Unassigned
            alpanshin Alexandr Panshin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: