Skip to content

Instantly share code, notes, and snippets.

@jonludlam
Created August 28, 2015 10:20
Show Gist options
  • Save jonludlam/e1292192c582852e6ad2 to your computer and use it in GitHub Desktop.
Save jonludlam/e1292192c582852e6ad2 to your computer and use it in GitHub Desktop.
Diff of lvutil.py
diff --git a/drivers/lvutil.py b/drivers/lvutil.py
index 8c37bc2..1cb1ca6 100755
--- a/drivers/lvutil.py
+++ b/drivers/lvutil.py
@@ -97,8 +97,7 @@ def get_sr_alloc(filename):
if not util.is_string(filename):
raise TypeError("'filename' is not of type 'str'.")
- global config_dir
- path = config_dir + filename
+ path = "/etc/xenvm.d/" + filename
if os.path.isfile(path):
sr_alloc = 'xlvhd'
@@ -264,7 +263,7 @@ def setvginfo(uuid,vg,devices,uri, local_allocator=None):
if e.errno != errno.EEXIST:
raise
- cmd = ["/bin/xenvm", "set-vg-info", "--config", config_dir, "--pvpath",
+ cmd = ["/bin/xenvm", "set-vg-info", "--pvpath",
devices[0], "--uri", uri, "-S", "/var/lib/xcp/xapi", vg]
if local_allocator is not None:
cmd = cmd + [ "--local-allocator-path", local_allocator ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment