[JIRA] (JENKINS-50599) Nodes#addNode does not fail atomically
Title: Message Title Daniel Beck updated JENKINS-50599 Fixed in 2.117. Jenkins / JENKINS-50599 Nodes#addNode does not fail atomically Change By: Daniel Beck Status: In Review Resolved Resolution: Fixed Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50599) Nodes#addNode does not fail atomically
Title: Message Title SCM/JIRA link daemon commented on JENKINS-50599 Re: Nodes#addNode does not fail atomically Code changed in jenkins User: Devin Nusbaum Path: core/src/main/java/jenkins/model/Nodes.java test/src/test/java/jenkins/model/NodesTest.java http://jenkins-ci.org/commit/jenkins/9557da32a3550bd98acc9d04728547fcd98b8a15 Log: JENKINS-50599 Make Nodes#addNode fail atomically (#3383) Reproduce JENKINS-50599 Make Nodes#addNode fail atomically Simplify rollback logic and add some tests Fix typo Rename lambda parameters to clarify that they are intentionally ignored Catch RuntimeException as well Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
[JIRA] (JENKINS-50599) Nodes#addNode does not fail atomically
Title: Message Title Oleg Nenashev updated an issue Jenkins / JENKINS-50599 Nodes#addNode does not fail atomically Change By: Oleg Nenashev Labels: JEP-200 Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50599) Nodes#addNode does not fail atomically
Title: Message Title Devin Nusbaum updated JENKINS-50599 Jenkins / JENKINS-50599 Nodes#addNode does not fail atomically Change By: Devin Nusbaum Status: In Progress Review Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50599) Nodes#addNode does not fail atomically
Title: Message Title Devin Nusbaum started work on JENKINS-50599 Change By: Devin Nusbaum Status: Open In Progress Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50599) Nodes#addNode does not fail atomically
Title: Message Title Devin Nusbaum updated an issue Jenkins / JENKINS-50599 Nodes#addNode does not fail atomically Change By: Devin Nusbaum If an exception is thrown by {{persistNode}} in [Nodes#addNode|https://github.com/jenkinsci/jenkins/blob/54325b155401eba369f42857f812f20c3656d5bc/core/src/main/java/jenkins/model/Nodes.java#L129], then the node will still exist in memory, but it may not exist on disk (or the disk form may be corrupted). This could happen for various reasons, but in particular JEP-200 issues when serializing the node will throw an exception from {{persistNode}} and cause this problem.The issue was originally noticed by [~jglick] while investigating JENKINS-50480. The result of the error in that case was that a test logged a severe error because of a failure to add the node in {{Nodes#addNode}}, but the test actually passed because the node could be accessed in memory. It would have been better for that test to fail so that the JEP-200 error did not go unnoticed. I think it makes sense to remove the node from memory if the call to persistNode throws an exception, so that the {{Nodes#addNode}} call does not fail in a half-finished state. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
[JIRA] (JENKINS-50599) Nodes#addNode does not fail atomically
Title: Message Title Devin Nusbaum updated an issue Jenkins / JENKINS-50599 Nodes#addNode does not fail atomically Change By: Devin Nusbaum If an exception is thrown by {{persistNode}} in [Nodes#addNode|https://github.com/jenkinsci/jenkins/blob/54325b155401eba369f42857f812f20c3656d5bc/core/src/main/java/jenkins/model/Nodes.java#L129], then the node will still exist in memory, but it may not exist on disk (or the disk form may be corrupted). This could happen for various reasons, but in particular JEP-200 issues when serializing the node will throw an exception from {{persistNode}} and cause this problem. The issue was originally noticed by [~jglick] while investigating JENKINS-50480. The result of the error in that case was that a test logged a severe error because of a failure to add the node in {{Nodes#addNode}}, but the test actually passed because the node could be accessed in memory. I think it makes sense to remove the node from memory if the call to persistNode throws an exception, so that the {{Nodes#addNode}} call does not fail in a half-finished state. Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
[JIRA] (JENKINS-50599) Nodes#addNode does not fail atomically
Title: Message Title Devin Nusbaum updated an issue Jenkins / JENKINS-50599 Nodes#addNode does not fail atomically Change By: Devin Nusbaum Environment: Most More likely in Jenkins 2.107 and newer, but possible since at least Jenkins 2.0 Add Comment This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-50599) Nodes#addNode does not fail atomically
Title: Message Title Devin Nusbaum created an issue Jenkins / JENKINS-50599 Nodes#addNode does not fail atomically Issue Type: Bug Assignee: Unassigned Components: core Created: 2018-04-05 15:10 Environment: Most likely in Jenkins 2.107 and newer, but possible since at least Jenkins 2.0 Priority: Minor Reporter: Devin Nusbaum If an exception is thrown by persistNode in Nodes#addNode, then the node will still exist in memory, but it may not exist on disk (or the disk form may be corrupted). This could happen for various reasons, but in particular JEP-200 issues when serializing the node will throw an exception from persistNode and cause this problem. The issue was originally noticed by Jesse Glick while investigating JENKINS-50480. I think it makes sense to remove the node from memory if the call to persistNode throws an exception, so that the Nodes#addNode call does not fail in a half-finished state. Add Comment