[JIRA] (JENKINS-38514) CauseOfBlockage from QueueTaskDispatcher.canTake discarded
Title: Message Title Jesse Glick updated JENKINS-38514 Jenkins / JENKINS-38514 CauseOfBlockage from QueueTaskDispatcher.canTake discarded Change By: Jesse Glick Status: In Review Resolved Resolution: Fixed Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-38514) CauseOfBlockage from QueueTaskDispatcher.canTake discarded
Title: Message Title SCM/JIRA link daemon commented on JENKINS-38514 Re: CauseOfBlockage from QueueTaskDispatcher.canTake discarded Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/Node.java core/src/main/java/hudson/model/Queue.java core/src/main/java/hudson/model/queue/CauseOfBlockage.java core/src/main/java/jenkins/model/queue/CompositeCauseOfBlockage.java core/src/main/resources/hudson/model/Messages.properties core/src/main/resources/jenkins/model/queue/CompositeCauseOfBlockage/summary.jelly test/src/test/java/hudson/model/queue/QueueTaskDispatcherTest.java test/src/test/java/hudson/slaves/NodeCanTakeTaskTest.java http://jenkins-ci.org/commit/jenkins/8d23041d4b785947dee1bc02f54a41d86b59bdda Log: JENKINS-38514 Retain CauseOfBlockage from JobOffer (#2651) Converted to JenkinsRule. Improved messages from Node.canTake. [FIXED JENKINS-38514] BuildableItem needs to retain information from JobOffer about why it is neither blocked nor building. Converted to JenkinsRule. Found an existing usage of BecauseNodeIsNotAcceptingTasks. Original JENKINS-6598 test was checking behavior we want amended by JENKINS-38514. Ensure that a BuildableItem which is simply waiting for a free executor reports that as its CauseOfBlockage. Review comments from @oleg-nenashev. Add Comment
[JIRA] (JENKINS-38514) CauseOfBlockage from QueueTaskDispatcher.canTake discarded
Title: Message Title Jesse Glick updated JENKINS-38514 Jenkins / JENKINS-38514 CauseOfBlockage from QueueTaskDispatcher.canTake discarded Change By: Jesse Glick Status: In Progress Review Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-38514) CauseOfBlockage from QueueTaskDispatcher.canTake discarded
Title: Message Title Jesse Glick commented on JENKINS-38514 Re: CauseOfBlockage from QueueTaskDispatcher.canTake discarded For those running current core builds who wish to diagnose such issues, try running in /script: for (i in Jenkins.instance.queue.buildableItems) { println "considering ${i}" for (c in Jenkins.instance.computers) { println "found computer ${c}" EXEC: for (e in c.executors) { if (e.interrupted || !e.parking) continue println "with executor ${e}" def o = new Queue.JobOffer(Jenkins.instance.queue, e, null) if (!o.canTake(i)) { println "${o} refused ${i}" def node = o.node if (node == null) { println "no node associated with ${c}" continue } def cob = node.canTake(i) if (cob != null) { println "because of ${cob}" continue } for (d in hudson.model.queue.QueueTaskDispatcher.all()) { cob = d.canTake(node, i) if (cob != null) { println "because of ${cob} from ${d}" continue EXEC } } if (!o.available) { println "${o} not available" if (o.workUnit != null) println "has a workUnit ${o.workUnit}" if (c.offline) println "${c} is offline" if (!c.acceptingTasks) println "${c} is not accepting tasks" } } } } } In one reported case, the root issue was that the Authorize Project plugin was configured, so Node.canTake was returning anonymous doesn’t have a permission to run on [sic]; yet the build queue (and support bundle) displayed only Waiting for next available executor. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
[JIRA] (JENKINS-38514) CauseOfBlockage from QueueTaskDispatcher.canTake discarded
Title: Message Title Jesse Glick commented on JENKINS-38514 Re: CauseOfBlockage from QueueTaskDispatcher.canTake discarded Unfortunately it is not obvious how the relevant CauseOfBlockage can be identified: there can be numerous JobOffer s which are considered, yet we would expect most of them to refuse canTake, for example because of Node.LabelMissing. The “buildable” item stays in queue when all of the offers are rejected, but how do we identify the one which we expected to be accepted? Can certainly improve detail-level logging to allow the issue to be tracked down, but it is less clear that BuildableItem.getWhy can be improved to display the ultimate problem in the UI (or in support bundles without a custom logger). Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-38514) CauseOfBlockage from QueueTaskDispatcher.canTake discarded
Title: Message Title Jesse Glick assigned an issue to Jesse Glick Jenkins / JENKINS-38514 CauseOfBlockage from QueueTaskDispatcher.canTake discarded Change By: Jesse Glick Assignee: Jesse Glick Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-38514) CauseOfBlockage from QueueTaskDispatcher.canTake discarded
Title: Message Title Jesse Glick started work on JENKINS-38514 Change By: Jesse Glick Status: Open In Progress Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-38514) CauseOfBlockage from QueueTaskDispatcher.canTake discarded
Title: Message Title Jesse Glick commented on JENKINS-38514 Re: CauseOfBlockage from QueueTaskDispatcher.canTake discarded Not clear that support-core can do anything, since canTake requires a specific Node. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-38514) CauseOfBlockage from QueueTaskDispatcher.canTake discarded
Title: Message Title Jesse Glick updated an issue Jenkins / JENKINS-38514 CauseOfBlockage from QueueTaskDispatcher.canTake discarded Change By: Jesse Glick Component/s: support-core-plugin Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-38514) CauseOfBlockage from QueueTaskDispatcher.canTake discarded
Title: Message Title Jesse Glick updated an issue Jenkins / JENKINS-38514 CauseOfBlockage from QueueTaskDispatcher.canTake discarded Change By: Jesse Glick Component/s: support-core-plugin Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- 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-38514) CauseOfBlockage from QueueTaskDispatcher.canTake discarded
Title: Message Title Jesse Glick created an issue Jenkins / JENKINS-38514 CauseOfBlockage from QueueTaskDispatcher.canTake discarded Issue Type: Bug Assignee: Unassigned Components: core Created: 2016/Sep/26 4:51 PM Labels: queue Priority: Major Reporter: Jesse Glick If you have a QueueTaskDispatcher which returns a CauseOfBlockage from canRun, that becomes BlockedItem.getCauseOfBlockage, which is displayed in the queue widget. But if it returns a CauseOfBlockage from canTake (AFAICT the same for Node.canTake), JobOffer.canTake sees that it is non-null, throws out the actual object with all of its diagnostics, and you wind up with a BuildableItem with CauseOfBlockage.BecauseNodeIsBusy which tells you nothing and may be totally misleading. By asking an implementation to return a @CheckForNull CauseOfBlockage rather than a simple boolean, the implication is that a non-null return value will be displayed to the user. Currently this is not the case. To add insult to injury, Support Core does not report the result of canTake.