Laszlo Hornyak has uploaded a new change for review.

Change subject: engine: ExternalSchedulerDiscoveryThread logging
......................................................................

engine: ExternalSchedulerDiscoveryThread logging

- Added logging for the case external scheduler sent an illegal regexp
- Cacth only IllegalArgumentException from convertProperties

Change-Id: Iacb59d8e097aaac522a9a8560ce7bdc181785d95
Signed-off-by: Laszlo Hornyak <lhorn...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerDiscoveryThread.java
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/74/18374/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerDiscoveryThread.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerDiscoveryThread.java
index 4296a63..e02a8fc 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerDiscoveryThread.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/external/ExternalSchedulerDiscoveryThread.java
@@ -86,12 +86,14 @@
             }
 
             try{
-                Map<String, String> discoveryPropMap = 
SimpleCustomPropertiesUtil.getInstance().convertProperties(discoveryUnit.getRegex());
+                Map<String, String> discoveryPropMap =
+                        
SimpleCustomPropertiesUtil.getInstance().convertProperties(discoveryUnit.getRegex());
                 if 
(!policyUnit.getParameterRegExMap().equals(discoveryPropMap)) {
                     sendToDb(discoveryUnit, true, type);
                 }
-            } catch (Exception e) {
-                // TODO: handle exception? log?
+            } catch (IllegalArgumentException e) {
+                log.warn("external scheduler discovery unit sent illegal 
custom properties regex, it was not saved to DB",
+                        e);
             }
 
             // TODO: when policy unit description is merged, compare it as well


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacb59d8e097aaac522a9a8560ce7bdc181785d95
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhorn...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to