Revision 5420ffc9
b/lib/constants.py | ||
---|---|---|
101 | 101 |
QUEUE_DIR = DATA_DIR + "/queue" |
102 | 102 |
ETC_HOSTS = "/etc/hosts" |
103 | 103 |
DEFAULT_FILE_STORAGE_DIR = _autoconf.FILE_STORAGE_DIR |
104 |
SYSCONFDIR = _autoconf.SYSCONFDIR |
|
104 | 105 |
|
105 | 106 |
MASTER_SOCKET = SOCKET_DIR + "/ganeti-master" |
106 | 107 |
|
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
76 | 76 |
_MIGRATION_STATUS_RE = re.compile('Migration\s+status:\s+(\w+)', |
77 | 77 |
re.M | re.I) |
78 | 78 |
|
79 |
_KVM_NETWORK_SCRIPT = constants.SYSCONFDIR + "/ganeti/kvm-vif-bridge" |
|
80 |
|
|
79 | 81 |
def __init__(self): |
80 | 82 |
hv_base.BaseHypervisor.__init__(self) |
81 | 83 |
# Let's make sure the directories we need exist, even if the RUN_DIR lives |
... | ... | |
148 | 150 |
script.write("export BRIDGE=%s\n" % nic.bridge) |
149 | 151 |
script.write("export INTERFACE=$1\n") |
150 | 152 |
# TODO: make this configurable at ./configure time |
151 |
script.write("if [ -x /etc/ganeti/kvm-vif-bridge ]; then\n")
|
|
153 |
script.write("if [ -x '%s' ]; then\n" % self._KVM_NETWORK_SCRIPT)
|
|
152 | 154 |
script.write(" # Execute the user-specific vif file\n") |
153 |
script.write(" /etc/ganeti/kvm-vif-bridge\n")
|
|
155 |
script.write(" %s\n" % self._KVM_NETWORK_SCRIPT)
|
|
154 | 156 |
script.write("else\n") |
155 | 157 |
script.write(" # Connect the interface to the bridge\n") |
156 | 158 |
script.write(" /sbin/ifconfig $INTERFACE 0.0.0.0 up\n") |
Also available in: Unified diff