diff --git a/buildserver/buildserver.py b/buildserver/buildserver.py index 82cb24ac7..ebd039cdc 100644 --- a/buildserver/buildserver.py +++ b/buildserver/buildserver.py @@ -124,7 +124,7 @@ def build_image(build_dir, tag_name, num_steps, result_object): except Exception as e: logger.exception('Exception when processing request.') result_object['status'] = 'error' - result_object['message'] = e.message + result_object['message'] = str(e.message) MIME_PROCESSORS = { diff --git a/workers/dockerfilebuild.py b/workers/dockerfilebuild.py index 2f7aea2da..5112145b0 100644 --- a/workers/dockerfilebuild.py +++ b/workers/dockerfilebuild.py @@ -43,7 +43,7 @@ def retry_command(to_call, args=[], kwargs={}, retries=5, period=5): def get_status(url): - return requests.get(url).json()['status'] + return retry_command(requests.get, [url]).json()['status'] def babysit_builder(request): @@ -112,8 +112,10 @@ def babysit_builder(request): ssh_client = paramiko.SSHClient() ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + logger.debug('Connecting to droplet through ssh at ip: %s' % + droplet.ip_address) retry_command(ssh_client.connect, [droplet.ip_address, 22, 'root'], - {'look_for_keys': False, + {'look_for_keys': False, 'timeout': 10.0, 'key_filename': app.config['DO_SSH_PRIVATE_KEY_FILENAME']}) # Load the node with the pull token