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

Make Node implement Saveable

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      Make Node implement Saveable

        Attachments

          Issue Links

            Activity

            stephenconnolly Stephen Connolly created issue -
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            changelog.html
            core/src/main/java/hudson/model/Computer.java
            core/src/main/java/hudson/model/Node.java
            core/src/main/java/jenkins/model/Jenkins.java
            core/src/main/java/jenkins/model/Nodes.java
            http://jenkins-ci.org/commit/jenkins/e4b1aab4acab93d638624c7705cfe6eea2d01786
            Log:
            [FIXED JENKINS-31055] Make Node implement Saveable

            • Also tidy up some of the mess logic in both #1866 and #1860
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: changelog.html core/src/main/java/hudson/model/Computer.java core/src/main/java/hudson/model/Node.java core/src/main/java/jenkins/model/Jenkins.java core/src/main/java/jenkins/model/Nodes.java http://jenkins-ci.org/commit/jenkins/e4b1aab4acab93d638624c7705cfe6eea2d01786 Log: [FIXED JENKINS-31055] Make Node implement Saveable Also tidy up some of the mess logic in both #1866 and #1860
            scm_issue_link SCM/JIRA link daemon made changes -
            Field Original Value New Value
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            core/src/main/java/jenkins/model/Nodes.java
            http://jenkins-ci.org/commit/jenkins/8645978bfbe272a494d2bc65cf47104255cfb3fb
            Log:
            JENKINS-31055 Finessing the exception handling

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/jenkins/model/Nodes.java http://jenkins-ci.org/commit/jenkins/8645978bfbe272a494d2bc65cf47104255cfb3fb Log: JENKINS-31055 Finessing the exception handling
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            core/src/main/java/hudson/model/Node.java
            http://jenkins-ci.org/commit/jenkins/db37c76327748261c3b01eebd13369a1ca733282
            Log:
            JENKINS-31055 Replacing @since tag with placeholder to be restored on merge

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/model/Node.java http://jenkins-ci.org/commit/jenkins/db37c76327748261c3b01eebd13369a1ca733282 Log: JENKINS-31055 Replacing @since tag with placeholder to be restored on merge
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            core/src/main/java/hudson/model/Node.java
            http://jenkins-ci.org/commit/jenkins/8e24f69013e96e8b7f8b86e9b7a9133e2412c638
            Log:
            JENKINS-31055 The intent of Node.save() is a no-op when not in Jenkins list of nodes

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/model/Node.java http://jenkins-ci.org/commit/jenkins/8e24f69013e96e8b7f8b86e9b7a9133e2412c638 Log: JENKINS-31055 The intent of Node.save() is a no-op when not in Jenkins list of nodes
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            core/src/main/java/jenkins/model/Nodes.java
            http://jenkins-ci.org/commit/jenkins/d2276c3c9b16fd46a3912ab8d58c418e67d8ce3e
            Log:
            JENKINS-31055 Note theoretical race condtion

            Seems rather unlikely, but none the less it is a possibility. Not sure how we should handle this though:

            • We do not want to hold the Queue lock while performing I/O as that will grind everything to a halt
            • We do not want a big fat lock on all nodes
            • If we have a per-node lock then the save everything method may have to grab them all

            In short, it gets ugly real fast.

            For now, I believe that the risk is very low as releasing a lock does not intrinsically deschedule a currently running thread so the likely course of events is that the thread will release the lock and at least start the save before a competing thread could acquire the lock update remove the node release the lock and delete the node's directory

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/jenkins/model/Nodes.java http://jenkins-ci.org/commit/jenkins/d2276c3c9b16fd46a3912ab8d58c418e67d8ce3e Log: JENKINS-31055 Note theoretical race condtion Seems rather unlikely, but none the less it is a possibility. Not sure how we should handle this though: We do not want to hold the Queue lock while performing I/O as that will grind everything to a halt We do not want a big fat lock on all nodes If we have a per-node lock then the save everything method may have to grab them all In short, it gets ugly real fast. For now, I believe that the risk is very low as releasing a lock does not intrinsically deschedule a currently running thread so the likely course of events is that the thread will release the lock and at least start the save before a competing thread could acquire the lock update remove the node release the lock and delete the node's directory
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            changelog.html
            core/src/main/java/hudson/model/Computer.java
            core/src/main/java/hudson/model/Node.java
            core/src/main/java/jenkins/model/Jenkins.java
            core/src/main/java/jenkins/model/Nodes.java
            http://jenkins-ci.org/commit/jenkins/695fe6bf5dcea42cb1195c8c298c6a5df033a918
            Log:
            Merge pull request #1877 from stephenc/jenkins-31055

            [FIXED JENKINS-31055] Make Node implement Saveable

            Compare: https://github.com/jenkinsci/jenkins/compare/2d1d47edef3b...695fe6bf5dce

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: changelog.html core/src/main/java/hudson/model/Computer.java core/src/main/java/hudson/model/Node.java core/src/main/java/jenkins/model/Jenkins.java core/src/main/java/jenkins/model/Nodes.java http://jenkins-ci.org/commit/jenkins/695fe6bf5dcea42cb1195c8c298c6a5df033a918 Log: Merge pull request #1877 from stephenc/jenkins-31055 [FIXED JENKINS-31055] Make Node implement Saveable Compare: https://github.com/jenkinsci/jenkins/compare/2d1d47edef3b...695fe6bf5dce
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            core/src/main/java/hudson/model/Node.java
            http://jenkins-ci.org/commit/jenkins/86f8574ff5bbe82fc4931c29dbd55319e96a8e06
            Log:
            JENKINS-31055 Update @since tag

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: core/src/main/java/hudson/model/Node.java http://jenkins-ci.org/commit/jenkins/86f8574ff5bbe82fc4931c29dbd55319e96a8e06 Log: JENKINS-31055 Update @since tag
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4337
            [FIXED JENKINS-31055] Make Node implement Saveable (Revision e4b1aab4acab93d638624c7705cfe6eea2d01786)
            JENKINS-31055 Finessing the exception handling (Revision 8645978bfbe272a494d2bc65cf47104255cfb3fb)
            JENKINS-31055 Replacing @since tag with placeholder to be restored on merge (Revision db37c76327748261c3b01eebd13369a1ca733282)
            JENKINS-31055 The intent of Node.save() is a no-op when not in Jenkins list of nodes (Revision 8e24f69013e96e8b7f8b86e9b7a9133e2412c638)
            JENKINS-31055 Note theoretical race condtion (Revision d2276c3c9b16fd46a3912ab8d58c418e67d8ce3e)

            Result = SUCCESS
            stephen connolly : e4b1aab4acab93d638624c7705cfe6eea2d01786
            Files :

            • core/src/main/java/jenkins/model/Nodes.java
            • core/src/main/java/hudson/model/Node.java
            • changelog.html
            • core/src/main/java/hudson/model/Computer.java
            • core/src/main/java/jenkins/model/Jenkins.java

            stephen connolly : 8645978bfbe272a494d2bc65cf47104255cfb3fb
            Files :

            • core/src/main/java/jenkins/model/Nodes.java

            stephen connolly : db37c76327748261c3b01eebd13369a1ca733282
            Files :

            • core/src/main/java/hudson/model/Node.java

            stephen connolly : 8e24f69013e96e8b7f8b86e9b7a9133e2412c638
            Files :

            • core/src/main/java/hudson/model/Node.java

            stephen connolly : d2276c3c9b16fd46a3912ab8d58c418e67d8ce3e
            Files :

            • core/src/main/java/jenkins/model/Nodes.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4337 [FIXED JENKINS-31055] Make Node implement Saveable (Revision e4b1aab4acab93d638624c7705cfe6eea2d01786) JENKINS-31055 Finessing the exception handling (Revision 8645978bfbe272a494d2bc65cf47104255cfb3fb) JENKINS-31055 Replacing @since tag with placeholder to be restored on merge (Revision db37c76327748261c3b01eebd13369a1ca733282) JENKINS-31055 The intent of Node.save() is a no-op when not in Jenkins list of nodes (Revision 8e24f69013e96e8b7f8b86e9b7a9133e2412c638) JENKINS-31055 Note theoretical race condtion (Revision d2276c3c9b16fd46a3912ab8d58c418e67d8ce3e) Result = SUCCESS stephen connolly : e4b1aab4acab93d638624c7705cfe6eea2d01786 Files : core/src/main/java/jenkins/model/Nodes.java core/src/main/java/hudson/model/Node.java changelog.html core/src/main/java/hudson/model/Computer.java core/src/main/java/jenkins/model/Jenkins.java stephen connolly : 8645978bfbe272a494d2bc65cf47104255cfb3fb Files : core/src/main/java/jenkins/model/Nodes.java stephen connolly : db37c76327748261c3b01eebd13369a1ca733282 Files : core/src/main/java/hudson/model/Node.java stephen connolly : 8e24f69013e96e8b7f8b86e9b7a9133e2412c638 Files : core/src/main/java/hudson/model/Node.java stephen connolly : d2276c3c9b16fd46a3912ab8d58c418e67d8ce3e Files : core/src/main/java/jenkins/model/Nodes.java
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4338
            JENKINS-31055 Update @since tag (Revision 86f8574ff5bbe82fc4931c29dbd55319e96a8e06)

            Result = SUCCESS
            stephen connolly : 86f8574ff5bbe82fc4931c29dbd55319e96a8e06
            Files :

            • core/src/main/java/hudson/model/Node.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4338 JENKINS-31055 Update @since tag (Revision 86f8574ff5bbe82fc4931c29dbd55319e96a8e06) Result = SUCCESS stephen connolly : 86f8574ff5bbe82fc4931c29dbd55319e96a8e06 Files : core/src/main/java/hudson/model/Node.java
            jglick Jesse Glick made changes -
            Labels lts-candidate
            Hide
            danielbeck Daniel Beck added a comment -

            It's not clear why this is an lts-candidate. In fact, it's not clear why this was needed at all.

            Show
            danielbeck Daniel Beck added a comment - It's not clear why this is an lts-candidate. In fact, it's not clear why this was needed at all.
            olivergondza Oliver Gond┼ża made changes -
            Labels lts-candidate
            stephenconnolly Stephen Connolly made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 166222 ] JNJira + In-Review [ 209341 ]
            Hide
            batmat Baptiste Mathus added a comment -

            For reference, hence fix merged in jenkins-1.635 and jenkins-1.651.1

            Show
            batmat Baptiste Mathus added a comment - For reference, hence fix merged in jenkins-1.635 and jenkins-1.651.1
            vlatombe Vincent Latombe made changes -
            Link This issue relates to JENKINS-53401 [ JENKINS-53401 ]

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                stephenconnolly Stephen Connolly
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: