You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@apache.org on 2014/06/17 12:07:49 UTC

git commit: updated refs/heads/4.4-forward to a5415d9

Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward 2214bd250 -> a5415d93e


CLOUDSTACK-6861: Fixing nfs mount path


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

Branch: refs/heads/4.4-forward
Commit: a5415d93eb791bac52c40b9ede6a433a0d7f1dca
Parents: 2214bd2
Author: Girish Shilamkar <gi...@clogeny.com>
Authored: Tue Jun 17 15:37:25 2014 +0530
Committer: Girish Shilamkar <gi...@clogeny.com>
Committed: Tue Jun 17 15:37:25 2014 +0530

----------------------------------------------------------------------
 tools/marvin/marvin/lib/utils.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a5415d93/tools/marvin/marvin/lib/utils.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/utils.py b/tools/marvin/marvin/lib/utils.py
index 60a15ea..c94afd5 100644
--- a/tools/marvin/marvin/lib/utils.py
+++ b/tools/marvin/marvin/lib/utils.py
@@ -348,7 +348,7 @@ def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid):
     nfsurl = secondaryStore.url
     from urllib2 import urlparse
     parse_url = urlparse.urlsplit(nfsurl, scheme='nfs')
-    host, path = parse_url.netloc, parse_url.path
+    host, path = str(parse_url.netloc), str(parse_url.path)
 
     if not config.mgtSvr:
         raise Exception(
@@ -364,11 +364,17 @@ def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid):
             user,
             passwd
         )
+
+        pathSeparator = "" #used to form host:dir format
+        if not host.endswith(':'):
+            pathSeparator= ":"
+
         cmds = [
             "mkdir -p %s /mnt/tmp",
-            "mount -t %s %s:%s /mnt/tmp" % (
+            "mount -t %s %s%s%s /mnt/tmp" % (
                 'nfs',
                 host,
+                pathSeparator,
                 path,
             ),
             "test -f %s && echo 'snapshot exists'" % (