hadong has uploaded a new change for review.

Change subject: Prompt more friendly information when enabling puppet failure
......................................................................

Prompt more friendly information when enabling puppet failure

Change-Id: Iddc1c1e74178ab4a9dd7bb23733636377eafc5ff
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1055383
Signed-off-by: hadong <[email protected]>
---
M src/ovirt/node/setup/puppet/puppet_page.py
1 file changed, 12 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/22/26422/1

diff --git a/src/ovirt/node/setup/puppet/puppet_page.py 
b/src/ovirt/node/setup/puppet/puppet_page.py
index 57ae961..6ffc3af 100644
--- a/src/ovirt/node/setup/puppet/puppet_page.py
+++ b/src/ovirt/node/setup/puppet/puppet_page.py
@@ -166,12 +166,18 @@
         conf.write(conf_builder, "w")
 
         fs.Config().persist("/etc/puppet/puppet.conf")
-
-        system.service("puppet", "stop")
-        utils.process.check_call("puppet agent --waitforcert 60 --test",
-                                 shell=True)
-        system.service("puppet", "start")
-        fs.Config().persist("/var/lib/puppet")
+        try:
+            system.service("puppet", "stop")
+            utils.process.check_call("puppet agent --waitforcert 60 --test",
+                                     shell=True)
+            system.service("puppet", "start")
+            fs.Config().persist("/var/lib/puppet")
+        except:
+            raise RuntimeError("Synchronization with the puppet master timed "
+                               "out.\nCheck whether a certificate is waiting "
+                               "for signing on the master or a certificate "
+                               "for this hostname already exists and needs to"
+                               " be revoked.")
 
     def disable_puppet(self):
         item_args = ["server", "certname"]


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iddc1c1e74178ab4a9dd7bb23733636377eafc5ff
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <[email protected]>
_______________________________________________
node-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/node-patches

Reply via email to