summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorMatt Hicks <mhicks@localhost.localdomain>2008-07-18 12:02:03 -0400
committerMatt Hicks <mhicks@localhost.localdomain>2008-07-18 12:02:03 -0400
commit4abcb52f6f950a1a7b43c1f12e3dfe208bc58055 (patch)
tree178cbf7380ab3b813e6bddc8276ee2b04db4fd40 /func
parent33f46f9528f6306659156b170b144d3334204045 (diff)
downloadthird_party-func-4abcb52f6f950a1a7b43c1f12e3dfe208bc58055.tar.gz
third_party-func-4abcb52f6f950a1a7b43c1f12e3dfe208bc58055.tar.xz
third_party-func-4abcb52f6f950a1a7b43c1f12e3dfe208bc58055.zip
We need to make sure the KVM autostart directory exists
since it is dynamically created with 'virsh autostart'. In the case that you haven't run virsh autostart, the directory doesn't exist and makes the func module fail.
Diffstat (limited to 'func')
-rw-r--r--func/minion/modules/virt.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/func/minion/modules/virt.py b/func/minion/modules/virt.py
index ebc0a1c..2c68ab4 100644
--- a/func/minion/modules/virt.py
+++ b/func/minion/modules/virt.py
@@ -200,6 +200,15 @@ class Virt(func_module.FuncModule):
"/etc/xen/auto"
]
else:
+ # When using KVM, we need to make sure the autostart
+ # directory exists
+ mkdir_args = [
+ "/bin/mkdir",
+ "-p",
+ "/etc/libvirt/qemu/autostart"
+ ]
+ sub_process.call(mkdir_args,shell=False,close_fds=True)
+
# We aren't using virsh autostart because we want
# the command to work even when the VM isn't running
autostart_args = [