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

Channel#call() should reject requests if the channel is being closed

      It is a follow-up to https://github.com/jenkinsci/jenkins/pull/2923#discussion_r123202990 . The most of Remoting calls in Jenkins should not be really executed when the channel is shutting down. In our case it was a Launcher for Node (JENKINS-38527

       

      I expected channel.call() to handle it, but it does not... The only handler is https://github.com/jenkinsci/remoting/blob/a762e0703a04ae41fbd413b2379d57f80fc282b2/src/main/java/hudson/remoting/Channel.java#L604-L605 , which effectively checks for the closed channel after a bunch of operations. 
      
      IMHO Channel should provide a new API for user-space calls which should not be performed in parallel with close. Making it a default behavior seems to be a breaking change though, needs much testing
      

       

          [JENKINS-45023] Channel#call() should reject requests if the channel is being closed

          Oleg Nenashev created issue -
          Oleg Nenashev made changes -
          Link New: This issue depends on JENKINS-43985 [ JENKINS-43985 ]
          Oleg Nenashev made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Oleg Nenashev made changes -
          Assignee New: Oleg Nenashev [ oleg_nenashev ]
          Oleg Nenashev made changes -
          Epic Link New: JENKINS-38833 [ 175240 ]
          Oleg Nenashev made changes -
          Issue Type Original: New Feature [ 2 ] New: Bug [ 1 ]
          Oleg Nenashev made changes -
          Summary Original: Channel#call() should be able to reject requests if the channel is being closed New: Channel#call() should reject requests if the channel is being closed
          Oleg Nenashev made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Oleg Nenashev made changes -
          Link New: This issue is related to JENKINS-46067 [ JENKINS-46067 ]
          Oleg Nenashev made changes -
          Link New: This issue is related to JENKINS-43038 [ JENKINS-43038 ]
          Oleg Nenashev made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: