Friday, 2016-01-15

*** annegentle has quit IRC00:51
*** julim has joined #openstack-opw02:42
*** rossella_s has quit IRC02:52
*** rossella_s has joined #openstack-opw02:52
*** annegentle has joined #openstack-opw03:44
*** joyce__ has joined #openstack-opw04:19
*** annegentle has quit IRC04:55
*** annegentle has joined #openstack-opw04:59
*** annegentle has quit IRC05:01
*** psargent has quit IRC05:26
*** sirushti has quit IRC05:34
*** joyce__ has quit IRC06:37
*** psargent has joined #openstack-opw08:23
*** neiljerram has joined #openstack-opw09:32
*** psargent has quit IRC10:51
*** psargent has joined #openstack-opw10:53
*** aysyd has joined #openstack-opw11:09
*** psargent has quit IRC11:15
*** psargent has joined #openstack-opw11:15
*** katyafervent is now known as katyafervent_awa12:16
*** katyafervent_awa is now known as katyafervent12:17
*** lblanchard has joined #openstack-opw12:40
*** enthurohini has joined #openstack-opw12:52
*** annegentle has joined #openstack-opw13:44
*** sonali5 has joined #openstack-opw13:48
*** annegentle has quit IRC13:57
*** annegentle has joined #openstack-opw13:58
*** sonali5 has quit IRC13:58
psargentneiljerram: are you there?15:00
neiljerrampsargent, Yes, hello, how are things?15:01
neiljerramI'm sorry that I wasn't around when we planned for yesterday.15:02
psargentgood day !15:02
psargentno 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
vkmchey all o/15:04
vkmchappy friday!15:04
vkmchow are you doing with your internships? hope that it's going awesome :)15:04
psargentHappy Friday!15:04
neiljerramHi vkmc !15:05
neiljerrampsargent, sounds good.  Were you able to follow through the pluggable IPAM code?15:05
psargentYes, I walked through the code - noticed a procedure called "try_generate_IP" which allocated IP from range15:08
psargentand removed IP from availability range15:08
psargentthe driver was located in .../neutrondb_ipam/driver.py15:10
neiljerramHang on, I'll take a look there too.15:11
psargentI was looking for some procedure calls in ...neutron/db/ipam_pluggable_backend.py15:11
psargentbut I didn't see any procedure calls from ipam_pluggable_backend.py when I walked through the code15:12
neiljerramYes, I think that's because  ipam_pluggable_backend.py only logs when something goes wrong.15:13
neiljerramI.e. it doesn't log anything in the normal success case.15:14
psargentohh ok...15:14
psargentI started looking into how does a VP get an IP15:15
neiljerramSo is .../neutrondb_ipam/driver.py the default driver for pluggable IPAM?15:15
psargentthat's what I am thinking....15:16
psargentit accomplished a lot of the work to allocate the IP...15:16
neiljerramYes, it seems that driver.Pool.get_instance() looks at a config setting called 'ipam_driver'15:18
psargentyes....i was just looking at that15:19
neiljerramThen that name is mapped to a Python class, according to this mapping table from setup.cfg:15:19
neiljerramneutron.ipam_drivers =15:19
neiljerram    fake = neutron.tests.unit.ipam.fake_driver:FakeDriver15:19
neiljerram    internal = neutron.ipam.drivers.neutrondb_ipam.driver:NeutronDbPool15:19
neiljerramPresumably you have ipam_driver=internal ?15:20
psargentwhere is setup.cfg located?15:20
neiljerramIt's in the root of the Neutron repository.15:21
psargentok...I see it15:21
neiljerramSo that explains how your code got from ipam_pluggable_backend.py to .../neutrondb_ipam/driver.py15:23
psargenti don't see the mapping table in my setup.cfg file15:23
neiljerramFor me it is at line 10615:25
neiljerramIs your Neutron repository reasonably up to date?15:25
psargentI see it now !....I was in the wrong directory15:26
neiljerramAh, cool.15:26
neiljerramNext 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
neiljerramBut first are you happy with why the code in .../neutrondb_ipam/driver.py is being called at all?15:29
psargentI am not quite clear - is it because the ipam_driver is set to internal15:30
neiljerramYes, that's one of the factors.15:31
neiljerramSo, 'internal' is just a name, that maps to neutron.ipam.drivers.neutrondb_ipam.driver:NeutronDbPool15:31
psargentand then checks the setup.cfg and maps to ...15:31
psargentyes...ok that was what I was thinking15:32
neiljerramAnd "neutron.ipam.drivers.neutrondb_ipam.driver:NeutronDbPool" means the NeutronDbPool class in neutron/ipam/drivers/neutrondb_ipam/driver.py15:32
psargentYep! got it!15:32
psargentnext would be to understand the structore of the driver IPI15:33
neiljerramSo when ipam_pluggable_backend.py wants to call the configured driver, it first does "ipam_driver = driver.Pool.get_instance(None, context)"15:34
neiljerramwhich means the get_instance() code in neutron/ipam/driver.py15:35
psargentok...so that's how it would call a new driver15:37
neiljerramThere are two possible parameters to get_instance: a subnet and a context.  And the driver class gets constructed with those two parameters15:37
psargentthe subnet would be something that is configured ....when I create the network...I created a subnet name as well15:39
neiljerramYes, 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
neiljerramWell 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
neiljerramYou may already be ahead of me here, so please don't be afraid to say so, if so.15:41
neiljerramIf 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
neiljerram8 matches for "ipam_driver\." in buffer: ipam_pluggable_backend.py15: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
psargentlol.....I don't know exactly what I'm doing ...but I'm just taking steps and hope it's in the right director15: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
neiljerramRight now I don't understand that.  For example I don't see any individual IP allocation calls there...15:44
neiljerramMy guess is that we then have to look more closely at those factory objects.15:44
neiljerram3 matches for "factory\." in buffer: ipam_pluggable_backend.py15: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
psargentI wondering how I can get this code to execute15:46
neiljerramI think it is already executing in your system.  Isn't it?15:47
psargentI am looking through the logs....15:47
neiljerramI'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
neiljerramIt 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
neiljerramBut ideally there should be some proper doc for this, rather than us trying to work it out from the code!15:51
psargentlol....yep!15:52
psargenti'll take a look at this in more detail.....15:53
neiljerramhttp://specs.openstack.org/openstack/neutron-specs/specs/liberty/neutron-ipam.html15:54
neiljerramBut 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
psargentThis code is for allocated the ip for the network, right....What code allocated an IP for the VM?15:54
neiljerramThis code will handle allocating an IP for any purpose, I believe.15:56
neiljerramMost commonly, for a VM.15:56
neiljerramI'm afraid I need to go for another call now - would you like to carry on in about an hour from now?15:57
psargentwhere does openvswitch come into play?15:57
psargentok...sure...I'll be here15:57
*** neiljerram has quit IRC16:42
*** annegentle has quit IRC16:56
*** joyce__ has joined #openstack-opw17:02
*** annegentle has joined #openstack-opw17:24
*** rossella_s has quit IRC18:52
*** rossella_s has joined #openstack-opw18:52
*** neiljerram has joined #openstack-opw18:59
*** neiljerram has quit IRC19:54
*** annegentle has quit IRC20:42
*** enthurohini has quit IRC20:45
*** joyce__ has quit IRC22:17
*** aysyd has quit IRC22:19
*** julim has quit IRC22:45
*** lblanchard has quit IRC22:55

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!