Tuesday, 2016-12-27

*** yamamot__ has joined #openstack-dragonflow01:41
openstackgerritMerged openstack/dragonflow: Add manual deployment guide  https://review.openstack.org/41398701:47
openstackgerritMerged openstack/dragonflow: Increase the number of retries for db-lock  https://review.openstack.org/41335201:47
*** gongysh has joined #openstack-dragonflow02:05
*** gongysh has quit IRC02:20
openstackgerrithujie proposed openstack/dragonflow: check valid resource version for nb_api  https://review.openstack.org/41312002:38
*** gongysh has joined #openstack-dragonflow03:41
openstackgerritHong Hui Xiao proposed openstack/dragonflow: Rename tunnel_type in Chassis to tunnel_types  https://review.openstack.org/41508704:00
*** yamamot__ has quit IRC05:26
*** yamamot__ has joined #openstack-dragonflow06:09
*** gongysh has quit IRC06:23
*** yamamot__ has quit IRC06:50
openstackgerrithujie proposed openstack/dragonflow: separate control plane and data plane ip address  https://review.openstack.org/41511606:57
*** yamamot__ has joined #openstack-dragonflow07:00
*** yuval has joined #openstack-dragonflow07:18
*** gongysh has joined #openstack-dragonflow07:37
openstackgerritOmer Anson proposed openstack/dragonflow: Add legacy sNAT rule to l3_proactive_app  https://review.openstack.org/41399307:42
openstackgerritMerged openstack/dragonflow: neutron-lib: use L3 constant from neutron-lib  https://review.openstack.org/41497007:48
oansonYo08:30
dimakHello08:30
oansonxiaohhui, hujie, irenab, you guys here?08:30
irenabhi08:30
* xiaohhui raises his hand08:30
oansono/^~08:31
dimaklihi promised to join us as well08:31
oansonThat was supposed to be a towel, but it didn't come out right :)08:31
oansonyamamot__, are you joining us for the NB refactor discussion?08:32
dimakMaybe you should install the emoji keyboard 😂08:32
lihiHi08:32
oansonAll right. So the spec was updated here: https://review.openstack.org/#/c/410298/08:32
oansondimak, if something can't be done in ascii, it's not worth doing08:32
oansonActually, I take that back08:32
oansondimak also uploaded some example code here: https://review.openstack.org/#/c/414984/2/dragonflow/db/models3.py08:33
dimakThe actual models down below are just for presentation08:34
dimakAll the names are suggestions :)08:34
irenabdimak: models can be defined each in its own module, right?08:35
dimakirenab, yes, we'll provide decorators to register them08:35
oansonirenab, I think that's a requirement08:35
dimakand to extend the provided classes to include the required features08:36
irenabI think probably we need one for based model (L2 mainly) and then there will be separate modules per services08:36
dimakirenab, I agree08:36
oansonSounds good08:37
oansonThen we will also have to add the configuration based registration mechanism08:37
dimakWe have to see if we can get jsonmodels accepted as requirement08:37
dimakOr do we have to find something else08:37
oansondimak, you said you couldn't find any alternative that isnt' db-backed, right?08:38
irenabThe proposal looks reasonable to me, expecially from the service dev perspective. Adding new model seems quite simple. RefWrapper /Ref is a bit tricky though08:38
oansonThat means it's either that, or writing something ourselves.08:38
dimakoanson, I did not find anything of the kind08:38
oansonIf that's the case (and we need to verify it), we may prefer to take over the project (if it's abandoned) rather than start anew08:38
oansondimak, could you explain a bit more about the RefWrapper/Ref design?08:39
dimakOk yes08:40
dimakThere are 2 parts to this08:40
dimakNames might not be 100% great yet08:40
dimakRef wrapper is quite simple.08:40
dimakIts a proxy to an object08:40
dimakif we request its ID, it returns it08:41
dimakother requests go to a backing object08:41
dimakThe way you use it is by specifying the model, and the id of the object08:41
dimakNow ref is a model field, that wraps a "foreign key" field in the json08:42
oansonThe names are a bit confusing.08:42
xiaohhuiThis way, we achieve some relationship between models like sql, right?08:43
oansonMaybe rename RefWrapper to Proxy, or ModelProxy?08:43
dimakxiaohhui, its not exactly for relationship purposes08:43
dimakxiaohhui, more for easy retrieval of pointed object08:44
xiaohhuiIn which scenario, the pointed object will be retrieved?08:44
dimakSome of our objects are contained (subnets, lrouter ports), and some are pointed by ID (lport->lswitch), this way we can use both the same way08:44
yuli_shello08:45
oansonThis is in a sense relationship. lports point to networks. networks contain subnets. etc.08:45
oansonyuli_s, hi08:45
dimakxiaohhui, object retrieval can be configured to be either lazy, then it will happen first time you access a field other than id on the ref08:45
dimakor eager, then you fetch it right away08:45
dimakI didn't write that code though we though of going to db store and if its not there to nb db08:46
oansondimak, I don't see our discussion of cache-dirty marking in the example code. Was that removed?08:46
dimakthe example code doesn't have a cache08:47
xiaohhuiIs it for the case for something like get_lswitch_by_lport_id, this way we can call something like get_lswitch(lport_id)08:47
oansonThere is a db store. It's just very basic.08:47
dimakall lookups are using iteration :)08:47
dimakRewriting DbStore is a task by itself08:47
xiaohhuiI meant lport.get_lswitch()08:48
oansonYes. But this example should contain as many features as possible, even if they are only stubs.08:48
oansonThe cache dirty mark is very cool. I wouldn't want to miss it08:48
dimakxiaohhui, we can get it by getting the lport, then lport.lswitch08:48
dimakis a ref to the lswitch08:48
*** yamamot__ has quit IRC08:48
xiaohhuiOK, thanks for the explaination08:48
dimakoanson, I can upload another example with the dirty mark later on08:49
oansondimak, thanks. Please do.08:49
lihiI also think that the names are a bit confusing, but basically that's sounds good08:50
dimakI'll send a patch soon to request adding jsonmodels to openstack-requirement unless anyone wants to propose another framework08:50
lihi+08:50
lihioops sorry08:50
oansondimak, +108:51
dimakUmm, what about the model registration part?08:52
dimakDo we want to just have a list of model modules like we do with apps?08:52
oansonIn the spec I suggested using a (separate) register_model decorator08:53
oansonThis way 'built' models can be registered immediately08:53
oansonThe containing module will have to be loaded. This will have to be passed via configuration.08:53
dimakI meant that in case I add my own file08:53
dimakwith my own models08:53
dimaksomeone has to import it08:53
oansonYes. I'd like something like the App / DB driver mechanism - a namespace for models (e.g. dragonflow_models) and the name of the service08:54
irenabdimak: we can consider using stevedore, but this can be done later08:54
dimakOk, we have to make sure we're loading the same models on both the controllers and the neutron nodes08:55
xiaohhuiCan't the models just reside in the app module?08:55
xiaohhuisome basic models in a common file08:55
oansonxiaohhui, the core models, yes08:55
xiaohhuithe floatingip in dnat_app file08:55
dimakxiaohhui, apps are loaded in the neutron server code?08:55
xiaohhuiapps are loaded in df-local-controller08:56
oansonxiaohhui, but we want to allow external vendors to implement their own services/apps.08:56
oansonIt would be easier if a developer could write everything in their own repository, and then just include it in the config file.08:56
xiaohhuisince we are going to load the app anyway, we can register the model when we load that app08:56
oansonIt will also allow us to create a Dragonflow theatre -08:56
oansonThe Dragonflow base (controller, API)08:56
lihiBut eventually, each vendor will be required to changed the configuration file with the models?08:57
oansonand a theatre project per feature (l3, qos, lbaas, fwaas, etc.)08:57
oansonlihi, yes, but that is done in deployment08:57
oansonAnd from the looks of stevedore, it might solve that problem too (but I need to read more)08:57
xiaohhuiSo the vendor needs to config the app of their own, and also configure the db models, right?08:58
dimakit seems that way08:58
oansonTo a point though. I don't want any 'magic' in loading new services - I want it to be easily trackable through the code.08:58
oansonxiaohhui, yes. The vendor will have to add his models, services, and apps.08:58
xiaohhuiI think we can hide models from vendors, or users. After all, it is a bit duplicating with app.08:59
oansonOnly in definition08:59
xiaohhuiThat is a bit too detailed for user need to know.08:59
dimakmaybe we want to wrap all of it together, service plugin, app, and models09:00
dimakfor example, SFC has all of the three and it doesn't make sense to include just part of them09:00
oansonxiaohhui, sorry, confused users with developers/vendors09:00
xiaohhuiIf there are in the configuration files, user will eventually see them.09:01
oansonYes, that makes sense. Offer an 'application' registry, where the application defines its models, apps, and api adaptors09:01
xiaohhuiservice plugin is for neutron server to know what to run09:01
xiaohhuiapp is for df controller to know what to run09:01
dimakmodels can be required for both09:01
dimakto send messages over nb api09:01
oansonBut if we tell the developer they can provide one name, and then read <name>.app, <name>.models, and <name>.<api adaptors>09:02
oansonAnd make it overridable, so that we don't force the structure on the vendor more than we have to09:02
oansonYes, models are needed on both sides09:02
xiaohhuibasically, I know what models I need, if I specify some service plugin and app09:03
oansonstevedore appears to solve that too. It has extensions pattern, which allow you to define multiple entrypoints with different names09:03
xiaohhuioanson, I think that is feasible, use one name for both app and models09:04
oansonxiaohhui, you know what models, app, and service plugin you need if you specify an overall application. e.g. if you want 'FWaaS', you are going to want all 3: models, API, and implementation (DF App)09:04
irenaboanson: so you suggestt tackle the app as a whole or step by step starting with NB DB refactor?09:06
oansonstep by step09:06
oansonMostly because otherwise the change would be too big, and we won't reach the end09:06
irenabok, I got confused by discussion scope change :-)09:07
dimakI think we can do this after we figure out the NB refactor, and have a list of model files to include09:07
oansonOnce the nb refactor is finished, I suggest a SB refactor (DF controller and applications)09:07
xiaohhuiAgree09:07
oansonOnce the SB refactor is done, consider maybe moving over to a more general pluggability model, e.g. stevedore09:07
oansonIn parallel, once the NB refactor is done, I would like to push the native API forwards too09:08
oansonAnd next cycle, we're going to solve P=NP09:08
irenaboanson: REST on top of the models?09:08
dimakYou meant P!=NP :)09:08
oansondimak, we'll see next cycle09:09
oansonirenab, yes and no09:09
oansonirenab, I was thinking a programmable api, and a REST layer on top of it.09:09
dimakirenab, oanson jsonmodels allows exporting jsonschema out of the defined models09:09
oansonNeutron API and CLI don't have to go through REST09:09
oansondimak, that makes sense. We'll probably use that09:09
oansonIn fact, I'd prefer Neutron API not to go through REST. I think it will add an unnecessary overhead09:10
dimakoanson, but maybe having a single API would be simpler?09:10
irenaboanson: maybe you just need to clarify what native API means09:10
oansonirenab, yes, I think I do :)09:11
oansondimak, we will have a single API, and adaptors on top of that09:11
oansonBy native API, I mean a set of function calls, with all the necessary plumbing (e.g. AAA) to control a dragonflow deployment09:11
xiaohhuiSorry to interrupt, one last comment. Can we just import the db model module in service plugin and in app? We will do that import anyway, right? If so, then the db models can be registered when imported, and we don't need to make them into config fule.09:12
oansonA REST API on top of that can be a thin https server that calls these functions, and translates that info09:12
xiaohhuifule->file09:12
dimakxiaohhui, we will need the models in mech driver as well09:12
irenaboanson: +109:12
dimakand it doesn't import the apps09:12
xiaohhuibut, mech driver will run with service plugin09:13
oansonxiaohhui, in any case we will need to write down the application somewhere in configuration. I think using a centralised place will make things a bit more organised09:13
xiaohhuiin one process09:13
oansonInstead of importing the service plugin/app that will import the models, import the application's registration code which will provide both models and service plugin/app09:13
oansonIn my opinion that will be clearer later. (But obviously I may be wrong)09:14
xiaohhuiI just feel it might be confused if I am a newbie. I need to figure out what models I need when configure neutron.conf, and dragonflow.ini09:15
irenabIs anyone ok with the basic proposal that oanson and dimak posted in the spec and POC patches?09:15
oansonAnd this IRC chat?09:15
oansonxiaohhui, we will have to prepare some examples, showing how to load apps in the configuration09:16
dimakBTW, everyone are welcome check out the poc patch and play with it, all the tested things should work (conditions apply)09:16
irenaboanson: seems we are raiseng much more advanced steps, maybe worth to start from the DB refactor and graduate to the app dynamic management09:16
xiaohhuiSure, I just bring out my concens09:16
oansonxiaohhui, in any case, we can use the same configuration in the neutron.conf  and dragonflow.ini : dragonflow_services = FW, LB, L3, ...09:16
lihixiaohhui, that something that a newbie will be required to know, if he'll want to add new models09:16
oansonxiaohhui, and then by context load what we need09:17
oansonirenab, that's the short term plan, yes09:17
lihior cahnge the defaukt configration09:17
oansonThat's what we said09:17
oansonlihi, yes. But the way things are done now are not exactly newbie-friendly either09:18
dimakoanson, but when you add a new model you get to touch almost all parts of code so by the time you're done you're dragonflow expert09:18
lihiI don't think there is a way this will be really newbie-friendly09:19
irenabdimak: :-)09:19
oansondimak, that's how things are done now. This is what we're here to solve (today)09:19
oansonlihi, true. But I hope by the time we're done, it will look... better :)09:20
dimakAnything else we want to address?09:20
dimakHow do we proceed with the spec?09:21
oansonThe spec has to be voted on and approved. In theory that includes the work plan within it09:21
oansonOnce that is done, we start on the work plan.09:21
oansonObviously, even after the spec is approved, nothing is set in stone. We can revisit our decisions if we realised we've made a terrible, terrible mistake09:22
irenaboanson: keeping scope on DB refactor, correct?09:22
oansonThis spec, yes09:22
oansonOnce this spec is approved, and we've made decent progress, I'll introduce a SB refactor spec09:22
dimakDo you want to wait until jsonmodels is approved as requirement?09:22
oansonIt should be much easier, since most of the work was done in this spec09:23
oansondimak, no09:23
oansonAs I said, due to the circumstances, if it will be necessary, we will take control of the project09:23
oanson(If possible)09:23
dimakMaybe infra folks will suggest some other alternatives09:24
irenabdimak:  did you try to ask on the infra channel?09:24
dimakirenab, nope, I will09:24
oansonI hope there's someone there. It's Christmas.09:25
oansondimak, if that's the case, we will re-review09:25
dimakYeah, I'll send the patch in the meantime09:25
oansonBut I suspect that even if we change a backend, the change will not be great09:25
dimakoanson, I agree09:25
oansonWe don't rely on any special features that are not expected from any ORM-based solution.09:25
oansonAll right. Let's wrap up.09:26
oansonPlease vote on the spec. I will update it again later today if necessary.09:26
dimakThanks everyone09:26
oanson^^^^^^^^^^^^^^^09:26
lihiThank you :)09:26
irenabthanks09:26
xiaohhui😏09:27
oanson#endmeeting (oh wait...)09:27
irenaboanson: sleepless nights …09:27
*** gongysh has quit IRC09:30
*** zenoway has joined #openstack-dragonflow09:38
*** irenab_ has joined #openstack-dragonflow09:38
*** irenab_ has quit IRC09:38
*** zenoway has quit IRC09:40
*** zenoway has joined #openstack-dragonflow09:40
openstackgerrithujie proposed openstack/dragonflow: separate control plane and data plane ip address  https://review.openstack.org/41511609:54
*** zenoway has quit IRC11:51
*** zenoway has joined #openstack-dragonflow11:51
openstackgerrithujie proposed openstack/dragonflow: separate control plane and data plane ip address  https://review.openstack.org/41511611:55
*** zenoway has quit IRC11:56
openstackgerritMerged openstack/dragonflow: Tap-as-a-service plugin  https://review.openstack.org/39630712:32
*** dkb has joined #openstack-dragonflow12:37
*** duankebo has joined #openstack-dragonflow12:38
*** yamamoto has joined #openstack-dragonflow12:46
*** yamamoto has quit IRC12:53
*** yamamoto has joined #openstack-dragonflow12:53
*** yamamoto has quit IRC13:00
*** dkb has quit IRC13:20
*** duankebo has quit IRC13:24
openstackgerritMerged openstack/dragonflow: check valid resource version for nb_api  https://review.openstack.org/41312013:27
openstackgerritMerged openstack/dragonflow: Rename tunnel_type in Chassis to tunnel_types  https://review.openstack.org/41508713:37
*** yamamoto has joined #openstack-dragonflow13:47
*** yuval has quit IRC14:29
*** yamamoto has quit IRC14:35
*** yamamoto has joined #openstack-dragonflow14:39
*** yamamoto has quit IRC14:44
*** lihi has quit IRC14:48
*** lihi has joined #openstack-dragonflow14:49
*** yamamoto has joined #openstack-dragonflow14:49
*** yuval has joined #openstack-dragonflow14:52
*** yuval has quit IRC15:06
*** openstackgerrit_ has joined #openstack-dragonflow15:56
*** openstackgerrit_ has quit IRC15:57
*** yamamoto has quit IRC17:37
*** yamamoto has joined #openstack-dragonflow18:37
*** yamamoto has quit IRC18:48

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