Monday, 2017-08-28

*** wanghao has joined #openstack-mogan00:01
openstackgerritwanghao proposed openstack/mogan-specs master: No need flavor and network in managing server  https://review.openstack.org/49498000:39
wanghaomorning mogan!00:41
zhenguomorning!00:47
*** wanghao has quit IRC00:50
*** litao__ has joined #openstack-mogan01:06
openstackgerritTao Li proposed openstack/mogan master: Rollback to the original status when server powering action failed  https://review.openstack.org/47686201:31
*** wanghao has joined #openstack-mogan01:44
openstackgerritliusheng proposed openstack/mogan master: Use server group in scheduler  https://review.openstack.org/49615101:56
liushengzhenguo: please seem my reply inline:https://review.openstack.org/#/c/49615102:14
zhenguoliusheng: ok02:14
zhenguoliusheng: see my replies02:43
openstackgerritwanghao proposed openstack/mogan master: Introduce Cinder client into Mogan  https://review.openstack.org/48945502:46
zhenguoliusheng: seems for affinity with non members it's hard to select an affinity_zone with enough nodes02:48
zhenguoliusheng: and for anty_affinity we need to get nodes all from different affinity_zone, also hard02:49
zhenguoliusheng: let me think more about his02:49
liushengzhenguo: thanks :), I have left replies. hah02:51
zhenguoliusheng: do we have an affinity_zone list with server group object?02:51
liushengzhenguo: no02:52
zhenguoliusheng: I remember you mentioned that you will add that02:52
liushengzhenguo: as we disscuss last time, yes, but it is calculated in time with the members of a server group like how Nova does02:53
zhenguoliusheng: ok02:54
liushengzhenguo: the advantage is we don't need to maintain the relationship with the affinity zone and server group02:54
liushengzhenguo: just need to care the members02:54
zhenguoliusheng: seems I need some time to go through your whole logic again, lol02:55
liushengzhenguo: hah, thanks, I also considered some times, maybe the current implementation is not very efficient, any suggestion from you is appreciate :D02:56
zhenguoliusheng: hah02:57
zhenguoliusheng: seems every scheduling, you will fetch all affinity zone and nodes map and construct a dict with all of them, it's really not effecient03:06
liushengzhenguo: yes.., maybe it is better to implement a cache mechanism, but seems it is hard to keep updated03:10
zhenguoliusheng: yes, can we leverage placement?03:10
liushengzhenguo: admis may set the affnity zone for a aggregate from API03:11
zhenguoliusheng: yes03:11
zhenguoliusheng: a node can only in one affinity_zone, so if we refactor to change like what I suggested, what's the main problem?03:13
zhenguoliusheng: seems just for server_group without any member, right?03:15
zhenguoliusheng: seems anti-affinity also have problems03:15
liushengzhenguo: maybe not only, for example, for affinity policy, if we request 3 servers in a request, and maybe we can select 4 available nodes, but the 4 available nodes distributed in 4 affinity zones, we also cannot create servers03:17
zhenguoliusheng: if there's a member in the server group, we can avoid that03:17
liushengzhenguo: oh, yes03:17
zhenguoliusheng: so the main problem for us, is how to make sure the affinity zone have enough nodes03:18
openstackgerritwanghao proposed openstack/mogan master: Manage existing BMs: Part-2  https://review.openstack.org/48154403:19
liushengzhenguo: yes, and also, we need to get the relationship of the affinity zone and nodes, because we need to set the affinity_zone field for the server after scheduling03:19
zhenguoliusheng: for anti_affinity?03:21
zhenguoliusheng: for affinity, there's only one affinity_zone, it's easy to know03:21
liushengzhenguo: both, yes, we need to set the server.affinity_zone field03:22
* zhenguo brb03:23
zhenguoliusheng: seems at least for some cases, we don't need to fetch all az and node map03:34
liushengzhenguo: seems yes, for the affinity zone with members in server group, I can optimize03:38
*** wanghao has quit IRC03:43
openstackgerritMerged openstack/mogan master: Leverage _detach_interface for destroying networks  https://review.openstack.org/49656904:34
openstackgerritMerged openstack/mogan master: Return addresses with server API object  https://review.openstack.org/49582604:34
openstackgerritMerged openstack/mogan master: Add missed abstractmethod decorators for db abstract layer methods  https://review.openstack.org/49815204:37
openstackgerritMerged openstack/mogan master: Clean up server node uuid on task revert  https://review.openstack.org/49620704:37
openstackgerritMerged openstack/mogan master: Add support for scheduler_hints  https://review.openstack.org/46353404:39
*** wanghao has joined #openstack-mogan04:47
*** wanghao has quit IRC05:01
*** wanghao has joined #openstack-mogan05:11
*** wanghao has quit IRC05:26
*** wanghao has joined #openstack-mogan05:38
zhenguoliusheng: seems you can get [(zone1, [node-1, node-2]), (zone2, [node-3, node-4])] from our cache?07:01
liushengzhenguo: the cache only store the mapping between aggregates and nodes, not affinity zone07:05
zhenguoliusheng: affinity_zone is a metadata of aggregate,07:05
zhenguoliusheng: you can know which aggregates have the affinity_zone07:06
liushengzhenguo: yes, but I need to query the aggregate matadata,07:06
zhenguoliusheng: seems now you also query the aggregate metadata before call placement07:06
liushengzhenguo: and if I use the cache, I need a interface from mogan-engine07:07
liushengzhenguo: yes07:07
zhenguoliusheng: you dont' need call mogan-engine07:07
zhenguoliusheng: as mogan-engine is also a proxy to report client07:07
liushengzhenguo: why ?07:08
zhenguoliusheng: you can check mogan-engine code07:08
liushengzhenguo: only mogan-engine can update the cache07:08
zhenguoliusheng: why you need to update the cache07:08
zhenguoliusheng: you just read it07:08
liushengzhenguo: it is empty07:08
liushengzhenguo: if don't call mogan-engine07:08
zhenguoliusheng: oh, seems yes, only engine initialize the cache07:09
liushengzhenguo: yes07:09
zhenguoliusheng: so we can't leverage the cache07:09
liushengzhenguo: seems yes, if there is a big improvement, we can add a interface in mogan-engine for scheduler, but..07:10
zhenguoliusheng: maybe we don't need a separated scheduler service, lol07:11
liushengzhenguo: lol07:11
zhenguoliusheng: forget it, let's try to find other approach07:11
liushengzhenguo: hah, I am not sure, if it will be a perfomance bottleneck, only some placement calls and db queries07:13
zhenguoliusheng: I'm concerned that if we have many affinity_zones like name rack, every scheduling call you will issue the number of racks REST call to placement07:14
liushengzhenguo: seems yes, only this is O(n) complexity07:17
zhenguoliusheng: server group is really hard to handle07:18
zhenguoliusheng: 1. for affinity with members,  we just need one placement call with member_of: agg_list07:22
liushengzhenguo: yes, this can be optimized07:22
zhenguoliusheng: 2. for affinity without members, we need to find a server group with enough nodes07:22
liushengzhenguo: yes07:23
zhenguoliusheng: can we handle this more effiecient07:23
liushengzhenguo: is there any way to get the all the aggregates-nodes mapping in one placement call ?07:25
liushengzhenguo: seems cannot ..07:25
zhenguoliusheng: if we only select one node it's easy to handle07:26
zhenguoliusheng: not scheduling num_servers node07:27
liushengzhenguo: yes07:27
zhenguoliusheng: so, how about add server group check before call scheduler?07:27
zhenguoliusheng: it's also benefit for anti-affinity07:28
zhenguoliusheng: but it will also cause no enough nodes07:29
zhenguoliusheng: if we selected an affinity zone without enough nodes07:29
liushengzhenguo: yes07:29
zhenguoliusheng: do you know how nova handle this?07:29
liushengzhenguo: nova have host and aggregates in its own db, so I guess it is more easy07:30
liushengzhenguo: and for scheduler, Nova is different with us, nova scheduler will chech host one by one, and for nultiple creating, it will also select one by one07:31
zhenguoliusheng: when scheduling with affinity policy, does it select a host with num_server * resources07:31
zhenguoliusheng: if it check host one by one, how does it make sure there's enough resources in affinity policy scenario07:32
liushengzhenguo: seems the AffinityFilter will only check if it is the same host, and other filter will check the resources07:35
zhenguoliusheng: yes,07:35
zhenguoliusheng: can you help to confirm with our nova guys, to see can nova handle such multiple servers creation with affinity policy scenario?07:37
liushengzhenguo: ok, let me ask07:38
liushengzhenguo: just asked, in Nova, if create multiple servers, scheduler will select host for the servers one by one, evey server will pass all the filters, if there is no enough resources for the servers, it will schedule failed07:45
zhenguoliusheng: lol07:46
zhenguoliusheng: so for affinity policy, there's no specical check07:47
liushengzhenguo: yes07:48
liushengzhenguo: in Nova there is more info in db, and there is a in-memory HostState object07:48
zhenguoliusheng: but they also have our problem, right?07:49
zhenguoliusheng: if there's no member in server group, they also face the same problem with us07:50
liushengzhenguo: for affinity policy ?07:51
zhenguoliusheng: for multiple servers07:51
zhenguoliusheng: they go through the filters only once, right?07:52
liushengzhenguo: they will check hosts one by one, and why will check for servers one bye one. but zhenyu just told me that Nova scheduler is also starting to support check the resource multiple servers once07:52
liushengzhenguo: not once07:52
liushengzhenguo: because they also start to use placememt, and they may use the total resource requirement as the query filter passed to placement api to select rps07:53
zhenguoliusheng: oh, yes, there's a for lool of num_servers07:53
zhenguoliusheng: so, in nova, if there's no members in server group, they just choose one which satisfies one server's requirements, right?07:58
liushengzhenguo: yes07:59
zhenguoliusheng: so it will just fail if there's no enough resource?07:59
liushengzhenguo: yes07:59
liushengzhenguo: their targets are hosts, it more simple07:59
zhenguoliusheng: oh08:00
zhenguoliusheng: we can continue to discuss the anti-affinity scenaro08:04
zhenguoliusheng: is there a way to get the affinity zone for rp08:04
zhenguoliusheng:*from08:04
liushengzhenguo: seems need: rp -- > agg --> affinity zone08:05
liushengzhenguo: it is also not very efficient08:05
zhenguoliusheng: you mean need one more placement call to get the rp's aggregates, then get affinity zone from the aggregates08:06
liushengzhenguo: yes, since the affinity zone is only a metadata of aggregates08:07
liushengzhenguo: oh, maybe we can optimize by like Nova08:09
zhenguoliusheng: how?08:09
liushengzhenguo: we don't query all the affinity zones nodes list, we only need to find the enough nodes and stop the cycle08:10
zhenguoliusheng: you mean for affinity policy without members?08:10
liushengzhenguo: for all the situations except for the affnity policy with members situation08:11
zhenguoliusheng: how do you handle the anti-affinity policy08:12
liushengzhenguo: when we find the number of servers nodes which satisfy the conditions, we stop the cycle08:13
zhenguoliusheng: we only need one node for anti_affinity08:14
zhenguoliusheng: in different affinity zones08:14
liushengzhenguo: yes, we only need to find the number of servers of affinity zones which every one have at least 1 available ndoe08:15
zhenguoliusheng: seems for multi servers creation with anti-affinity we can move the logic to engine side, and call select_destination for each server.08:17
liushengzhenguo: seems we cannot, for now our scheduler don't have an in-memory HostState object08:18
zhenguoliusheng: why we need taht08:19
liushengzhenguo: for multiple creation, the 2ed server scheduling need to consider the 1st server resource consumation08:21
zhenguoliusheng: yes, after the first one scheduled, we can add it to the server groups members, and use new server group for the next schedule08:21
liushengthat seems is similar with my optimization suggestion08:23
liushengzhenguo: and don't need to introduce rpc calls08:24
zhenguoliusheng: you will try each affinity zone, right?08:25
liushengzhenguo: yes, also find for the servers one by one08:25
zhenguoliusheng: but it's just try, you may need to try all affinity zones, right?08:26
liushengzhenguo: that is the worest situation. hah08:26
zhenguoliusheng: yes,08:26
zhenguoliusheng: but you may try more times08:26
liushengzhenguo: yes08:27
zhenguoliusheng: you can compare the two solutions, I will be right back :D08:29
liushengzhenguo: ok08:29
litao__wanghao It seems list manageable servers API should also return availability_zone08:32
litao__zhenguo: you mentioned in last discussion08:32
zhenguolitao__: you can just ignore az for now, hah08:40
litao__zhenguo: ok08:40
litao__zhenguo: If it not return the az ,  i will use the default_schedule_az in db record08:41
litao__zhenguo: right?08:41
zhenguolitao__: you can just set it to None08:54
zhenguolitao__: as the default_schedule_az is used for scheuling,08:54
litao__zhenguo: Isnt  the default_scedule_az None?08:55
litao__is it?08:55
zhenguolitao__: yes, it's default to None, but if it's set to others, you should not use it08:55
zhenguolitao__: it should be None for your cas08:56
zhenguo*case08:56
litao__zhenguo: OK08:56
openstackgerritliusheng proposed openstack/mogan master: Use server group in scheduler  https://review.openstack.org/49615108:57
zhenguoliusheng: some nits in the patch09:18
liushengzhenguo: ok, thanks, replies inline, and will update the patch09:26
*** wanghao has quit IRC09:29
*** wanghao has joined #openstack-mogan09:29
*** wanghao has quit IRC09:29
*** wanghao has joined #openstack-mogan09:30
*** wanghao has quit IRC09:30
*** wanghao has joined #openstack-mogan09:31
*** wanghao has quit IRC09:31
*** wanghao has joined #openstack-mogan09:31
*** wanghao has quit IRC09:32
*** wanghao has joined #openstack-mogan09:32
*** wanghao has quit IRC09:33
*** wanghao has joined #openstack-mogan09:33
*** wanghao has quit IRC09:33
*** wanghao has joined #openstack-mogan09:34
*** wanghao has quit IRC09:34
*** wanghao has joined #openstack-mogan09:35
openstackgerritliusheng proposed openstack/mogan master: Use server group in scheduler  https://review.openstack.org/49615109:52
openstackgerritZhenguo Niu proposed openstack/mogan master: Add socat console support  https://review.openstack.org/49383609:53
zhenguoliusheng: maybe we'd better to add affinity_zone list to server group09:53
zhenguoliusheng: as for server delete, we don't care about the performance09:54
liushengzhenguo: if so we need to maintain that property09:54
zhenguoliusheng: which can remove the loop check during scheduling, right?09:56
liushengzhenguo: for anti-affinity maybe not09:56
zhenguoliusheng: yes09:57
liushengzhenguo: the affinity zones list in server group is white list for affinity and black list for anti-affinity09:57
zhenguoliusheng: yes, seems it makes more sense to have that property with server group09:57
zhenguoliusheng: the only concern of not adding it is when delete a server we need to check that, right?09:58
liushengzhenguo: and the affinity group may can also be delete by admins09:59
zhenguoliusheng: if they delete it, how do you handle the serve affinity zone now10:00
liushengzhenguo: maybe the current implementation is not very possible to be the performance bottleneck, hah, Nova also have similar process10:00
zhenguoliusheng: we can be better than nova10:01
liushengzhenguo: just similar process, actually, I think our scheduler should be much faster than Nova scheduler10:02
zhenguoliusheng: yes, but if we need to call placement many times, it will not10:02
liushengzhenguo: maybe not very times, current way I think is more optimized. and placement API is also pure db queries, it shouldn't be very slow10:03
liushengzhenguo: even or baremetal server creating, I think the most time consuming steps is not scheduling, the building in Ironic may take a more long time10:04
liushengzhenguo: that is different with vm10:05
zhenguoliusheng: but scheduler may also time consuming if you try 1000 times, lol10:05
liushengzhenguo: lol.10:06
zhenguoliusheng: seriously, how do you handle the server affinity zone if admins deleted the affinity zone10:06
liushengzhenguo: not sure, may need to stop deleting10:07
liushengzhenguo: need to check how Nova does10:07
zhenguoliusheng: nova's affinity zone is host10:08
liushengzhenguo: oh, yes...10:08
liushengzhenguo: and we can also remove/add node for a affinity zone.. :(10:08
zhenguoliusheng: yes10:08
zhenguoliusheng: maybe need to add some limits10:09
liushengzhenguo: that may make things more complex if we add an affinity zone field for server group :(10:09
zhenguoliusheng: like when a node already deployed, should not allow it be deleted from az10:09
zhenguoliusheng: why10:09
zhenguoliusheng: it seems same with current situation10:10
liushengzhenguo: when scheduling, may there isn't enough node of an affinity zone for creating, but at meanwhile, admins may add nodes to the affinity zone10:10
liushengzhenguo: or remove..10:11
liushengzhenguo: may lead concurrency issues :(10:11
zhenguoliusheng: if they not get in or move out in time, we don't need to consider them10:11
liushengzhenguo: hah10:12
zhenguoliusheng: it's Chinese Valentine's Day, will you still work?10:13
liushengzhenguo: yes, but will go home. hah10:14
zhenguoliusheng: hah10:14
zhenguoliusheng: see you10:14
liushengzhenguo: will you still work ?10:14
liushengzhenguo: ok, bye10:14
zhenguoliusheng: no, lol10:15
zhenguoliusheng: have a good night10:15
* zhenguo away10:15
liushengzhenguo: :)10:15
*** litao__ has quit IRC11:55
*** wanghao_ has joined #openstack-mogan18:11
*** wanghao has quit IRC18:12

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