Move cc_host and cc_port flags into nova/network/linux_net.py. They

weren't used anywhere else.

Make cc_host default to nova.utils.get_my_ip() instead of 127.0.0.1.
cc_host is used to set up forwarding to the meta-data service, and the
kernel doesn't allow routing to a loopback device, so 127.0.0.1 is a
poor default.
This commit is contained in:
Soren Hansen 2010-12-01 20:16:21 +00:00 committed by Tarmac
commit 687cfacc3f
2 changed files with 2 additions and 2 deletions

View File

@ -223,8 +223,6 @@ DEFINE_string('rabbit_virtual_host', '/', 'rabbit virtual host')
DEFINE_integer('rabbit_retry_interval', 10, 'rabbit connection retry interval')
DEFINE_integer('rabbit_max_retries', 12, 'rabbit connection attempts')
DEFINE_string('control_exchange', 'nova', 'the main exchange to connect to')
DEFINE_string('cc_host', '127.0.0.1', 'ip of api server')
DEFINE_integer('cc_port', 8773, 'cloud controller port')
DEFINE_string('ec2_url', 'http://127.0.0.1:8773/services/Cloud',
'Url to ec2 api server')

View File

@ -46,6 +46,8 @@ flags.DEFINE_string('vlan_interface', 'eth0',
'network device for vlans')
flags.DEFINE_string('dhcpbridge', _bin_file('nova-dhcpbridge'),
'location of nova-dhcpbridge')
flags.DEFINE_string('cc_host', utils.get_my_ip(), 'ip of api server')
flags.DEFINE_integer('cc_port', 8773, 'cloud controller port')
flags.DEFINE_string('routing_source_ip', '127.0.0.1',
'Public IP of network host')
flags.DEFINE_bool('use_nova_chains', False,