Page MenuHomePhabricator

UnboundLocalError: local variable 'status' referenced before assignment
Closed, ResolvedPublic

Description

err: /Stage[main]/Role::Logstash/Deployment::Target[elasticsearchplugins]/Exec[deployment_target_deploy_all]: Failed to call refresh: salt-call deploy.sync_all returned 1 instead of one of [0] at /etc/puppet/modules/deployment/manifests/target.pp:35
notice: Finished catalog run in 57.37 seconds

root@logstash1003:~# salt-call deploy.sync_all
[ERROR ] An un-handled exception was caught by salt's global exception handler:
UnboundLocalError: local variable 'status' referenced before assignment
Traceback (most recent call last):

File "/usr/bin/salt-call", line 11, in <module>
  salt_call()
File "/usr/lib/pymodules/python2.7/salt/scripts.py", line 77, in salt_call
  client.run()
File "/usr/lib/pymodules/python2.7/salt/cli/__init__.py", line 303, in run
  caller.run()
File "/usr/lib/pymodules/python2.7/salt/cli/caller.py", line 135, in run
  ret = self.call()
File "/usr/lib/pymodules/python2.7/salt/cli/caller.py", line 78, in call
  ret['return'] = func(*args, **kwargs)
File "/var/cache/salt/minion/extmods/modules/deploy.py", line 154, in sync_all
  stats[repo]["deploy.checkout"] = __salt__['deploy.checkout'](repo)
File "/var/cache/salt/minion/extmods/modules/deploy.py", line 347, in checkout
  return {'status': status, 'repo': repo, 'dependencies': depstats}

UnboundLocalError: local variable 'status' referenced before assignment
Traceback (most recent call last):

File "/usr/bin/salt-call", line 11, in <module>
  salt_call()
File "/usr/lib/pymodules/python2.7/salt/scripts.py", line 77, in salt_call
  client.run()
File "/usr/lib/pymodules/python2.7/salt/cli/__init__.py", line 303, in run
  caller.run()
File "/usr/lib/pymodules/python2.7/salt/cli/caller.py", line 135, in run
  ret = self.call()
File "/usr/lib/pymodules/python2.7/salt/cli/caller.py", line 78, in call
  ret['return'] = func(*args, **kwargs)
File "/var/cache/salt/minion/extmods/modules/deploy.py", line 154, in sync_all
  stats[repo]["deploy.checkout"] = __salt__['deploy.checkout'](repo)
File "/var/cache/salt/minion/extmods/modules/deploy.py", line 347, in checkout
  return {'status': status, 'repo': repo, 'dependencies': depstats}

UnboundLocalError: local variable 'status' referenced before assignment


Version: wmf-deployment
Severity: normal

Details

Reference
bz60068

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:55 AM
bzimport added a project: Deployments.
bzimport set Reference to bz60068.
bzimport added a subscriber: Unknown Object (MLST).

Alarmingly, Puppet did not fail the next time around; it just didn't attempt to re-execute.

Change 119232 had a related patch set uploaded by BryanDavis:
Ensure that status is always defined in deploy.checkout

https://gerrit.wikimedia.org/r/119232

Change 119232 merged by Ori.livneh:
Ensure that status is always defined in deploy.checkout

https://gerrit.wikimedia.org/r/119232