We're updating the issue view to help you get more done. 

Bootstrap hangs when failing validations

Description

Some validations are done during the install workflow of the bootstrap (see CFY-6819).
Trying to bootstrap on a host with not enough memory, results in raising the validation error, but the bootstrap process is stuck right after:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 2017-05-24 00:25:51.743 CFY <manager> [stage_a9swlt.stop] Task started 'fabric_plugin.tasks.run_script' [185.98.150.76] out: Traceback (most recent call last): [185.98.150.76] out: File "/tmp/cloudify-ctx/ctx", line 139, in <module> [185.98.150.76] out: main() [185.98.150.76] out: File "/tmp/cloudify-ctx/ctx", line 128, in main [185.98.150.76] out: args.timeout) [185.98.150.76] out: File "/tmp/cloudify-ctx/ctx", line 84, in client_req [185.98.150.76] out: response = request_method(socket_url, request, timeout) [185.98.150.76] out: File "/tmp/cloudify-ctx/ctx", line 65, in http_client_req [185.98.150.76] out: timeout=timeout) [185.98.150.76] out: File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen [185.98.150.76] out: return opener.open(url, data, timeout) [185.98.150.76] out: File "/usr/lib64/python2.7/urllib2.py", line 431, in open [185.98.150.76] out: response = self._open(req, data) [185.98.150.76] out: File "/usr/lib64/python2.7/urllib2.py", line 449, in _open [185.98.150.76] out: '_open', req) [185.98.150.76] out: File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain [185.98.150.76] out: result = func(*args) [185.98.150.76] out: File "/usr/lib64/python2.7/urllib2.py", line 1244, in http_open [185.98.150.76] out: return self.do_open(httplib.HTTPConnection, req) [185.98.150.76] out: File "/usr/lib64/python2.7/urllib2.py", line 1217, in do_open [185.98.150.76] out: r = h.getresponse(buffering=True) [185.98.150.76] out: File "/usr/lib64/python2.7/httplib.py", line 1089, in getresponse [185.98.150.76] out: response.begin() [185.98.150.76] out: File "/usr/lib64/python2.7/httplib.py", line 444, in begin [185.98.150.76] out: version, status, reason = self._read_status() [185.98.150.76] out: File "/usr/lib64/python2.7/httplib.py", line 408, in _read_status [185.98.150.76] out: raise BadStatusLine(line) [185.98.150.76] out: httplib.BadStatusLine: '' [185.98.150.76] out: Traceback (most recent call last): [185.98.150.76] out: File "/tmp/cloudify-ctx/scripts/tmpOWTSpM-create.py-HAAZ3M4I", line 18, in <module> [185.98.150.76] out: ctx_properties = utils.ctx_factory.create(SERVICE_NAME) [185.98.150.76] out: File "/tmp/cloudify-ctx/scripts/utils.py", line 1115, in create [185.98.150.76] out: self._write_props_to_file(ctx_props, service_name) [185.98.150.76] out: File "/tmp/cloudify-ctx/scripts/utils.py", line 1131, in _write_props_to_file [185.98.150.76] out: write_to_json_file(ctx_props, dest_file_path) [185.98.150.76] out: File "/tmp/cloudify-ctx/scripts/utils.py", line 1038, in write_to_json_file [185.98.150.76] out: mkdir(os.path.dirname(os.path.abspath(file_path))) [185.98.150.76] out: File "/tmp/cloudify-ctx/scripts/utils.py", line 238, in mkdir [185.98.150.76] out: ctx.logger.debug('Creating Directory: {0}'.format(dir)) [185.98.150.76] out: File "/tmp/cloudify-ctx/cloudify.py", line 53, in debug [185.98.150.76] out: return self._logger(level='debug', message=message) [185.98.150.76] out: File "/tmp/cloudify-ctx/cloudify.py", line 50, in _logger [185.98.150.76] out: return check_output(cmd) [185.98.150.76] out: File "/tmp/cloudify-ctx/cloudify.py", line 32, in check_output [185.98.150.76] out: raise error [185.98.150.76] out: subprocess.CalledProcessError: Command '['ctx', 'logger', 'debug', 'Creating Directory: /opt/cloudify/manager-ip-setter/node_properties']' returned non-zero exit status 1 [185.98.150.76] out: Fatal error: run() received nonzero return code 1 while executing! Requested: source /tmp/cloudify-ctx/scripts/env-tmpOWTSpM-create.py-HAAZ3M4I && /tmp/cloudify-ctx/scripts/tmpOWTSpM-create.py-HAAZ3M4I Executed: /bin/bash -l -c "cd /tmp/cloudify-ctx/work && source /tmp/cloudify-ctx/scripts/env-tmpOWTSpM-create.py-HAAZ3M4I && /tmp/cloudify-ctx/scripts/tmpOWTSpM-create.py-HAAZ3M4I" Aborting.

Needs a SIGTERM to end this.

Status

Assignee

Unassigned

Reporter

Isaac Shabtay

Labels

None

Severity

None

Bug Type

None

Target Version

None

Severity

None

Fix versions

Affects versions

4.0.1