Skip to content

Commit 3d081aa

Browse files
committed
Merge pull request deis#790 from kmala/proc
fix(scale):get the desired number of replicas from the rc
2 parents 69f50da + c8c7d80 commit 3d081aa

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

rootfs/scheduler/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,12 +1004,7 @@ def _scale_rc(self, namespace, name, desired):
10041004
'version': rc['spec']['selector']['version']
10051005
}
10061006

1007-
# Are there any pods running (and verified as ready) available?
1008-
pods = self._get_pods(namespace, labels=labels).json()['items']
1009-
current = 0
1010-
for pod in pods:
1011-
if self._pod_ready(pod):
1012-
current += 1
1007+
current = int(rc['spec']['replicas'])
10131008

10141009
if desired == current:
10151010
logger.info("Not scaling RC {} in Namespace {} to {} replicas. Already at desired replicas".format(name, namespace, desired)) # noqa

0 commit comments

Comments
 (0)