Monday, 2015-08-31

*** xuhaiwei_ has quit IRC00:06
*** xuhaiwei has joined #senlin00:10
*** zhenguo has joined #senlin01:24
*** mathspanda has joined #senlin01:50
openstackgerritQiming Teng proposed stackforge/senlin: Misc tweaking to action behavior
*** Yanyanhu has joined #senlin02:01
*** elynn has joined #senlin02:10
*** elynn_ has joined #senlin02:14
*** elynn has quit IRC02:14
*** elynn has joined #senlin02:14
*** elynn has quit IRC02:19
*** elynn has joined #senlin02:21
*** elynn_ has quit IRC02:27
*** elynn_ has joined #senlin02:29
Yanyanhuhi, xuhaiwei, are you around?02:31
Yanyanhu I think there could be some problems to use 'translate_exception' decorator for those two methods in sdk driver module02:34
Yanyanhusince invoke_with_catch function expects at leat on parameter but those two functions who are decorated are actually not instance method or classmethod of a Class02:35
Yanyanhuso the code will complain 'invoke_with_catch expect at least one param but 0 given'02:36
xuhaiweiok, I will see it02:37
*** elynn__ has joined #senlin02:37
Yanyanhuok, thanks :)02:37
Yanyanhuthe error msg is just like the result in the functional test case
*** elynn__ has quit IRC02:39
*** elynn has quit IRC02:40
openstackgerritYanyan Hu proposed stackforge/senlin: Revise policy_type functional test
openstackgerritQiming Teng proposed stackforge/senlin: Add 'singleton' property to base policy
*** Tennyson has joined #senlin02:59
openstackgerritQiming Teng proposed stackforge/senlin: Misc tweaking to action behavior
*** lawrance_ has joined #senlin03:50
*** LiuWei has joined #senlin04:02
openstackgerritMerged stackforge/senlin: Misc tweaking to action behavior
openstackgerritYanyan Hu proposed stackforge/senlin: Fix a bug in cluster scale in action
*** huangtianhua has joined #senlin06:25
openstackgerritYanyan Hu proposed stackforge/senlin: Invoke parse_exception directly to handle exception in sdk driver
*** Qiming has joined #senlin06:28
Yanyanhuhi, xuhaiwei, Qiming, just proposed a patch to fix the exception handling in sdk driver
Yanyanhusince the decorator is not suitbale for those two functions in sdk driver module, I just invoke parse_exception directly to make the translation06:29
xuhaiweiYanyanhu, I have thought about it long, just cant get a good solution for this problem06:29
openstackgerritQiming Teng proposed stackforge/senlin: Expose event choice from scaling policy
Yanyanhuhi, xuhaiwei, yes, so I think maybe we can just treat these two function specially and invoke parse_exception directly06:30
Yanyanhuwe just don't use decorator to wrap the translation progress06:31
Qiminglooks like the right solution to me06:32
Qimingthe create_connection operation was only invoked from the constructors of all openstack/* drivers06:33
Qimingthose constructors are not suitable for a translate_exception decorator06:33
xuhaiweiok, agree06:34
Yanyanhuok, so we just treat them as special cases. And maybe in future, we can find a better solution to cover all these cases, we change it then06:34
Yanyanhuhi, Qiming, just saw your comment on the patch for cluster scale in action06:38
YanyanhuI think you're right06:39
Yanyanhuafter the event is supported, we don't need to rely on count is negative to tell whether this is a scale in or out action06:39
Yanyanhuso should we change it back as before? or we use this as an interim solution?06:40
Qimingonce 218744 is merged, we fix the integer problem06:41
Qimingand we can treat it as the basis from now on06:41
openstackgerritMerged stackforge/senlin: Invoke parse_exception directly to handle exception in sdk driver
openstackgerritMerged stackforge/senlin: Expose event choice from scaling policy
Yanyanhuhi, Qiming, xuhaiwei, seems the cluster action workflow is broken for some bugs
Yanyanhulooks like the start_time of action is not filled correctly07:34
xuhaiweicant reproduce the error07:36
Yanyanhuhi, xuhaiwei, you can pull the latest code and try again07:37
Yanyanhujust happened recently07:37
xuhaiweii did it07:38
Yanyanhuoh, if so, maybe my db's problem07:38
xuhaiweimy environment is a little, I even can't do cluster-list07:38
xuhaiweia little strange07:38
openstackgerritYanyan Hu proposed stackforge/senlin: Revise policy_type functional test
Yanyanhuah, I see07:43
Yanyanhuhi, Qiming, since the start_time of action is assigned value in db side07:44
Yanyanhutherefor, the start_time of action loaded in this line is actually None.
Yanyanhuseems we need to reload the action again after step2...07:45
Yanyanhuor we can revise the logic of start_time assignment07:46
Qimingreload the action?07:59
Qimingthat will create yet a new context, right?08:00
Yanyanhujust need to rebuild it08:00
Yanyanhuuse Action.load(context, db_action=res)08:00
Qimingwhy rebuild is needed?08:00
Qimingyes, read that code haed08:00
Qimingwhat will happen?08:00
Qimingif will do a constructor right?08:01
Yanyanhusince the start_time property of action which loaded in step1 is None I think08:01
Qimingthen the __init__ will create a new context?08:01
Yanyanhulet me see08:01
Qimingyou need a whole picture when doing this kind of revision08:02
Yanyanhuhmm, that's true08:02
YanyanhuI think we can't solve the problem unless finish the TODO in the comment08:02
Qimingit can be solved easily08:03
Yanyanhuwhy we need to do this conversion in line
Qimingthe passed in context is a dict08:04
Qimingwell the action.context must be a RequestContext instance08:04
Yanyanhuyes, but I mean if the passed in context is dict, why we need to do context.to_dict()08:05
Yanyanhumaybe we can just directly use it as input param for req_context.RequestContext.from_dict08:05
Yanyanhuoh, you mean the passed in param for req_context.RequestContext.from_dict is a dict?08:06
Yanyanhuhmm, this is a problem08:06
Qimingcannot recall the reason, that line looks stupid08:06
Yanyanhuso maybe we should revise the start_time assignment logic?08:08
Yanyanhufor example put it into action layer08:08
Qimingwhere is it assigned?08:13
Yanyanhunow, it's in action_acquire db api08:13
Qimingso after this line:
Qimingno, line 480, actually08:15
Qimingwe have the action lock at hand08:15
Qimingthe start_time is correctly set in db08:15
Qimingbut not in the object in memory08:16
Qimingwe can just do a line "self.start_time = timestamp" at line 480, right?08:16
Yanyanhuthis is the simplist solution08:16
Yanyanhuso we fix it using this way?08:18
Yanyanhugot it08:22
Qimingdon't see other better way to solve it08:22
Yanyanhuok, will propose a patch. The engine can't work now for this issue...08:22
*** Qiming_ has joined #senlin08:32
*** Qiming has quit IRC08:32
*** Qiming_ is now known as Qiming08:32
openstackgerritQiming Teng proposed stackforge/senlin: Tweak connection parameter building for profiles
openstackgerritQiming Teng proposed stackforge/senlin: Add 'singleton' property to base policy
*** elynn has joined #senlin08:46
*** elynn has quit IRC08:49
Yanyanhuhi, Qiming, seems there are still problems about the context used in ActionProc08:49
Yanyanhumade a test and found the context that used to store action into DB is the same as the one in line 464
Qimingwhy is that a problem?08:52
Qimingwhat do you mean by "context that used to store action into DB" ?08:52
Yanyanhuhmm, this is correct I think08:52
Qimingin which phase?08:52
Yanyanhuin service module I think08:52
Qiminglock acquire?08:52
Yanyanhuwhen I tried to override some attrs initialized in DB after line 480, e.g. start_time, I found the action can be started correctly08:53
Yanyanhubut it will never be marked completed08:53
Yanyanhuso I guess still some problems here08:54
Yanyanhukeep looking at it08:54
openstackgerritQiming Teng proposed stackforge/senlin: Add timeout validation for server creation
*** Tennyson has quit IRC09:12
*** mathspanda has quit IRC09:13
openstackgerritQiming Teng proposed stackforge/senlin: Remove half-baked profile types
Qimingjust heads up09:54
QimingI'm fast approving this patch:
Qimingthe problem is that the current connection params building is wrong09:55
Qimingfor example, stacks are created in different project09:55
Qimingstill looking into the mess09:55
openstackgerritMerged stackforge/senlin: Tweak connection parameter building for profiles
Yanyanhuso does this part can work correctly now?09:58
Yanyanhuhi, Qiming, if you are still working on it, I will keep my local branch for the test10:00
Yanyanhustill didn't find the clue for the action status can not be set correctly issue...10:00
Qimingwhat do you mean "this part" ?10:01
Yanyanhuit's very weird. The log in engine shows the cluster_action's status is waiting. But when I query it using action-show, the status is ready10:01
YanyanhuI mean the profile10:01
Yanyanhuto create nova server and heat stack10:01
Qimingdon't understand what you mean10:02
Qimingso you are doing some cluster_action10:03
Qimingwhat action is that?10:03
YanyanhuI mean have you finished the tweaking completely or there are still some works coming for the sdk connection issue10:03
Yanyanhucreate or delete currently10:03
Qimingconnection param problem?10:04
Qimingstill debugging10:04
Yanyanhuok, understand10:04
Qimingit was wrong10:04
Qimingand it is still wrong10:04
Qimingdo you know what I mean?10:04
Qiming$ OS_USERNAME=senlin OS_PROJECT_NAME=service heat stack-list10:04
Qiming| id                                   | stack_name     | stack_status       | creation_time       |10:04
Qiming| 1f4256b0-6a12-4aff-b3a3-0c182fdcd289 | node1-g4j6wGDR | DELETE_IN_PROGRESS | 2015-08-31T09:40:54 |10:04
Qiming| aa4450b6-2087-46a4-98b8-27983feb86f3 | node2-r9C5keaX | CREATE_FAILED      | 2015-08-31T09:49:08 |10:04
Qiming| 58baad69-70df-40f8-9da6-ce037e8e3a48 | node1-ukmFGrAm | CREATE_COMPLETE    | 2015-08-31T10:00:20 |10:04
Yanyanhuhmm, noticed this issue last week. But didn't ensure where it happened10:06
YanyanhuI found use the requester's credential, I can't see the nova server or heat stack that senlin created10:07
*** lawrance_ has quit IRC10:08
*** elynn_ has quit IRC10:08
Qimingfinally ...10:19
Qimingthe stack is created in the intended project now10:19
Yanyanhuso this is because we gave incorrect project when create trust?10:20
Yanyanhuumm, seems not10:21
Qimingit is the trust parameter send to SDK10:21
QimingSDK can only recognize "trust_id"10:21
Qimingfor whatever reason, we are providing "trusts"10:22
Qimingand that "trusts" is a list ...10:22
Qimingso basically, the trust mechanism all failed to achieve its goal10:22
Yanyanhuso we actually didn't provide the trust correctly...?10:22
Yanyanhuso that means we only provided senlin's credential to sdk...10:23
Qimingand we preserved project_name, project_domain_name, username, passwrod, all credential for the senlin service user10:23
Qimingthat is the reason stacks are created into the service domain, because that is 'senlin's default project10:24
openstackgerritQiming Teng proposed stackforge/senlin: Fix trust-based connection building
Qimingthe fix is pretty simple, ^10:25
Qiminghowever, it is based on a previous patch10:25
Qimingnow that this kind of annoying bugs solved, I'm moving on to revise profile YAML10:26
Yanyanhuoh, Qiming, I remeber sometimes, sdk complained scope conflict if we provide both project_id and trusts10:27
openstackgerritQiming Teng proposed stackforge/senlin: Add timeout validation for server creation
Qimingthat is why we are not removing project_name from the params10:30
Qimingpreviously, it was there mainly because trusts didn't work10:30
Yanyanhuhi, sorry just back10:41
Yanyanhuok, understand10:42
Qimingplease help review this:
Qimingthen I can start the huge revision10:44
Yanyanhuhi, Qiming, about the timeout patch, do we need the same change for heat stack?11:07
QimingI think so11:08
Qimingpls submit a patch there11:08
Qiming252 test failures, still 191 under way11:08
Qiminghope this is a once for all change11:09
Yanyanhuok, that will be the best11:10
openstackgerritMerged stackforge/senlin: Fix trust-based connection building
openstackgerritMerged stackforge/senlin: Add timeout validation for server creation
Qiming181 now11:14
*** lawrancejing has joined #senlin11:42
Qimingstill 14611:43
Qimingprofiles are not like policies11:44
Qimingthey are used in almost all unit tests ...11:44
*** openstackgerrit has quit IRC11:46
Qiming123 ...11:47
*** openstackgerrit has joined #senlin11:47
Yanyanhuseems can be finished in another hour...11:47
*** Yanyanhu has quit IRC11:55
*** Qiming has quit IRC12:09
*** huangtianhua has quit IRC12:30
*** elynn_ has joined #senlin13:07
*** Qiming has joined #senlin13:12
*** jdandrea has joined #senlin13:24
*** Qiming has quit IRC13:25
*** lkarm has joined #senlin14:10
*** lawrancejing has quit IRC14:21
*** huangtianhua has joined #senlin14:31
openstackgerritQiming Teng proposed stackforge/senlin: Make profile schema versioned
*** Qiming has joined #senlin14:48
*** jruano has joined #senlin15:02
*** Qiming has quit IRC15:25
*** lkarm has quit IRC21:24
*** lkarm has joined #senlin21:24
*** lkarm has quit IRC21:29
*** lkarm has joined #senlin21:53
*** lkarm has quit IRC21:57
*** jruano has quit IRC22:14
*** jruano has joined #senlin22:58
*** jruano has quit IRC23:29
*** Qiming has joined #senlin23:45

Generated by 2.14.0 by Marius Gedminas - find it at!