Branch: refs/heads/master
  Home:   https://github.com/jenkinsci/jenkins
  Commit: be1f8f91a3dcdcdfd2ed07198659e7eb68abf1f7
      
https://github.com/jenkinsci/jenkins/commit/be1f8f91a3dcdcdfd2ed07198659e7eb68abf1f7
  Author: Kohsuke Kawaguchi <k...@kohsuke.org>
  Date:   2012-05-23 (Wed, 23 May 2012)

  Changed paths:
    M changelog.html
    M core/src/main/java/hudson/model/LoadStatistics.java
    M core/src/main/java/hudson/model/OverallLoadStatistics.java
    M core/src/main/java/hudson/model/Queue.java
    M core/src/main/java/hudson/slaves/NodeProvisioner.java
    M core/src/main/java/jenkins/model/Jenkins.java
    A core/src/main/java/jenkins/model/UnlabeldLoadStatistics.java

  Log Message:
  -----------
  Fixed a bug in Jenkins.overallNodeProvisioner

Until now, Jenkins.overallNodeProvisioner was tracking an inconsistent
pair of numbers. On one hand, it was tracking all the executors in the
system, but then it was also only tracking the # of free-roaming
label-unassigned jobs as the queue length.

So if all your slaves are set with Node.Mode.EXCLUSIVE and you have some
free-roaming jobs, then it'll never tickle NodePrivisioner.

In other words, the # of executors weren't reflecting the actual # of
executors that can execute what's counted as the queue length.

See the problem report at
https://groups.google.com/forum/?fromgroups#!topic/jenkinsci-dev/bUwGEgOwv4Q

To fix this, I introduced another LoadStatistics that only counts
the # of executors that can execute free-roaming jobs, and # of
free-roaming jobs as the queue length. In this way, two pairs of numbers
are consistent.

This now allows us to use overallLoadStatistics for really the entire
system, including all executors and the total queue length. This is
primarily for administrators to see the resource utilization, and it is
not useful for NodeProvisioner input because it's mixing too many
different things.

The semantics change in OverallLoadStatistics.queueLength allows us to
deprecate its totalQueueLength field.



Reply via email to