You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2012/09/19 03:27:06 UTC

git commit: add logging for debugging.

Updated Branches:
  refs/heads/4.0 9fd669425 -> c11378ff2


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 <su...@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/c11378ff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/c11378ff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/c11378ff

Branch: refs/heads/4.0
Commit: c11378ff2208fe7f131be7c31a96d4928ea0df9b
Parents: 9fd6694
Author: Hiroaki Kawai <ka...@stratosphere.co.jp>
Authored: Tue Sep 18 18:26:34 2012 -0700
Committer: Edison Su <su...@gmail.com>
Committed: Tue Sep 18 18:26:34 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/c11378ff/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) {