Page MenuHomePhabricator

Error after "Finished deploy": <ValueError> xrange() arg 3 must not be zero
Closed, ResolvedPublic

Description

1halfak@deployment-tin:/srv/deployment/ores/deploy$ scap deploy -v
220:30:13 Started deploy [ores/deploy@9fd75a1]
320:30:13 Deploying Rev: 9fd75a1109495cbe479893df0cb7ab56846548d9
420:30:13 Update DEPLOY_HEAD
520:30:13 Creating /srv/deployment/ores/deploy/.git/DEPLOY_HEAD
6Deleted tag 'scap/sync/2016-08-08/0001' (was 10f6d96)
720:30:13 Update server info
8Entering 'submodules/editquality'
9Entering 'submodules/ores'
10Entering 'submodules/wheels'
11Entering 'submodules/wikiclass'
1220:30:13 Started deploy [ores/deploy@9fd75a1]: (no justification provided)
1320:30:13
14== WORKER ==
15:* deployment-sca03.deployment-prep.eqiad.wmflabs
1620:30:13 Running remote deploy cmd ['/usr/bin/scap', 'deploy-local', '-v', '--repo', 'ores/deploy', '-g', 'worker', 'fetch', '--refresh-config']
17ores/deploy: fetch stage(s): 100% (ok: 1; fail: 0; left: 0)
1820:30:15 Running remote deploy cmd ['/usr/bin/scap', 'deploy-local', '-v', '--repo', 'ores/deploy', '-g', 'worker', 'config_deploy', '--refresh-config']
19ores/deploy: config_deploy stage(s): 100% (ok: 1; fail: 0; left: 0)
2020:30:16 Running remote deploy cmd ['/usr/bin/scap', 'deploy-local', '-v', '--repo', 'ores/deploy', '-g', 'worker', 'promote', '--refresh-config']
21ores/deploy: promote and restart_service stage(s): 100% (ok: 1; fail: 0; left: 0)
22worker deploy successful. Continue? [y]es/[n]o/[c]ontinue all groups: y
2320:30:20 Finished deploy [ores/deploy@9fd75a1] (duration: 00m 07s)
2420:30:20 Unhandled error:
25Traceback (most recent call last):
26 File "/usr/lib/python2.7/dist-packages/scap/cli.py", line 285, in run
27 exit_status = app.main(app.extra_arguments)
28 File "/usr/lib/python2.7/dist-packages/scap/deploy.py", line 572, in main
29 exec_result = self._execute_for_groups(stages)
30 File "/usr/lib/python2.7/dist-packages/scap/deploy.py", line 594, in _execute_for_groups
31 self._execute_for_group(stages, group)
32 File "/usr/lib/python2.7/dist-packages/scap/deploy.py", line 641, in _execute_for_group
33 for label, targets in group.subgroups():
34 File "/usr/lib/python2.7/dist-packages/scap/targets.py", line 283, in subgroups
35 for i in xrange(0, len(targets), self.size):
36ValueError: xrange() arg 3 must not be zero
3720:30:20 deploy failed: <ValueError> xrange() arg 3 must not be zero

Event Timeline

Halfak created this task.Feb 3 2017, 3:46 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 3 2017, 3:46 PM
hashar added a subscriber: hashar.Feb 3 2017, 4:03 PM

(Time is UTC+1)

[16:50:41]  <+hashar>	halfak: seems it deploys first to the "worker" group
[16:50:53]  <+hashar>	ores-worker-labs: deployment-sca03.deployment-prep.eqiad.wmflabs
[16:51:00]  <+hashar>	then try to deploy on the 'default' group
[16:51:11]  <+hashar>	which is the same file
[16:51:24]  <+hashar>	so maybe we did an optimization that filter out host that already got deployed
[16:51:44]  <+hashar>	so when deploying the  "worker" group,  deployment-sca03 is done
[16:51:52]  <+hashar>	then to deploy the rest, scap check the default group
[16:52:01]  <+hashar>	get a list of host that is only [ 'deployment-sca03' ]
[16:52:11]  <+hashar>	that host is filtered out because it got deployed 
[16:52:16]  <+hashar>	we end up with an empty list to deploy to
[16:52:19]  <+hashar>	and xrange() bork

Same error for me trying to do scap deploy -l wdqs2003.codfw.wmnet

thcipriani triaged this task as High priority.Feb 10 2017, 6:05 PM
thcipriani moved this task from Needs triage to Debt on the Scap board.