cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [3/3] git commit: updated refs/heads/master to a1ff7e2
Date Tue, 14 Jul 2015 11:41:31 GMT
coverity 1311706: to generic exeption handling on xapi call

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e62d9523
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e62d9523
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e62d9523

Branch: refs/heads/master
Commit: e62d95237534e856ed7e93615fde47ae3b20aef4
Parents: 03e8176
Author: Daan Hoogland <daan@onecht.net>
Authored: Tue Jul 14 10:41:07 2015 +0200
Committer: Daan Hoogland <daan.hoogland@gmail.com>
Committed: Tue Jul 14 13:41:09 2015 +0200

----------------------------------------------------------------------
 .../xenserver/resource/CitrixResourceBase.java          | 12 +++++++++---
 .../wrapper/xenbase/CitrixMigrateCommandWrapper.java    |  2 +-
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e62d9523/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
index d8d84a7..05cf0e8 100644
--- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
@@ -5318,7 +5318,7 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
     }
 
 
-    public boolean AttachConfigDriveToMigratedVm(Connection conn, String vmName, String ipAddr)
{
+    public boolean attachConfigDriveToMigratedVm(Connection conn, String vmName, String ipAddr)
{
 
         // attach the config drive in destination host
 
@@ -5375,8 +5375,14 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
 
             return true;
 
-        }catch (Exception ex) {
-            s_logger.debug("Failed to attach config drive ISO to the VM  "+ vmName + " In
host " + ipAddr );
+        } catch (BadServerResponse e) {
+            s_logger.warn("Failed to attach config drive ISO to the VM  "+ vmName + " In
host " + ipAddr + " due to a bad server response.", e);
+            return false;
+        } catch (XenAPIException e) {
+            s_logger.warn("Failed to attach config drive ISO to the VM  "+ vmName + " In
host " + ipAddr + " due to a xapi problem.", e);
+            return false;
+        } catch (XmlRpcException e) {
+            s_logger.warn("Failed to attach config drive ISO to the VM  "+ vmName + " In
host " + ipAddr + " due to a problem in a remote call.", e);
             return false;
         }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e62d9523/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixMigrateCommandWrapper.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixMigrateCommandWrapper.java
b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixMigrateCommandWrapper.java
index 00ed622..21930ee 100644
--- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixMigrateCommandWrapper.java
+++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixMigrateCommandWrapper.java
@@ -85,7 +85,7 @@ public final class CitrixMigrateCommandWrapper extends CommandWrapper<MigrateCom
 
             // The iso can be attached to vm only once the vm is (present in the host) migrated.
             // Attach the config drive iso device to VM
-            if (!citrixResourceBase.AttachConfigDriveToMigratedVm(conn, vmName, dstHostIpAddr))
{
+            if (!citrixResourceBase.attachConfigDriveToMigratedVm(conn, vmName, dstHostIpAddr))
{
                 s_logger.debug("Config drive ISO attach failed after migration for vm "+vmName);
             }
 


Mime
View raw message