Monday, 2015-12-28

*** Qiming has joined #senlin00:12
*** Qiming has quit IRC00:34
*** pratikmallya has quit IRC00:37
*** pratikmallya has joined #senlin01:14
*** Qiming has joined #senlin01:27
xuhaiweiQiming, morning01:27
Qimingmorning01:28
xuhaiweiAfter I reinstaled my environment, senlin does not work now, I got a 500 error with very few error messages01:28
xuhaiweihttps://bugs.launchpad.net/senlin/+bug/152920601:28
openstackLaunchpad bug 1529206 in senlin "Senlin server failed for ValueError" [Undecided,Invalid]01:28
xuhaiweidoes anyone meet this or it is my configuration's fault01:29
Qiminghave you checked my comment?01:29
Qimingit was caused by the policy.json file01:29
xuhaiweisaw it now01:30
Qimingin strict json, the last item in a dict is not supposed to carry an additional ','01:30
Qimingthis is an easy bug, you could have figured it out01:30
xuhaiwei:(01:30
xuhaiweiit's difficult to find which file is wrong01:31
Qimingfrom API log01:32
xuhaiweiactually after I update the source, the error still remains01:33
Qimingyou are supposed to update your /etc/senlin/policy.json file01:33
Qimingnot just update the source01:34
xuhaiweigot it01:34
Qimingpolicy.json is almost useless today, but it is still dynamically loaded and parsed01:34
Qimingyou don't have to restart the senlin-api process01:34
Qimingwe are still keeping it there as most projects do01:34
xuhaiweiusually I dont make debug True in senlin.conf, so there was no log in api log01:36
*** elynn has joined #senlin02:01
*** zhenguo has joined #senlin02:25
Qimingelynn, there?02:27
elynnHi Qiming02:27
Qimingabout patch #26113802:27
elynnyes02:28
elynnSaw your comment02:28
Qimingwe may need to think about a long term, generic solution02:28
QimingI can understand the need to check the progress of an operation (action)02:28
elynnWhat do you think about a generic solution?02:29
Qimingthe problem is about asynchronous execution02:29
elynnah, you mean heat resource?02:29
Qimingcheck this: http://git.openstack.org/cgit/openstack/api-wg/tree/guidelines/http.rst#n9602:30
QimingAPI WG is proposing something about sync/async resource creation02:31
Qimingwhen doing async operations, the recommended behavior is to return 202 as status code02:31
Qimingand in the response header, the service in question returns a Location header02:31
Qimingline 110 says that location is the URI you will use to check the progress of an asynchronous operation02:32
Qimingin Senlin, we do most create/update/delete as asynchronous operations02:32
Qimingwe return 202 as status code02:33
elynnyes02:33
Qimingwe also return Location header02:33
elynnso we do not need to set the cluster status after action starts?02:33
Qimingso ... the generic solution is about how to make the requester aware of the Location02:33
Qimingno, we don't need to update the status, we even don't know when that will happen02:33
Qimingan action is stored into DB02:34
Qimingthen queued for execution02:34
Qimingfor example, a cluster is being resized02:34
Qimingyou are adding 100 new nodes to a cluster02:34
elynnQiming, yes, I talk to yanyanhu last week, and we decide to check action status in heat resource, but we still doesn't figure out how to let requester aware of the location.02:34
Qimingat the same time, you are receiving a request to update the cluster to new profile02:35
Qimingthis new UPDATE request should wait02:35
Qimingit should wait until the RESIZE has completed (or failed)02:35
Qimingit is very very dangerous to set the cluster status to be 'UPDATING'02:36
Qimingyou cannot do that before locking the cluster02:36
Qimingso ... the correct solution would be make keystoneauth1 and openstacksdk aware of the Location02:36
Qimingand return the location to the caller02:37
Qimingthe caller then decide whether to check the location repeatedly or not to get notified about the progress02:37
Qimingkeystoneauth1 today has some logic for handling redirect: http://git.openstack.org/cgit/openstack/keystoneauth/tree/keystoneauth1/session.py#n49202:39
elynnyou mean when this patch will set status before locking cluster?02:39
Qimingand it has some logics to check the 'location' field here: http://git.openstack.org/cgit/openstack/keystoneauth/tree/keystoneauth1/session.py#n49202:40
Qimingthat is something we need to help improve02:40
Qimingpatch #261138 is doing the status change at the right spots, when the do_xxxx() methods are invoked, you already have the cluster locked02:42
QimingMy comment about that patch is simply about the 'UPDATING' status, it should be 'RESIZING'02:42
elynnI'm still not sure how to use keystonauth in senlin, I will go through the codes later.02:42
Qimingelynn, we are not using it directly, we are already indirectly using it through openstacksdk02:43
Qimingwe need to figure out a clean way to support asynchronous actions02:43
elynnQiming, yes, we might need to change some codes in openstacksdk to get location back.02:44
elynnQiming, yes02:44
Qimingright02:44
Qimingthat will benefit all OpenStack projects02:44
elynnI need to go through keystoneauth codes first...02:44
Qimingif they care using sdk02:44
Qimingyep, that would be great02:45
elynnMaybe add a location property to all resource?02:45
Qimingthat should be hidden02:46
elynnIf it's hidden, how do we get it?02:46
Qimingmaybe here? http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/openstack/proxy.py#n25202:47
elynnI'm not clear the routine for a request, will dig into it.02:50
Qimingokay02:50
Qiminga request was processed directly by SDK before02:50
Qimingnow it is completely moved over to keystoneauth1 --- which I don't like02:51
elynnsdk seems to use keystoneuath02:51
Qimingit does not harm to dig more02:51
elynnQiming, yes, that's the hard part, let's find out if there's a function in keystonauth can get location back.02:52
Qimingyep02:53
elynnQiming, do you think location is enough?02:54
elynnhttps://github.com/openstack/senlin/blob/master/senlin/api/openstack/v1/clusters.py#L22902:54
elynnthe location for cluster_update is a link to cluster02:54
elynnI would expect it to an aciton.02:54
Qimingwell, that is another question02:55
Qimingwe may need to return the action in location02:56
Qimingfor consistency02:56
elynnQiming, yes, just raise it to let you aware of it :)02:56
Qimingthere are still some grey areas in the guidelines02:56
QimingI thought about that before02:57
Qimingwe are returning a body when serving an UPDATE request (a PATCH command)02:57
Qimingeven though we are returning 20202:58
elynnFrom guideline, it doesn't mention returning body in Asynchronous operation.03:00
Qimingyep03:01
Qimingthat is a grey area03:01
Qimingwe are returning the cluster dict in the body for cluster_update03:01
Qimingso maybe we can return the action itself in the Location header03:01
Qimingwe have some freedoms here, :)03:02
elynnThat would be great :)03:03
Qimingbut we should always bear in mind, we are in the grey zone, :)03:03
*** pratikmallya has quit IRC03:05
*** yuanying has quit IRC03:30
*** gongysh has quit IRC03:41
*** gongysh has joined #senlin03:44
*** gongysh has quit IRC03:56
*** gongysh has joined #senlin03:57
*** yuanying has joined #senlin04:07
openstackgerritMerged openstack/python-senlinclient: Remove MANIFEST.in  https://review.openstack.org/25930104:15
openstackgerritMerged openstack/senlin: User documentation for receivers  https://review.openstack.org/26179104:15
*** gongysh has quit IRC04:15
*** gongysh has joined #senlin04:30
*** elynn has quit IRC04:34
*** gongysh has quit IRC04:49
*** elynn has joined #senlin04:52
*** gongysh has joined #senlin04:53
*** gongysh has quit IRC05:25
*** gongysh has joined #senlin05:27
xuhaiweiQiming, I found availability_zone_list api is not supported in openstacksdk, should I submit a patch for it?06:09
Qimingxuhaiwei, there was a patch06:10
Qimingyou can take it over though, I don't think that guy is still working on it06:10
xuhaiweiok, I will search for it06:10
Qimingfound it?06:21
Qimingxuhaiwei, this one: https://review.openstack.org/#/c/221646/06:24
*** Qiming has quit IRC06:28
xuhaiweiyes, I have found it06:49
xuhaiweiabout your comment of it, should we add 'create, retrieve and delete'?06:50
*** yuanying has quit IRC08:20
openstackgerritEthan Lynn proposed openstack/senlin: Add new cluster status RESIZING  https://review.openstack.org/26193408:45
*** xujun has quit IRC09:20
*** xuhaiwei has quit IRC10:06
*** gongysh has quit IRC10:38
*** gongysh has joined #senlin10:52
*** Qiming has joined #senlin10:53
elynnHi Qiming12:06
elynnI upload several patches to openstacksdk, and add 'location' attribute to cluster, need your feedback :) https://review.openstack.org/#/c/261971/12:07
*** elynn_ has joined #senlin12:12
*** elynn has quit IRC12:15
*** elynn_ has quit IRC12:17
*** openstackgerrit has quit IRC12:53
*** openstackgerrit has joined #senlin13:05
openstackgerritzhurong proposed openstack/senlin-dashboard: Use the defined INDEX_URL in clusters forms and views  https://review.openstack.org/26199513:48
*** Qiming has quit IRC15:11
*** bdrich_ has joined #senlin15:26
*** bdrich_ has quit IRC15:27
*** bdrich has joined #senlin15:27
*** pratikmallya has joined #senlin18:51
*** pratikmallya has quit IRC20:52
*** pratikmallya has joined #senlin22:35
*** bdrich has quit IRC23:22
*** Qiming has joined #senlin23:39
*** bdrich has joined #senlin23:40
*** bdrich has quit IRC23:45
*** bdrich has joined #senlin23:49

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