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

Launcher's afterDisconnect() method is called twice

      When a DumbSlave disconnects, the launcher's afterDisconnect() is called twice.
      This means, for instance, that a VM configured to shutdown and revert after a disconnect will do so twice.

          [JENKINS-35272] Launcher's afterDisconnect() method is called twice

          Giuseppe Landolfi created issue -
          Giuseppe Landolfi made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: vsphere-cloud-plugin [ 16104 ]
          Giuseppe Landolfi made changes -
          Description Original: The call to r.getExecutor().getOwner().disconnect() in vSphereCloudSlave causes vSphereCloudLauncher's afterDisconnect() to be called twice, on separate threads. This means, for instance, that a VM configured to shutdown and revert after a disconnect will do so twice.

          This appears to be an issue with Jenkins itself.

          A temporary fix on my side is the use of an AtomicBoolean to prevent the afterDisconnect from executing its logic twice. Would this be considered an acceptable patch?

           
          New: When a DumbSlave disconnects, the launcher's afterDisconnect() is called twice.
          This means, for instance, that a VM configured to shutdown and revert after a disconnect will do so twice.


           
          Giuseppe Landolfi made changes -
          Link New: This issue duplicates JENKINS-22740 [ JENKINS-22740 ]

          Giuseppe Landolfi added a comment - - edited

          Behavior observed also with DumbSlave

          Giuseppe Landolfi added a comment - - edited Behavior observed also with DumbSlave
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 171514 ] New: JNJira + In-Review [ 184339 ]
          Oleg Nenashev made changes -
          Labels New: newbie-friendly
          Vyshakh Nambiar made changes -
          Assignee New: Vyshakh Nambiar [ vn17 ]
          Vyshakh Nambiar made changes -
          Assignee Original: Vyshakh Nambiar [ vn17 ]

            Unassigned Unassigned
            peppe Giuseppe Landolfi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: