Wednesday, 2016-12-21

openstackgerritHong Hui Xiao proposed openstack/dragonflow: Remove the legacy tunnel port code  https://review.openstack.org/40657301:12
*** gongysh has joined #openstack-dragonflow01:15
openstackgerritMerged openstack/dragonflow: add active detection app for allowed address pairs  https://review.openstack.org/33997502:10
openstackgerritMerged openstack/dragonflow: change security group lock based on sg_id  https://review.openstack.org/41304602:13
openstackgerritMerged openstack/dragonflow: Apply virtual tunnel port to l2 app  https://review.openstack.org/40614202:13
*** gongysh has quit IRC02:15
openstackgerritMerged openstack/dragonflow: Apply unique_key to security group  https://review.openstack.org/41116702:17
*** gongysh has joined #openstack-dragonflow02:29
openstackgerritLi Ma proposed openstack/dragonflow: Increase the number of retries for db-lock  https://review.openstack.org/41335202:36
openstackgerritHong Hui Xiao proposed openstack/dragonflow: Remove the legacy tunnel port code  https://review.openstack.org/40657303:23
openstackgerritHong Hui Xiao proposed openstack/dragonflow: Dynamic register nb db models  https://review.openstack.org/41064503:31
*** yamamot__ has joined #openstack-dragonflow03:40
openstackgerritLi Ma proposed openstack/dragonflow: Cassandra Support  https://review.openstack.org/39699705:06
openstackgerritjingting proposed openstack/dragonflow: Support VM live migration  https://review.openstack.org/39475905:07
openstackgerritjingting proposed openstack/dragonflow: Support VM live migration  https://review.openstack.org/39475905:10
openstackgerritLi Ma proposed openstack/dragonflow: Temp workaround: fix zeromq binding error  https://review.openstack.org/41341905:49
*** irenab_ has joined #openstack-dragonflow06:21
*** irenab has quit IRC06:23
*** irenab_ is now known as irenab06:23
openstackgerritjingting proposed openstack/dragonflow: Support VM live migration  https://review.openstack.org/39475906:42
*** oanson has joined #openstack-dragonflow06:57
*** rajivk has quit IRC07:19
*** rajivk has joined #openstack-dragonflow07:31
*** openstackgerrit has quit IRC07:48
*** lihi has joined #openstack-dragonflow08:20
*** dimak has joined #openstack-dragonflow08:23
*** dimak has quit IRC08:39
*** dimak has joined #openstack-dragonflow08:41
*** dimak has quit IRC08:41
*** dimak has joined #openstack-dragonflow08:42
*** dimak has quit IRC08:45
*** dimak has joined #openstack-dragonflow08:46
*** dimak has quit IRC08:46
*** lihi has quit IRC08:52
*** saggi has joined #openstack-dragonflow08:53
*** dimak has joined #openstack-dragonflow08:54
*** lihi- has joined #openstack-dragonflow08:58
*** lihi has joined #openstack-dragonflow08:58
*** oanson_ has joined #openstack-dragonflow09:04
*** oanson has quit IRC09:05
*** oanson_ is now known as oanson09:05
*** yuval has joined #openstack-dragonflow09:07
*** hshan has joined #openstack-dragonflow09:10
*** lihi has quit IRC09:13
*** lihi- is now known as lihi09:15
*** zenoway has joined #openstack-dragonflow09:15
dimakoanson,09:15
oansondimak,09:15
dimakand about the nb refactor bp09:16
oansonYes09:16
dimakI was writing some model construction code09:16
oansonCool09:16
dimakI'd like to merge nested and regular fields09:16
dimakI think its too confusing to have both09:16
oansonWhat did you have in mind?09:16
oansonI wasn't able to think of an elegant solution for that09:17
oansonWhat did you have in mind?09:17
dimakhave just one list of fields, and maybe for each field add the ability to specify whether its nested with a type or nor09:17
dimaknot *09:17
dimakbtw09:17
dimakeven if its nested (collection?) it shouldn't always have a type09:17
dimake.g. a list of IDs09:17
dimakare just strings09:18
oansonSomething like: fields = [Field('field1'), Field('field2', nested=True), ...] ?09:18
dimakyes, kind of reminds sqlalchemy09:18
oansonOr: fields = ['field1', Field('field2', nested=True), ...] ?09:18
dimakwith type= for passing a type09:18
oansonIn sqlalchemy its: field1 = Field(...). field2 = Reference(...), ...09:19
dimakI like the second version a bit less, mixing types ruins it for me :(09:19
oansonI get that.09:19
oansonBut it will be the most common case09:19
oansonAnd this way it will be easiest to read and write09:20
dimakxiaohhui hujie irenab lihi nick-ma_ Have any ideas?09:20
oanson(In the common case)09:20
dimakoanson, I agree about the common case09:20
oansonhshan, if you're here too09:20
irenabdimak: let me get though the discussion09:20
dimakirenab, we're talking about the model definition code in the nb api refactor09:21
*** hshan has quit IRC09:22
oansonI've started an etherpad to throw examples: https://etherpad.openstack.org/p/DF-model-definition-examples09:22
irenabdimak: what is the dilema?09:22
*** hshan has joined #openstack-dragonflow09:23
dimakirenab, In the current version of the spec we define 2 attributes, fiels and nested fields09:23
irenabdimak: nested filds, i.e. pointer to other table?09:24
oansonYes09:24
dimakNot really09:24
dimaklike subnets, which reside inside lswitch09:24
dimakbut have their own model class09:24
irenabdimak: model class == table,  right?09:25
*** hshan has quit IRC09:25
oansonNot necessarily09:25
oansonsubnets and router ports don't have their own tables09:26
oansonBut they will be nested fields, since they have their own models09:26
dimakthey are serialized into their parent tables09:26
irenabok09:26
irenabso nested, means just another model09:26
oansonWe may want to control that too in the future09:27
oansone.g. if we think putting subnets in a different table will boot performance09:27
oansonxiaohhui, you can change colour in the menu in the top right corner09:27
irenaboanson: from the API perspective, user will be able to manage models?09:28
oansonYes09:28
dimakI also don't like nested as the name for a collection09:28
oansoni.e. client will be able to add a subnet by an 'add subner' command, not a 'modify network' command09:28
irenabdimak: +109:28
dimakNested can mean singular just as well09:29
oansondimak, then it's your responsibility to come up with a better name :)09:29
dimakAll the fields are nested anyway09:29
xiaohhuioanson, thanks and done09:29
dimakI think plural is a better name for starters09:29
oansondimak, not sure I understand09:30
dimakoanson, ?09:30
oansonSorry, got it. Yes, plural is better09:30
oansonBut you didn't add a regular field to your example09:31
oansonThat was one of the pain points09:31
dimakDone09:33
oansondimak, I still think detecting when a field object is a string and wrapping it automatically will be better09:33
oansonIt will be easier for developers09:33
dimakIts not a problem at all09:33
*** hshan4 has joined #openstack-dragonflow09:34
oansonI know theoretically it's not a problem09:34
dimakBut I like reading the uniform type list better09:34
dimakvisually09:34
dimakDunno09:34
oansonxiaohhui, irenab, your thoughts on this?09:34
xiaohhuidimak, do you mean the _F class will do the job for both normal field and nested field?09:35
xiaohhuiBy using nested param to distinguish them?09:35
dimakYes09:37
irenabwhat are the basic types?09:37
irenabmaybe if the type is not basic, it should be assumed to be other model09:37
dimakAnything json module produces09:37
dimakirenab, ^^09:38
oansonThe serialisation is to strings, lists, and dicts09:38
oansonAnything more complex will be... comple :)09:38
oansoncomplex*09:38
dimakand integers/floats/booleans09:38
dimakits a shame json doesnt do timestamps like jaml does09:39
dimakyaml*09:39
oansonThen let me rephrase: The serialisation is to python native types (ints, strings, floats), lists, and dicts.09:39
irenabok, so seems no way to avoid this special nested/plurals flag09:40
oansonEither that, or assume that all nested are plural09:41
dimakI don't like the term nested09:41
irenabnested=‘ponter to other model’09:42
oansondimak, you still didn't give me an alternative09:42
irenabdimak, oanson should we go with ‘backref’ ?09:43
oansontechnically it's a forward ref. What about just 'Reference' ?09:43
dimakI think type is a better term than reference09:44
dimakit doesn't have to be a model09:44
lihidimak +109:44
dimake.g. for timestamps we can pass datetime.datetime09:44
irenabdimak:  we talked about type to be Ref09:44
dimakRef?09:44
irenablike subnets in lwsitch09:45
dimakyes09:45
irenabsubnets type is Reference09:45
irenabRef  is shortcut09:45
dimakBut lswitch doesn't have references to subnets, it contains them09:46
dimaklport references an lswitch09:46
oansondimak, that's implementation09:46
xiaohhuiwhat about SimpleField vs ComplexField09:46
oansonAPI-wise, lswitch references subnets09:46
irenabfeeling like we are trying to invent what is already there …09:47
oansonYes09:47
irenabat least terminology wise09:47
dimakmaybe we should do this on the spec review or in the weekly meeting so more people can participate09:48
irenabdimak: good idea, but I   better have alternatives as started in the ethepad09:49
oansonI think we all agree to have one class field 'fields'09:49
dimakI think we should isolate several issues09:50
oansonNow we just need to decide how to add the additional parameters and names: do we support native strings? Different classes or different parameters?09:50
dimak1st is whether the field is singular or plural09:50
oansondimak, regular fields or references?09:50
oansonAnd if you add C++-like templates, I *will* cry!09:51
xiaohhuiboth fields can be plural, lport's ips can be plural09:51
dimak2nd is how to wrap the serialized data in the field (or its elements in case it is plural), e.g. type, which can be a simple python type (timestamp) or an model class09:51
dimak3rd is dealing with references09:51
irenabdimak: can you please add the points to the etherpad? they can be addressed there one by one09:52
dimakWhich will be tricky because we implement different references differently09:52
oanson1st can be solved by 2nd - the field name is as its value is expected. It's type is list if plural09:52
dimakoanson, What about the type of the elements?09:52
irenaboanson: this makes sense09:52
dimakUsually I'd want a references there (since there are objects/ids)09:53
oansondimak, for non-trivial types (e.g. models), then a plural=True parameter?09:53
oansondimak, but we don't want to automatically read it out of the db unless we have to09:53
irenabnot all plurals will be references, like list of ip addressed09:53
oansonSo either a lazy read implementation09:53
oansonor different reference types09:54
oansonirenab, yes, that's why I stressed for non-trivial types.09:54
irenaboanson: meaning we define somewhere trivial type?09:54
oansonirenab, theoretically, yes09:55
oansontrivial type - native python types - strings, ints, floats, etc.09:55
irenabIPAddress == String?09:55
dimakWhile I don't think we NEED to specify those, it can come handy if we want to enforce the model format (which is something we should decide whether we want or not)09:56
dimakirenab, there is a type for IPAddress in netaddr package09:56
oansonirenab, yes, If it's netaddr.IPAddress, it is not trivial09:56
oansonIn other words, if it is represented as a string, it's trivial. If as a netaddr.IPAddress, then it's not09:57
oansonSince IPAddress can be constructed from its string representation, the same representation fits both scenario09:57
oansonscenarios* (Got the plural wrong (: )09:57
oansonAll right, Let's tackle issue 1: The plurality of the field, is it an element, a list, or a dictionary09:59
irenabanyway, its just more to add to te possible attributes that can be list but not referenceother model, we can figure out details later09:59
oansonirenab, yes, that sounds right09:59
oansonOn the one hand, it would be easier to write if the plurality is auto detected. It is easy to differentiate an object from a list10:00
oanson(although not a dictionary)10:00
oansonOn the other, it will be a headache to maintain later10:00
dimakI think it should be explicit10:02
dimakdo we need dictionaries at the moment?10:02
oansonNot that I know10:03
dimakMaybe we shouldn't solve it at this point10:03
oansonIf we make it explicit, that would not be a problem10:03
oansonSo I added this option: Option 1: Defined explicitly in the Field class, e.g. Field('fieldname', plural='list'). If plural is None or not given, then singular10:05
dimakThis works with plural='mapping' as well?10:05
dimakmaybe plural is not a good name then?10:05
irenabwaht is ‘mapping’ ?10:06
dimaka dictionary10:06
irenabwhy not call it ‘dict’?10:06
oansondimak, 1. I think it would be plural='dict', to make things more readable10:06
oansonirenab, you beat me to it :)10:06
oansondimak, 2. I challenge you again to find a better name :)10:06
irenaboanson: great minds think alike :-)10:07
oansonThat's one  interpretation :)10:07
irenabdimak: oanson :xiaohhui : lets keep drafting on the etherpad10:11
dimakirenab, oanson xiaohhui , drafted some solution in etherpad that combines 1 and 210:16
oansondimak, your suggestion for 1+2 means we need to detect the type of the value10:16
dimakWhy?10:17
oansonBecause you nee to find if it's a list, or a dict, or a name10:18
oansonOr a class.10:18
oansonBefore you can start fiddling with it10:18
dimakJust once in the class construction magic code10:19
oansonI think explicit specification is best10:20
dimakThe thing is this is technically the type10:20
oansonThat's like saying it's a string by passing '' as the type10:22
dimaknope10:22
oansonThis is the C++ templating magic I wanted to avoid10:22
dimakwell yes actually10:23
dimaklist<Model> :D10:23
irenabdimak: do not make oanson cry, please10:23
oansonDid I mention I'll cry? I'll bawl like a toddler!10:23
*** rajivk has quit IRC10:23
irenaboanson: short unrelated question on devstack settings10:23
dimakWe can do with by implementing __lt__ and __gt__10:23
oansonSorry, what?10:24
irenabdo we need Q_ENABLE_DRAGONFLOW_LOCAL_CONTROLLER=True                                       10:24
irenabDF_RUNNING_IN_GATE=True   in the local.conf?10:24
oansonQ_ENABLE_DRAGONFLOW_LOCAL_CONTROLLER=True is needed. It tells the compute node to run the df-local-controller10:25
irenaball_in_one installation10:25
oansonDF_RUNNING_IN_GATE, IIRC, refers to how it saves the logs10:25
*** rajivk has joined #openstack-dragonflow10:25
irenaboanson: thanks10:25
oansonirenab, DF_RUNNING_IN_GATE sets all quotas to -1 . Useful for testing10:26
oansondimak, I didn't understand your last comment10:26
dimakoanson, was joking, just a way to implement list<str>10:32
oansonSorry. Missed it :)10:33
*** dimak has quit IRC10:38
*** lihi has quit IRC10:38
*** saggi has quit IRC10:38
*** oanson has quit IRC10:38
*** lihi has joined #openstack-dragonflow10:47
*** dimak has joined #openstack-dragonflow10:47
*** oanson has joined #openstack-dragonflow10:48
*** saggi has joined #openstack-dragonflow10:48
*** irenab_ has joined #openstack-dragonflow11:01
*** hshan4 has quit IRC11:08
*** gongysh has quit IRC11:13
*** irenab has quit IRC11:21
*** irenab_ is now known as irenab11:21
*** irenab_ has joined #openstack-dragonflow11:23
*** irenab has quit IRC11:26
*** hshan4 has joined #openstack-dragonflow11:26
*** irenab has joined #openstack-dragonflow11:26
*** openstackgerrit has joined #openstack-dragonflow11:27
openstackgerrithujie proposed openstack/dragonflow: check valid resource version for nb_api  https://review.openstack.org/41312011:27
*** irenab__ has joined #openstack-dragonflow11:27
*** irenab_ has quit IRC11:28
*** hshan5 has joined #openstack-dragonflow11:29
*** hshan4 has quit IRC11:30
dimakoanson, ping, posted a comment on the review11:32
oansonGreat. Thanks11:33
oansonWill look11:33
oansondimak: Responded11:48
openstackgerrithujie proposed openstack/dragonflow: check valid resource version for nb_api  https://review.openstack.org/41312011:51
*** yuval has quit IRC12:16
*** hshan5 has quit IRC12:23
openstackgerritWangJian proposed openstack/dragonflow: Refactor port-status-update NB API  https://review.openstack.org/39691513:02
*** hshan5 has joined #openstack-dragonflow13:07
*** gongysh has joined #openstack-dragonflow13:29
*** gongysh has quit IRC13:34
openstackgerritItamar Ofek proposed openstack/dragonflow: classifier application  https://review.openstack.org/41233713:46
*** hshan5 has quit IRC13:58
*** saggi1 has joined #openstack-dragonflow14:09
*** saggi1 has quit IRC14:09
*** dimak has left #openstack-dragonflow14:31
*** dimak has joined #openstack-dragonflow14:32
*** irenab__ has quit IRC14:48
openstackgerrithujie proposed openstack/dragonflow: change network/subnet lock based on network_id  https://review.openstack.org/41366914:56
openstackgerrithujie proposed openstack/dragonflow: change network/subnet/port lock range  https://review.openstack.org/41366915:06
openstackgerritYuli proposed openstack/dragonflow: Optimize lock for create/delete/update net commans  https://review.openstack.org/41367415:10
*** irenab_ has joined #openstack-dragonflow15:11
yuli_sops,15:13
yuli_si just notices similar patch submitted by hujie15:13
*** yamamot__ has quit IRC15:23
openstackgerritLihi Wishnitzer proposed openstack/dragonflow: Add IPv6 ND Neighbor Advertiser application  https://review.openstack.org/41220815:28
*** yamamoto has joined #openstack-dragonflow15:41
*** openstackgerrit_ has joined #openstack-dragonflow15:48
*** openstackgerrit_ has quit IRC15:49
openstackgerrithujie proposed openstack/dragonflow: change router/qos lock range  https://review.openstack.org/41370116:11
*** zenoway has quit IRC16:17
*** yamamoto has quit IRC16:41
*** openstack has quit IRC17:02
*** openstack has joined #openstack-dragonflow17:07
*** yamamoto has joined #openstack-dragonflow17:12
*** yamamoto has quit IRC17:21
*** dkehn__ has joined #openstack-dragonflow17:33
*** dkehn has quit IRC17:34
*** dkehn_ has joined #openstack-dragonflow17:42
*** dkehn__ has quit IRC17:43
*** dkehn__ has joined #openstack-dragonflow18:08
*** dkehn_ has quit IRC18:09
*** dkehn__ has quit IRC18:36
*** dkehn_ has joined #openstack-dragonflow18:37
*** yamamoto has joined #openstack-dragonflow19:59
*** yamamoto has quit IRC20:04
*** rajivk has quit IRC20:31
*** rajivk has joined #openstack-dragonflow20:43
*** yamamoto has joined #openstack-dragonflow21:04
*** irenab__ has joined #openstack-dragonflow21:11
*** irenab_ has quit IRC21:13
*** yamamoto has quit IRC21:13
*** rajivk has quit IRC21:58
*** rajivk has joined #openstack-dragonflow22:10

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