From 45c192aee681eb684599ac2cacd9c38996ca2bb5 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Fri, 2 Jul 2010 10:39:04 -0500 Subject: Fixes and add interface template --- nova/compute/disk.py | 2 +- nova/compute/interfaces.template | 18 ++++++++++++++++++ nova/compute/network.py | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 nova/compute/interfaces.template (limited to 'nova/compute') diff --git a/nova/compute/disk.py b/nova/compute/disk.py index 3f528de61..3cf06e0eb 100644 --- a/nova/compute/disk.py +++ b/nova/compute/disk.py @@ -125,7 +125,7 @@ def inject_data(image, key=None, net=None, partition=None, execute=None): # inject key file yield _inject_key_into_fs(key, tmpdir, execute=execute) if net: - yield _inject_net_into_fs(net, tmpdir) + yield _inject_net_into_fs(net, tmpdir, execute=execute) finally: # unmount device yield execute('sudo umount %s' % mapped_device) diff --git a/nova/compute/interfaces.template b/nova/compute/interfaces.template new file mode 100644 index 000000000..11df301f6 --- /dev/null +++ b/nova/compute/interfaces.template @@ -0,0 +1,18 @@ +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). + +# The loopback network interface +auto lo +iface lo inet loopback + +# The primary network interface +auto eth0 +iface eth0 inet static + address %(address)s + netmask %(netmask)s + network %(network)s + broadcast %(broadcast)s + gateway %(gateway)s + dns-nameservers %(dns)s + + diff --git a/nova/compute/network.py b/nova/compute/network.py index 5223e59da..1cb202ea9 100644 --- a/nova/compute/network.py +++ b/nova/compute/network.py @@ -75,7 +75,7 @@ flags.DEFINE_string('simple_network_gateway', '192.168.0.1', 'Broadcast for simple network') flags.DEFINE_string('simple_network_broadcast', '192.168.0.255', 'Broadcast for simple network') -flags.DEFINE_string('simple_network_dns', '8.8.8.8', +flags.DEFINE_string('simple_network_dns', '8.8.4.4', 'Dns for simple network') logging.getLogger().setLevel(logging.DEBUG) -- cgit