Sandro Bonazzola has uploaded a new change for review.

Change subject: UX: notify download of answer file status
......................................................................

UX: notify download of answer file status

Notify successfull download of answer file.
Better handling of the notify of failure when
the password is provided by the answer file.

Bug-Url: https://bugzilla.redhat.com/1007422
Change-Id: I2ed7fae0ee808b9d7e59409fae0f7e4edbb9bf92
Signed-off-by: Sandro Bonazzola <[email protected]>
---
M src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
1 file changed, 18 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup 
refs/changes/78/19678/1

diff --git a/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py 
b/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
index 0bb5598..dd8b432 100644
--- a/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
+++ b/src/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py
@@ -100,6 +100,7 @@
                 transport.close()
 
     def _fetch_answer_file(self):
+        self.logger.debug('_fetch_answer_file')
         fqdn = self.environment[ohostedcons.FirstHostEnv.FQDN]
         interactive = (
             self.environment[ohostedcons.FirstHostEnv.ROOT_PASSWORD] is None
@@ -149,6 +150,14 @@
                         fqdn=fqdn,
                     )
                 )
+                if not interactive:
+                    raise RuntimeError(
+                        _(
+                            'Cannot deploy Hosted Engine on additional host: '
+                            'unable to fetch the configuration used '
+                            'on first host'
+                        )
+                    )
             except paramiko.SSHException as e:
                 self.logger.debug('exception', exc_info=True)
                 self.logger.error(
@@ -157,15 +166,17 @@
                         error=e,
                     )
                 )
+                if not interactive:
+                    raise RuntimeError(
+                        _(
+                            'Cannot deploy Hosted Engine on additional host: '
+                            'unable to fetch the configuration used '
+                            'on first host'
+                        )
+                    )
             finally:
                 transport.close()
-            if not interactive:
-                raise RuntimeError(
-                    _(
-                        'Cannot deploy Hosted Engine on additional host: '
-                        'unable to fetch the configuration used on first host'
-                    )
-                )
+        self.logger.info(_('Answer file successfully downloaded'))
 
     def _parse_answer_file(self):
         self._config.read(self._tmp_ans)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ed7fae0ee808b9d7e59409fae0f7e4edbb9bf92
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-hosted-engine-setup
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to