Created attachment 933363 [details] setup log Description of problem: Installation of second host failed, if given incorrect FQDN of first host for answer file Version-Release number of selected component (if applicable): ovirt-hosted-engine-setup-1.2.0-0.1.master.20140820130617.gitd832f86.el6.noarch How reproducible: Always Steps to Reproduce: 1. Have hosted-engine environment with one host 2. Add second host and give incorrect FQDN, when deployment ask to provide host to download answer file 3. Actual results: [ ERROR ] Failed to execute stage 'Environment customization': local variable 'transport' referenced before assignment And deployment failed and not give possibility to re-enter FQDN Expected results: Appear error that FQDN not correct but deployment give you possibility to re-enter FQDN or to Abort setup Additional info:
In this case we have catch to narrow exception: try: transport = paramiko.Transport((self.environment[ ohostedcons.FirstHostEnv.FQDN ], 22)) valid = True except paramiko.SSHException as e: but in transport we have socket.getaddrinfo(hostname, port, socket.AF_UNSPEC, socket.SOCK_STREAM) that can drop socket.gaierror in case of not correct hostname, and so we jump forward to finally: transport.close() and we have UnboundLocalError: local variable 'transport' referenced before assignment So one of solutions it to check if FQDN available before run: transport = paramiko.Transport((self.environment[ ohostedcons.FirstHostEnv.FQDN ], 22)) or just add another except (paramiko.SSHException, socket.gaierror) as e:
oVirt 3.5 has been released and should include the fix for this issue.