*** annegentle has quit IRC | 00:51 | |
*** julim has joined #openstack-opw | 02:42 | |
*** rossella_s has quit IRC | 02:52 | |
*** rossella_s has joined #openstack-opw | 02:52 | |
*** annegentle has joined #openstack-opw | 03:44 | |
*** joyce__ has joined #openstack-opw | 04:19 | |
*** annegentle has quit IRC | 04:55 | |
*** annegentle has joined #openstack-opw | 04:59 | |
*** annegentle has quit IRC | 05:01 | |
*** psargent has quit IRC | 05:26 | |
*** sirushti has quit IRC | 05:34 | |
*** joyce__ has quit IRC | 06:37 | |
*** psargent has joined #openstack-opw | 08:23 | |
*** neiljerram has joined #openstack-opw | 09:32 | |
*** psargent has quit IRC | 10:51 | |
*** psargent has joined #openstack-opw | 10:53 | |
*** aysyd has joined #openstack-opw | 11:09 | |
*** psargent has quit IRC | 11:15 | |
*** psargent has joined #openstack-opw | 11:15 | |
*** katyafervent is now known as katyafervent_awa | 12:16 | |
*** katyafervent_awa is now known as katyafervent | 12:17 | |
*** lblanchard has joined #openstack-opw | 12:40 | |
*** enthurohini has joined #openstack-opw | 12:52 | |
*** annegentle has joined #openstack-opw | 13:44 | |
*** sonali5 has joined #openstack-opw | 13:48 | |
*** annegentle has quit IRC | 13:57 | |
*** annegentle has joined #openstack-opw | 13:58 | |
*** sonali5 has quit IRC | 13:58 | |
psargent | neiljerram: are you there? | 15:00 |
---|---|---|
neiljerram | psargent, Yes, hello, how are things? | 15:01 |
neiljerram | I'm sorry that I wasn't around when we planned for yesterday. | 15:02 |
psargent | good day ! | 15:02 |
psargent | no worries! I was able to set ipam_driver=internal and do some testing. I created a network and say where neutramdb_ipam driver allocated the IP. | 15:04 |
vkmc | hey all o/ | 15:04 |
vkmc | happy friday! | 15:04 |
vkmc | how are you doing with your internships? hope that it's going awesome :) | 15:04 |
psargent | Happy Friday! | 15:04 |
neiljerram | Hi vkmc ! | 15:05 |
neiljerram | psargent, sounds good. Were you able to follow through the pluggable IPAM code? | 15:05 |
psargent | Yes, I walked through the code - noticed a procedure called "try_generate_IP" which allocated IP from range | 15:08 |
psargent | and removed IP from availability range | 15:08 |
psargent | the driver was located in .../neutrondb_ipam/driver.py | 15:10 |
neiljerram | Hang on, I'll take a look there too. | 15:11 |
psargent | I was looking for some procedure calls in ...neutron/db/ipam_pluggable_backend.py | 15:11 |
psargent | but I didn't see any procedure calls from ipam_pluggable_backend.py when I walked through the code | 15:12 |
neiljerram | Yes, I think that's because ipam_pluggable_backend.py only logs when something goes wrong. | 15:13 |
neiljerram | I.e. it doesn't log anything in the normal success case. | 15:14 |
psargent | ohh ok... | 15:14 |
psargent | I started looking into how does a VP get an IP | 15:15 |
neiljerram | So is .../neutrondb_ipam/driver.py the default driver for pluggable IPAM? | 15:15 |
psargent | that's what I am thinking.... | 15:16 |
psargent | it accomplished a lot of the work to allocate the IP... | 15:16 |
neiljerram | Yes, it seems that driver.Pool.get_instance() looks at a config setting called 'ipam_driver' | 15:18 |
psargent | yes....i was just looking at that | 15:19 |
neiljerram | Then that name is mapped to a Python class, according to this mapping table from setup.cfg: | 15:19 |
neiljerram | neutron.ipam_drivers = | 15:19 |
neiljerram | fake = neutron.tests.unit.ipam.fake_driver:FakeDriver | 15:19 |
neiljerram | internal = neutron.ipam.drivers.neutrondb_ipam.driver:NeutronDbPool | 15:19 |
neiljerram | Presumably you have ipam_driver=internal ? | 15:20 |
psargent | where is setup.cfg located? | 15:20 |
neiljerram | It's in the root of the Neutron repository. | 15:21 |
psargent | ok...I see it | 15:21 |
neiljerram | So that explains how your code got from ipam_pluggable_backend.py to .../neutrondb_ipam/driver.py | 15:23 |
psargent | i don't see the mapping table in my setup.cfg file | 15:23 |
neiljerram | For me it is at line 106 | 15:25 |
neiljerram | Is your Neutron repository reasonably up to date? | 15:25 |
psargent | I see it now !....I was in the wrong directory | 15:26 |
neiljerram | Ah, cool. | 15:26 |
neiljerram | Next question for me would be to understand the structure of the driver API - i.e. what calls does ipam_pluggable_backend.py make into the configured driver? | 15:28 |
neiljerram | But first are you happy with why the code in .../neutrondb_ipam/driver.py is being called at all? | 15:29 |
psargent | I am not quite clear - is it because the ipam_driver is set to internal | 15:30 |
neiljerram | Yes, that's one of the factors. | 15:31 |
neiljerram | So, 'internal' is just a name, that maps to neutron.ipam.drivers.neutrondb_ipam.driver:NeutronDbPool | 15:31 |
psargent | and then checks the setup.cfg and maps to ... | 15:31 |
psargent | yes...ok that was what I was thinking | 15:32 |
neiljerram | And "neutron.ipam.drivers.neutrondb_ipam.driver:NeutronDbPool" means the NeutronDbPool class in neutron/ipam/drivers/neutrondb_ipam/driver.py | 15:32 |
psargent | Yep! got it! | 15:32 |
psargent | next would be to understand the structore of the driver IPI | 15:33 |
neiljerram | So when ipam_pluggable_backend.py wants to call the configured driver, it first does "ipam_driver = driver.Pool.get_instance(None, context)" | 15:34 |
neiljerram | which means the get_instance() code in neutron/ipam/driver.py | 15:35 |
psargent | ok...so that's how it would call a new driver | 15:37 |
neiljerram | There are two possible parameters to get_instance: a subnet and a context. And the driver class gets constructed with those two parameters | 15:37 |
psargent | the subnet would be something that is configured ....when I create the network...I created a subnet name as well | 15:39 |
neiljerram | Yes, I think that makes sense. The job of the driver would be to allocate specific IPs, or perhaps a small range of IPs, from within a configured subnet. | 15:40 |
neiljerram | Well in case it's not already obvious, we've arrived at a point where I don't really know what I'm doing! | 15:41 |
neiljerram | You may already be ahead of me here, so please don't be afraid to say so, if so. | 15:41 |
neiljerram | If I look at all of the occurrences of "ipam_driver." in ipam_pluggable_backend.py - in other words, all the places where ipam_pluggable_backend.py is calling into the driver - I see: | 15:43 |
neiljerram | 8 matches for "ipam_driver\." in buffer: ipam_pluggable_backend.py | 15:43 |
neiljerram | 56: ipam_subnet = ipam_driver.get_subnet(ip['subnet_id']) | 15:43 |
neiljerram | 77: factory = ipam_driver.get_address_request_factory() | 15:43 |
neiljerram | 79: ipam_subnet = ipam_driver.get_subnet(ip_dict['subnet_id']) | 15:43 |
neiljerram | 143: factory = ipam_driver.get_subnet_request_factory() | 15:43 |
psargent | lol.....I don't know exactly what I'm doing ...but I'm just taking steps and hope it's in the right director | 15:43 |
neiljerram | 146: ipam_driver.update_subnet(subnet_request) | 15:43 |
neiljerram | 150: ipam_driver.remove_subnet(subnet_id) | 15:43 |
neiljerram | 426: subnet_factory = ipam_driver.get_subnet_request_factory() | 15:43 |
neiljerram | 429: ipam_subnet = ipam_driver.allocate_subnet(subnet_request) | 15:43 |
neiljerram | Right now I don't understand that. For example I don't see any individual IP allocation calls there... | 15:44 |
neiljerram | My guess is that we then have to look more closely at those factory objects. | 15:44 |
neiljerram | 3 matches for "factory\." in buffer: ipam_pluggable_backend.py | 15:45 |
neiljerram | 78: ip_request = factory.get_request(context, port, ip_dict) | 15:45 |
neiljerram | 144: subnet_request = factory.get_request(context, subnet, None) | 15:45 |
neiljerram | 427: subnet_request = subnet_factory.get_request(context, subnet, | 15:45 |
psargent | I wondering how I can get this code to execute | 15:46 |
neiljerram | I think it is already executing in your system. Isn't it? | 15:47 |
psargent | I am looking through the logs.... | 15:47 |
neiljerram | I'm pretty sure it's already executing; I think the problem is understanding it, so that you can start seeing what to do to design and write your own driver. | 15:49 |
neiljerram | It looks like the _ipam_try_allocate_ip code might be a good clue to how the driver API works: | 15:50 |
neiljerram | def _ipam_try_allocate_ip(self, context, ipam_driver, port, ip_dict): | 15:50 |
neiljerram | factory = ipam_driver.get_address_request_factory() | 15:50 |
neiljerram | ip_request = factory.get_request(context, port, ip_dict) | 15:50 |
neiljerram | ipam_subnet = ipam_driver.get_subnet(ip_dict['subnet_id']) | 15:50 |
neiljerram | return ipam_subnet.allocate(ip_request) | 15:50 |
neiljerram | But ideally there should be some proper doc for this, rather than us trying to work it out from the code! | 15:51 |
psargent | lol....yep! | 15:52 |
psargent | i'll take a look at this in more detail..... | 15:53 |
neiljerram | http://specs.openstack.org/openstack/neutron-specs/specs/liberty/neutron-ipam.html | 15:54 |
neiljerram | But I'm not sure if that spec covers everything that we seem to be seeing in the code; so it might be out of date. | 15:54 |
psargent | This code is for allocated the ip for the network, right....What code allocated an IP for the VM? | 15:54 |
neiljerram | This code will handle allocating an IP for any purpose, I believe. | 15:56 |
neiljerram | Most commonly, for a VM. | 15:56 |
neiljerram | I'm afraid I need to go for another call now - would you like to carry on in about an hour from now? | 15:57 |
psargent | where does openvswitch come into play? | 15:57 |
psargent | ok...sure...I'll be here | 15:57 |
*** neiljerram has quit IRC | 16:42 | |
*** annegentle has quit IRC | 16:56 | |
*** joyce__ has joined #openstack-opw | 17:02 | |
*** annegentle has joined #openstack-opw | 17:24 | |
*** rossella_s has quit IRC | 18:52 | |
*** rossella_s has joined #openstack-opw | 18:52 | |
*** neiljerram has joined #openstack-opw | 18:59 | |
*** neiljerram has quit IRC | 19:54 | |
*** annegentle has quit IRC | 20:42 | |
*** enthurohini has quit IRC | 20:45 | |
*** joyce__ has quit IRC | 22:17 | |
*** aysyd has quit IRC | 22:19 | |
*** julim has quit IRC | 22:45 | |
*** lblanchard has quit IRC | 22:55 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!