Sandro Bonazzola has posted comments on this change.

Change subject: Add additional exception to prevent socket.gaierror error
......................................................................


Patch Set 3: Verified-1 -Code-Review

(3 comments)

http://gerrit.ovirt.org/#/c/32392/3/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
File src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py:

Line 66:                         'Please provide the FQDN or IP of the first 
host: '
Line 67:                     ),
Line 68:                     prompt=True,
Line 69:                     caseSensitive=True,
Line 70:                 )
transport = None
Line 71:             try:
Line 72:                 transport = paramiko.Transport((self.environment[
Line 73:                     ohostedcons.FirstHostEnv.FQDN
Line 74:                 ], 22))


Line 72:                 transport = paramiko.Transport((self.environment[
Line 73:                     ohostedcons.FirstHostEnv.FQDN
Line 74:                 ], 22))
Line 75:                 valid = True
Line 76:             except (paramiko.SSHException, socket.gaierror) as e:
this doesn't assign transport so finally fails with:
 Failed to execute stage 'Environment customization': local variable 
'transport' referenced before assignment
Line 77:                 self.logger.debug('exception', exc_info=True)
Line 78:                 if fqdn_interactive:
Line 79:                     self.logger.error(
Line 80:                         _(


Line 95:                                 ohostedcons.FirstHostEnv.FQDN
Line 96:                             ],
Line 97:                             error=e,
Line 98:                         )
Line 99:                     )
if transport is not None:
Line 100:             finally:
Line 101:                 transport.close()
Line 102: 
Line 103:     def _fetch_answer_file(self):


-- 
To view, visit http://gerrit.ovirt.org/32392
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I92776791af606b6fdb664c9e44ed119a167d15ac
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-hosted-engine-setup
Gerrit-Branch: master
Gerrit-Owner: Artyom Lukianov <[email protected]>
Gerrit-Reviewer: Artyom Lukianov <[email protected]>
Gerrit-Reviewer: Jiří Moskovčák <[email protected]>
Gerrit-Reviewer: Lev Veyde <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Simone Tiraboschi <[email protected]>
Gerrit-Reviewer: Yedidyah Bar David <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to