Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Analyzer crashes when CDS can't be reached #26

Open
sjoqvist opened this issue May 22, 2017 · 0 comments
Open

Code Analyzer crashes when CDS can't be reached #26

sjoqvist opened this issue May 22, 2017 · 0 comments

Comments

@sjoqvist
Copy link
Member

sjoqvist commented May 22, 2017

When the CDS goes down, code_analyzer/githomes.py crashes with a message similar to the following.

Sleeping: until next pull 118.103230
Polling https://cds/backups/1... Traceback (most recent call last):
  File "./githomes.py", line 300, in <module>
    gitHomes.poll()
  File "./githomes.py", line 257, in poll
    self.pullBackupsCDS()
  File "./githomes.py", line 219, in pullBackupsCDS
    (responseHeader, result) = h.request( "%s/backups/%d" % ( self.CDSRoot, teamIdx ), "GET", headers={"If-Modified-Since" : self.teamLastModified[ teamIdx ]} )
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1607, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1349, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1271, in _conn_request
    conn.connect()
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1074, in connect
    raise socket.error, msg
socket.error: [Errno 111] Connection refused

We might want to consider keeping the script alive. However, we then need to decide on the following.

  1. Should there be a timeout for when the script should conclude that the CDS won't be coming back and voluntarily stops?
  2. Should we log the incident somehow?

Related to #35.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant