Ask Your Question
0

enabling nova VIF driver operation in a quantum plugin

asked 2013-04-11 23:37:44 -0500

prashanth-prahal gravatar image

Hi Folks,

Trying to see what's the right way to accomplish this. I'm prototyping a quantum plugin and for some of the operations, it is a pass-through to the nova VIF driver. For example, for create_port operation, I want the nova driver to assign the IP address to the VM.

This is what the create_port in my plugin looks like :

def create_port(self, context, port):
    return super(MyQuantumPluginV2, self).create_port(context, port)

I use this command to create a VM nova boot --image image_name --flavor m1.tiny --nic net-id=12be9b0f-a97a-4ab1-8307-d7cc5cd8564c --key-name test my_server

When the VM comes up, it has the virtual interface plumbed in, but the IP address is not assigned.

I can see in the log that an IP address was assigned to the port :

('create port completed {} {}', {'status': 'ACTIVE', 'device_owner': u'compute:None', 'name': '', 'mac_address': 'fa:16:3e:2d:33:92', 'network_id': u'12be9b0f-a97a-4ab1-8307-d7cc5cd8564c', 'tenant_id': u'61ab6bf71f644419bcfdeb8528cb3f5c', 'admin_state_up': True, 'fixed_ips': [{'subnet_id': u'9de0b387-576c-4898-a472-319b39a0e7b0', 'ip_address': u'30.0.0.6'}], 'id': '25c02aa6-7f21-4399-9ae6-41520dd97a8f', 'device_id': u'a664d6e9-6975-4b5d-b7af-1b81b2f67296'}, [{'subnet_id': u'9de0b387-576c-4898-a472-319b39a0e7b0', 'ip_address': u'30.0.0.6'}])

I probably am missing something here, any thoughts ?

Thanks !

If it helps, here's quantum.conf

[DEFAULT] auth_strategy = keystone allow_overlapping_ips = False state_path = /opt/stack/data/quantum debug = True verbose = True service_plugins = quantum.plugins.services.agent_loadbalancer.plugin.LoadBalancerPlugin core_plugin = quantum.plugins.my_quantum_plugin.MyQuantumPluginV2 rabbit_password = openstack rabbit_host = localhost rpc_backend = quantum.openstack.common.rpc.impl_kombu bind_host = 0.0.0.0 bind_port = 9696 api_paste_config = api-paste.ini control_exchange = quantum notification_driver = quantum.openstack.common.notifier.rpc_notifier default_notification_level = INFO notification_topics = notifications [QUOTAS] [DEFAULT_SERVICETYPE] [AGENT] root_helper = sudo /usr/local/bin/quantum-rootwrap /etc/quantum/rootwrap.conf [keystone_authtoken] auth_host = 10.9.12.20 auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = quantum admin_password = openstack signing_dir = /var/cache/quantum

[DEFAULT] l3_agent_manager = quantum.agent.l3_agent.L3NATAgentWithStateReport external_network_bridge = br-ex signing_dir = /var/cache/quantum admin_password = openstack admin_user = quantum admin_tenant_name = service auth_url = http://10.9.12.20:35357/v2.0 root_helper = sudo /usr/local/bin/quantum-rootwrap /etc/quantum/rootwrap.conf use_namespaces = True debug = True verbose = True

Show debugging output in log (sets DEBUG log level output)

debug = True

L3 requires that an interface driver be set. Choose the one that best

matches your plugin.

OVS based plugins (OVS, Ryu, NEC) that supports L3 agent

interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-04-12 01:09:07 -0500

From within the VM IP address is received via DHCP protocol. E.g. dhcp server knows which ip address to assign to the certain mac address, because port creation modifies subnet's dhcp server config. So once VM is up, it sends dhcp requests and eventually receives response and assigns ip address to the interface.

edit flag offensive delete link more
0

answered 2013-04-15 02:21:56 -0500

prashanth-prahal gravatar image

Thanks Eugene..

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-04-11 23:37:44 -0500

Seen: 13 times

Last updated: Apr 15 '13