From a1d79fc694c19f4e11f5ed6bd481bf1a49ba0581 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Tue, 20 Jan 2009 18:12:21 +0000
Subject: [PATCH] KVM: add a _CONF_DIR

Currently we keep pid files and control files. In the conf dir we'll
also keep the data to start the instance anew, and the network
interface scripts. These will then be copied to a separate area (since
_CONF_DIR could be mounted 'noexec') and used to start the instance.

This patch also adds comments to state what the various directories are
used for.

Reviewed-by: iustinp
---
 lib/hypervisor/hv_kvm.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py
index 05a6d09be..a205ae4ef 100644
--- a/lib/hypervisor/hv_kvm.py
+++ b/lib/hypervisor/hv_kvm.py
@@ -39,9 +39,10 @@ class KVMHypervisor(hv_base.BaseHypervisor):
   """KVM hypervisor interface"""
 
   _ROOT_DIR = constants.RUN_GANETI_DIR + "/kvm-hypervisor"
-  _PIDS_DIR = _ROOT_DIR + "/pid"
-  _CTRL_DIR = _ROOT_DIR + "/ctrl"
-  _DIRS = [_ROOT_DIR, _PIDS_DIR, _CTRL_DIR]
+  _PIDS_DIR = _ROOT_DIR + "/pid" # contains live instances pids
+  _CTRL_DIR = _ROOT_DIR + "/ctrl" # contains instances control sockets
+  _CONF_DIR = _ROOT_DIR + "/conf" # contains instances startup data
+  _DIRS = [_ROOT_DIR, _PIDS_DIR, _CTRL_DIR, _CONF_DIR]
 
   PARAMETERS = [
     constants.HV_KERNEL_PATH,
-- 
GitLab