GoogleCloudPlatform/kubernetes — pull request #2882 by bgrant0607 (2014-12-11 23:13:19+00:00)
Title: Count only non-dead pods in replicationController current state replicas count

The way it currently stands, resizing a replica pool downwards doesn't change the number of replicas reported, since the killed pods transition to the Failed phase. This should return the same count that the controller manager is using to determine whether to add or remove replicas.

Without this fix, contrib/rctools/stop.sh never terminates.