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

Launcher's afterDisconnect() method is called twice

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            peppe Giuseppe Landolfi created issue -
            peppe Giuseppe Landolfi made changes -
            Field Original Value New Value
            Component/s core [ 15593 ]
            Component/s vsphere-cloud-plugin [ 16104 ]
            peppe Giuseppe Landolfi made changes -
            Description 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?

             
            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.


             
            peppe Giuseppe Landolfi made changes -
            Link This issue duplicates JENKINS-22740 [ JENKINS-22740 ]
            Hide
            peppe Giuseppe Landolfi added a comment - - edited

            Behavior observed also with DumbSlave

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

              People

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

                Dates

                • Created:
                  Updated: