Revision a8e8c0c6 lib/hypervisor/hv_xen.py
b/lib/hypervisor/hv_xen.py | ||
---|---|---|
33 | 33 |
from ganeti import netutils |
34 | 34 |
from ganeti import objects |
35 | 35 |
from ganeti import pathutils |
36 |
from ganeti import vcluster |
|
37 | 36 |
from ganeti import ssconf |
38 | 37 |
|
39 | 38 |
|
40 |
XEND_CONFIG_FILE = vcluster.AddNodePrefix("/etc/xen/xend-config.sxp") |
|
41 |
XL_CONFIG_FILE = vcluster.AddNodePrefix("/etc/xen/xl.conf") |
|
42 |
VIF_BRIDGE_SCRIPT = vcluster.AddNodePrefix("/etc/xen/scripts/vif-bridge") |
|
39 |
XEND_CONFIG_FILE = utils.PathJoin(pathutils.XEN_CONFIG_DIR, "xend-config.sxp") |
|
40 |
XL_CONFIG_FILE = utils.PathJoin(pathutils.XEN_CONFIG_DIR, "xen/xl.conf") |
|
41 |
VIF_BRIDGE_SCRIPT = utils.PathJoin(pathutils.XEN_CONFIG_DIR, |
|
42 |
"scripts/vif-bridge") |
|
43 | 43 |
_DOM0_NAME = "Domain-0" |
44 | 44 |
|
45 | 45 |
|
... | ... | |
73 | 73 |
@rtype: str |
74 | 74 |
|
75 | 75 |
""" |
76 |
return "/etc/xen/%s" % instance_name
|
|
76 |
return utils.PathJoin(pathutils.XEN_CONFIG_DIR, instance_name)
|
|
77 | 77 |
|
78 | 78 |
@classmethod |
79 | 79 |
def _WriteConfigFile(cls, instance, startup_memory, block_devices): |
... | ... | |
90 | 90 |
|
91 | 91 |
""" |
92 | 92 |
# just in case it exists |
93 |
utils.RemoveFile("/etc/xen/auto/%s" % instance_name) |
|
93 |
utils.RemoveFile(utils.PathJoin(pathutils.XEN_CONFIG_DIR, "auto", |
|
94 |
instance_name)) |
|
95 |
|
|
94 | 96 |
cfg_file = XenHypervisor._ConfigFileName(instance_name) |
95 | 97 |
try: |
96 | 98 |
utils.WriteFile(cfg_file, data=data) |
Also available in: Unified diff