*** jdandrea has joined #senlin | 00:05 | |
*** shu has joined #senlin | 00:08 | |
*** xuhaiwei has joined #senlin | 00:08 | |
*** lixinhui has joined #senlin | 00:09 | |
*** lixinhui has quit IRC | 00:13 | |
*** pratikmallya has joined #senlin | 00:14 | |
*** yuanying has joined #senlin | 00:14 | |
*** openstackgerrit has joined #senlin | 00:15 | |
*** pratikmallya has quit IRC | 00:17 | |
*** lixinhui has joined #senlin | 00:36 | |
*** lixinhui has quit IRC | 00:41 | |
*** jdandrea has quit IRC | 00:53 | |
*** Qiming_ has quit IRC | 01:00 | |
*** lixinhui has joined #senlin | 01:03 | |
*** lixinhui has quit IRC | 01:08 | |
*** zhenguo has joined #senlin | 01:10 | |
*** elynn has joined #senlin | 01:13 | |
*** mathspanda has joined #senlin | 01:15 | |
*** lawrancejing has joined #senlin | 01:18 | |
elynn | morning | 01:22 |
---|---|---|
xuhaiwei | morning | 01:26 |
*** lixinhui has joined #senlin | 01:31 | |
*** Liu has joined #senlin | 01:34 | |
lawrancejing | morning | 01:58 |
*** Qiming_ has joined #senlin | 02:03 | |
Qiming_ | morning | 02:04 |
Liu | morning~~ | 02:08 |
Liu | thanks for your help about my patch. | 02:09 |
*** Yanyanhu has joined #senlin | 02:24 | |
*** Yanyan has joined #senlin | 02:24 | |
*** Yanyanhu has quit IRC | 02:28 | |
*** hightall has joined #senlin | 02:28 | |
hightall | hi, xin hui | 02:29 |
*** Qiming_ is now known as Qiming | 02:29 | |
lixinhui | Hi Hightall | 02:31 |
Yanyan | hi, hightall, welcome ;) | 02:32 |
Yanyan | hi, Qiming, xuhaiwei, are you free for a quick talk? | 02:32 |
Qiming | yes | 02:32 |
xuhaiwei | sure | 02:32 |
Yanyan | I just read haiwei's patch about grace_period https://review.openstack.org/#/c/234736/ | 02:33 |
hightall | I encountered a problem, Qiming tell me that you know it, it's glance client request, and got AttributeError: id | 02:33 |
hightall | I request a image info, but response some header, but no body info. | 02:33 |
Yanyan | I'm now a litte confused about the meaning of 'grace_period' | 02:33 |
*** Yanyan is now known as yanyanhu | 02:34 | |
xuhaiwei | my understanding is 'rest for a while' | 02:34 |
hightall | Do you know how to fix? | 02:34 |
yanyanhu | I thought it means the smallest period between two node deletion operations? | 02:34 |
Qiming | http://git.openstack.org/cgit/stackforge/senlin/tree/senlin/policies/deletion_policy.py#n97 | 02:34 |
yanyanhu | yes, but rest for a while for what? for a node deletion or any cluster action that includes node(s) deletion operation? | 02:35 |
Qiming | it is a slack time granted to each node before the real deletion happens | 02:35 |
yanyanhu | so it means the duration between two node deletion | 02:35 |
Qiming | no | 02:35 |
Qiming | it is a slack time granted to each node before the real deletion happens | 02:36 |
yanyanhu | hi, hightall, so normaly, the resp should include body? | 02:36 |
Qiming | for any node deletion, we don't want to be that brutal | 02:36 |
hightall | yes | 02:36 |
xuhaiwei | so I just added a sleep before the deletion action happens | 02:36 |
Qiming | there might be some on-going transactions that will either timeout or get completed in a few seconds | 02:36 |
yanyanhu | ok, I see. | 02:37 |
Qiming | it has nothing to do with the "interval" between two node deletion actions | 02:37 |
yanyanhu | so user themself should be aware how many seconds should be spent on waiting before a node(s) deletion is really started | 02:37 |
Qiming | yes | 02:38 |
yanyanhu | and use this second count to set grace_period | 02:38 |
yanyanhu | ok, understand | 02:38 |
Qiming | by default, we just kill them right away | 02:38 |
yanyanhu | yes | 02:38 |
*** hightall has quit IRC | 02:40 | |
Qiming | yet another property to handle | 02:42 |
Qiming | "reduce_desired_capacity" | 02:42 |
xuhaiwei | got it | 02:43 |
openstackgerrit | Merged stackforge/senlin: Make 'grace_period' and 'destroy_after_deletion' work https://review.openstack.org/234736 | 02:43 |
Qiming | if you search this: http://autoscaling.amazonaws.com/doc/2011-01-01/AutoScaling.wsdl | 02:44 |
Qiming | try find "ShouldDecrementDesiredCapacity" in that file | 02:44 |
Qiming | you will find this: | 02:44 |
lixinhui | hightall, I met that problem before | 02:44 |
Qiming | <xs:element name="DetachInstances"> | 02:45 |
Qiming | <xs:complexType> | 02:45 |
Qiming | <xs:sequence> | 02:45 |
Qiming | <xs:element name="InstanceIds" type="tns:InstanceIds" minOccurs="0"/> | 02:45 |
Qiming | <xs:element name="AutoScalingGroupName" type="tns:ResourceName"/> | 02:45 |
Qiming | <xs:element name="ShouldDecrementDesiredCapacity" type="xs:boolean"/> | 02:45 |
Qiming | </xs:sequence> | 02:45 |
lixinhui | my solution is to reinstall requests == 2.5.2 | 02:45 |
Qiming | </xs:complexType> | 02:45 |
Qiming | </xs:element> | 02:45 |
Qiming | hightall went offline | 02:45 |
Qiming | and also this: | 02:45 |
Qiming | <xs:element name="TerminateInstanceInAutoScalingGroup"> | 02:45 |
Qiming | <xs:complexType> | 02:45 |
Qiming | <xs:sequence> | 02:45 |
Qiming | <xs:element name="InstanceId" type="tns:XmlStringMaxLen16"/> | 02:45 |
Qiming | <xs:element name="ShouldDecrementDesiredCapacity" type="xs:boolean"/> | 02:45 |
Qiming | </xs:sequence> | 02:45 |
Qiming | </xs:complexType> | 02:45 |
Qiming | </xs:element> | 02:45 |
*** hightall has joined #senlin | 02:46 | |
lixinhui | hightall, please try to reinstall you requests as 2.5.2 | 02:47 |
xuhaiwei | Qiming, you are saying to me? | 02:49 |
xuhaiwei | I will check it later | 02:50 |
yanyanhu | xuhaiwei, this is a property we need to make further thought about | 02:50 |
hightall | thx very much, it's fine now, lixinhui | 02:51 |
Qiming | xuhaiwei, yes, those are the use cases for "reduce_desired_capacity" | 02:51 |
xuhaiwei | everyone, I want to ask a python question here | 02:52 |
xuhaiwei | a little strange to me | 02:52 |
xuhaiwei | list=["a", "b", "c"] | 02:52 |
xuhaiwei | for d in list: | 02:52 |
Qiming | don't use 'list' | 02:53 |
Qiming | that is a builtin keyword | 02:53 |
Qiming | go ahead | 02:53 |
xuhaiwei | if len(d)==1: | 02:53 |
xuhaiwei | list.remove(d) | 02:54 |
Qiming | oh, another bad practice here | 02:54 |
xuhaiwei | never deleted all the elements | 02:54 |
Qiming | you are modifying a list in-place | 02:54 |
Qiming | you are actually doing a filtering on an existing list | 02:55 |
xuhaiwei | the list is modified during loop? | 02:55 |
Qiming | the safest way is to make a copy | 02:55 |
Qiming | yes, I think so, I tried similar things before | 02:55 |
Qiming | it is dangerous IMO, may lead to subtle issues later | 02:56 |
yanyanhu | copy.deepcopy | 02:56 |
Qiming | copy.deepcopy won't solve it I'm afraid | 02:56 |
xuhaiwei | but if I use: "for d in list[:]: " it works fine | 02:56 |
Qiming | you are still manipulating a list in-place | 02:56 |
yanyanhu | you mean the 'list' object? | 02:57 |
xuhaiwei | L = ["a", "b"] | 02:58 |
Qiming | yes, deepcopy is making a new copy | 02:58 |
xuhaiwei | for d in L: | 02:58 |
Qiming | you will still need to solve the in-place editing problem | 02:58 |
xuhaiwei | if len(d) == 1: | 02:58 |
xuhaiwei | d.remove(d) | 02:59 |
Qiming | alist = ['a', 'ab', 'abc']; blist = [d for d in alist if len(d) == 1]; print(alist); print(blist) | 02:59 |
yanyanhu | d.remove()? | 02:59 |
Qiming | this works | 02:59 |
Qiming | if you are modifying the list inside a "for" loop, that list becomes very fragile at least | 03:00 |
xuhaiwei | L=["a", "b"]; for d in L[:]: if len(d) == 1: L.remove(d) this also works, so L[:] is making a copy? | 03:00 |
Qiming | it may work, I would say, but very unsafe | 03:01 |
xuhaiwei | ok | 03:01 |
yanyanhu | umm, so correct way is to avoid revising the list object itself inside the loop? | 03:02 |
Qiming | that is my suggestion | 03:02 |
yanyanhu | build a new list for output | 03:02 |
yanyanhu | ok | 03:02 |
Qiming | you can check stackoverflow and see if there are better practices | 03:02 |
Qiming | https://review.openstack.org/#/c/233551/1/senlin/policies/region_placement.py | 03:03 |
Qiming | line 142 | 03:03 |
Qiming | I tried to remove an item from self.regions directly, in the way xuhaiwei proposed above | 03:03 |
Qiming | it never succeeded | 03:03 |
yanyanhu | em, understand | 03:04 |
yanyanhu | guess the limitation of python language | 03:04 |
Qiming | I actually got an error, the data has been changed during iteration | 03:04 |
xuhaiwei | that is not python's bug :) | 03:04 |
Qiming | another way, as LiuWei was trying before | 03:04 |
xuhaiwei | ? | 03:04 |
Qiming | do iteration from the end of the list, set step to -1 | 03:05 |
Qiming | that is probably making the code a lot difficult to consume I think | 03:05 |
Qiming | see this: https://review.openstack.org/#/c/221684/6/senlin/policies/crossaz_policy.py | 03:06 |
Qiming | line 189 | 03:06 |
Qiming | it is not a good practice to delete items from a list using a loop, we never know how the index are maintained by python | 03:07 |
openstackgerrit | OpenStack Proposal Bot proposed stackforge/python-senlinclient: Updated from global requirements https://review.openstack.org/235696 | 03:07 |
openstackgerrit | OpenStack Proposal Bot proposed stackforge/senlin: Updated from global requirements https://review.openstack.org/234681 | 03:07 |
yanyanhu | em, will be careful about similar case | 03:08 |
Qiming | sounds a very basic problem, but when you hit it, you realize ... umm, not such a trivial case, :) | 03:08 |
yanyanhu | yea | 03:09 |
xuhaiwei | if you don't mind, I will show another case | 03:14 |
xuhaiwei | this is really confused me | 03:14 |
xuhaiwei | http://paste.openstack.org/show/476446/ | 03:15 |
xuhaiwei | try to run this, don't know what is the reason | 03:16 |
xuhaiwei | lunch time for me, but still wait for the answer from the python master :) | 03:17 |
yanyanhu | will check it :) | 03:18 |
openstackgerrit | Cindia-blue proposed stackforge/senlin: Zone placement policy https://review.openstack.org/221684 | 03:38 |
*** mathspanda has quit IRC | 03:49 | |
*** gongysh has joined #senlin | 03:56 | |
openstackgerrit | Cindia-blue proposed stackforge/senlin: Zone placement policy https://review.openstack.org/221684 | 04:41 |
openstackgerrit | xu-haiwei proposed stackforge/senlin: Revise cluster_add_nodes action https://review.openstack.org/235728 | 04:58 |
openstackgerrit | xu-haiwei proposed stackforge/senlin: Revise cluster_add_nodes action https://review.openstack.org/235728 | 05:03 |
yanyanhu | hi, xuhaiwei, about http://paste.openstack.org/show/476446/ | 05:17 |
yanyanhu | d is not a gloabl variable? | 05:17 |
xuhaiwei | I dont know the reason in fact | 05:19 |
xuhaiwei | but if you change 'd' to d[0] it works | 05:19 |
xuhaiwei | change 'd' to a list type, will pass | 05:20 |
yanyanhu | oh, my mistake, I didn't read the code carefully | 05:20 |
yanyanhu | let me check it again | 05:21 |
yanyanhu | so there should be another line before the code define d as a list? | 05:22 |
yanyanhu | NameError: name 'd' is not defined | 05:23 |
xuhaiwei | no | 05:23 |
yanyanhu | http://paste.openstack.org/show/476448/ | 05:25 |
yanyanhu | so you expect d is 1? | 05:25 |
xuhaiwei | yes | 05:26 |
yanyanhu | http://paste.openstack.org/show/476449/ | 05:26 |
yanyanhu | this paste | 05:26 |
yanyanhu | result of print is 1 | 05:26 |
yanyanhu | but maybe this is not what you want? | 05:27 |
xuhaiwei | if fact I want the action_data() method to run to times, the first time return 'succeed' and the secound time return 'failed' | 05:27 |
yanyanhu | why twice? | 05:27 |
yanyanhu | in your original code, if we ignore the global variable problem, action_data is only executed once I think | 05:28 |
xuhaiwei | see this http://git.openstack.org/cgit/stackforge/senlin/tree/senlin/tests/unit/engine/actions/test_cluster_action.py#n1093 | 05:29 |
yanyanhu | and action_data's return value is the reference of the inner function get_data() | 05:29 |
xuhaiwei | this is a test case I recently wrote, I want the mock to return different values when called two times | 05:32 |
yanyanhu | yes, if you want to execute a segment of code as side effect, you can define it like this | 05:32 |
xuhaiwei | but if I change 'd' to a variable, it doesnt wokr | 05:33 |
xuhaiwei | work | 05:33 |
xuhaiwei | you can ignore this if you don't have time :) | 05:34 |
yanyanhu | it's ok since I also don't know why :) | 05:35 |
yanyanhu | I want to understand it | 05:35 |
xuhaiwei | you can change 'd' to a variable and run the test case | 05:36 |
yanyanhu | ok | 05:37 |
xuhaiwei | Qiming, about the patch I submit just now, I am sorry to make the same mistake | 05:38 |
Qiming | that's fine | 05:39 |
Qiming | no worry | 05:39 |
xuhaiwei | but if we will check inside the action, I think we don't need to do it in the service layer | 05:39 |
Qiming | sometimes we do additional checks | 05:39 |
Qiming | because they are at different layers | 05:39 |
Qiming | yes, some of them are not necessary | 05:39 |
xuhaiwei | like you have said, if other actions have changed the node's property, that check might be dangerous | 05:40 |
xuhaiwei | not just necessary | 05:41 |
xuhaiwei | not just not necessary | 05:41 |
Qiming | kind of | 05:43 |
xuhaiwei | this is a difficult situation we face, if we just check them in the action, and if the action fails there is no response to the client side immediately, so the check in service layer is helpful | 05:47 |
Qiming | some early checks would be helpful | 05:49 |
Qiming | but we don't know if situation has changed when we are in the action handler, so we checked it again | 05:50 |
xuhaiwei | ok | 05:50 |
xuhaiwei | another problem is should we allow a cluster owned node to be added to the cluster again? | 05:51 |
Qiming | that seems a waste | 05:59 |
Qiming | no action will be taken | 06:00 |
Qiming | need to revisit the code to see if we allow that to happen, whether its index will be reassigned | 06:00 |
Qiming | cannot recall clearly | 06:00 |
xuhaiwei | yes, just don't do anything, there is a situation like user want to add two nodes, one is already cluster member, the other is not, we should not make this action fail I think | 06:01 |
*** Liu has quit IRC | 06:01 | |
Qiming | okay, we can ignore those nodes if desired | 06:06 |
openstackgerrit | Yanyan Hu proposed stackforge/senlin: Make node related DB queries project safe https://review.openstack.org/235182 | 06:10 |
*** lawrancejing has quit IRC | 06:24 | |
*** lawrancejing has joined #senlin | 06:25 | |
openstackgerrit | Yanyan Hu proposed stackforge/senlin: Make node related DB queries project safe https://review.openstack.org/235182 | 06:30 |
openstackgerrit | Yanyan Hu proposed stackforge/senlin: Make all cluster DB queries project_safe https://review.openstack.org/234683 | 06:30 |
*** Liu has joined #senlin | 07:03 | |
*** lawrancejing has quit IRC | 07:20 | |
*** lawrancejing has joined #senlin | 07:21 | |
*** lawrancejing has quit IRC | 07:22 | |
*** Yanyan has joined #senlin | 07:26 | |
*** yanyanhu has quit IRC | 07:26 | |
*** xuhaiwei has quit IRC | 07:29 | |
*** Shijia has joined #senlin | 07:38 | |
*** Shijia has quit IRC | 07:46 | |
openstackgerrit | xu-haiwei proposed stackforge/senlin: Allow cluster member nodes to be added to the cluster https://review.openstack.org/235728 | 07:46 |
*** Shijia has joined #senlin | 07:46 | |
*** xuhaiwei has joined #senlin | 07:49 | |
openstackgerrit | Merged stackforge/senlin: Make all cluster DB queries project_safe https://review.openstack.org/234683 | 07:52 |
*** Shijia has quit IRC | 08:07 | |
*** Shijia has joined #senlin | 08:07 | |
*** Liu has quit IRC | 08:20 | |
*** Bell3456 has joined #senlin | 08:50 | |
*** Bell3456 has left #senlin | 08:52 | |
openstackgerrit | Qiming Teng proposed stackforge/python-senlinclient: Strips off the quotes when showing nested table https://review.openstack.org/234608 | 09:04 |
*** hightall has quit IRC | 09:29 | |
*** Yanyan has quit IRC | 09:36 | |
*** elynn has quit IRC | 09:54 | |
*** zhenguo has quit IRC | 10:02 | |
*** Qiming_ has joined #senlin | 10:05 | |
*** Qiming has quit IRC | 10:08 | |
*** Qiming_ is now known as Qiming | 10:12 | |
*** Qiming has quit IRC | 10:44 | |
*** shu has left #senlin | 11:21 | |
*** lixinhui has quit IRC | 11:44 | |
*** Qiming has joined #senlin | 11:48 | |
*** lawrancejing has joined #senlin | 12:28 | |
*** Qiming_ has joined #senlin | 12:30 | |
*** Qiming has quit IRC | 12:30 | |
openstackgerrit | Merged stackforge/senlin-dashboard: Add node creation unit test https://review.openstack.org/235298 | 12:32 |
openstackgerrit | Merged stackforge/senlin-dashboard: Improve profile update form https://review.openstack.org/235312 | 12:34 |
openstackgerrit | Merged stackforge/senlin-dashboard: Add node details overview page https://review.openstack.org/235359 | 12:34 |
openstackgerrit | Merged stackforge/senlin-dashboard: Add node details overview page https://review.openstack.org/235359 | 12:34 |
openstackgerrit | Merged stackforge/senlin-dashboard: Add cluster creation unit test https://review.openstack.org/235326 | 12:35 |
*** lawrancejing has quit IRC | 12:37 | |
*** Shijia_ has joined #senlin | 12:48 | |
*** Shijia has quit IRC | 12:50 | |
*** Shijia_ has quit IRC | 13:03 | |
*** Shijia has joined #senlin | 13:03 | |
*** Shijia has quit IRC | 13:11 | |
*** pratikmallya has joined #senlin | 14:17 | |
*** pratikma_ has joined #senlin | 14:20 | |
*** pratikmallya has quit IRC | 14:23 | |
*** hightall has joined #senlin | 14:45 | |
*** Shijia has joined #senlin | 15:13 | |
*** Shijia has quit IRC | 15:22 | |
*** pratikma_ has quit IRC | 15:27 | |
*** pratikmallya has joined #senlin | 15:34 | |
*** hightall has quit IRC | 15:57 | |
*** pratikma_ has joined #senlin | 16:18 | |
*** pratikmallya has quit IRC | 16:20 | |
*** Shijia has joined #senlin | 16:21 | |
*** Shijia has quit IRC | 16:27 | |
*** Qiming_ has quit IRC | 16:40 | |
*** pratikmallya has joined #senlin | 16:53 | |
*** pratikma_ has quit IRC | 16:56 | |
*** Shijia has joined #senlin | 17:26 | |
*** Shijia has quit IRC | 17:32 | |
*** pratikma_ has joined #senlin | 18:12 | |
*** pratikmallya has quit IRC | 18:15 | |
*** Shijia has joined #senlin | 18:32 | |
*** Shijia has quit IRC | 18:37 | |
*** Shijia has joined #senlin | 19:37 | |
*** pratikma_ has quit IRC | 19:41 | |
*** pratikmallya has joined #senlin | 19:42 | |
*** Shijia has quit IRC | 19:42 | |
*** pratikmallya has quit IRC | 22:01 | |
*** pratikmallya has joined #senlin | 22:10 | |
*** pratikmallya has quit IRC | 23:55 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!