incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: add logging for debugging.
Date Wed, 19 Sep 2012 01:28:19 GMT
Updated Branches:
  refs/heads/master e66279098 -> a6aebe098


add logging for debugging.

The default value for local.storage.path does not exists by
default in CentOS 6. By default, this results in NullPointerException
silently. Without this log message, administrator can't figure out
the reason at all.

Signed-off-by: Edison Su <sudison@gmail.com>


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

Branch: refs/heads/master
Commit: a6aebe098efc2dfaba5263a1f0ca7e3b0f445186
Parents: e662790
Author: Hiroaki Kawai <kawai@stratosphere.co.jp>
Authored: Tue Sep 18 18:26:34 2012 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Tue Sep 18 18:28:07 2012 -0700

----------------------------------------------------------------------
 .../kvm/storage/LibvirtStorageAdaptor.java         |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a6aebe09/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
index d6236a0..df295dd 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
@@ -213,10 +213,11 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
         }
     }
 
-    private StoragePool CreateSharedStoragePool(Connect conn, String uuid,
+    private StoragePool createSharedStoragePool(Connect conn, String uuid,
             String host, String path) {
         String mountPoint = path;
         if (!_storageLayer.exists(mountPoint)) {
+            s_logger.error(mountPath + " does not exists. Check local.storage.path in agent.properties.");
             return null;
         }
         LibvirtStoragePoolDef spd = new LibvirtStoragePoolDef(poolType.DIR,
@@ -550,7 +551,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
                 sp = createNfsStoragePool(conn, name, host, path);
             } else if (type == StoragePoolType.SharedMountPoint
                     || type == StoragePoolType.Filesystem) {
-                sp = CreateSharedStoragePool(conn, name, host, path);
+                sp = createSharedStoragePool(conn, name, host, path);
             } else if (type == StoragePoolType.RBD) {
                 sp = createRBDStoragePool(conn, name, host, port, userInfo, path);
             } else if (type == StoragePoolType.CLVM) {


Mime
View raw message