*** Qiming has joined #senlin | 00:12 | |
*** Qiming has quit IRC | 00:34 | |
*** pratikmallya has quit IRC | 00:37 | |
*** pratikmallya has joined #senlin | 01:14 | |
*** Qiming has joined #senlin | 01:27 | |
xuhaiwei | Qiming, morning | 01:27 |
---|---|---|
Qiming | morning | 01:28 |
xuhaiwei | After I reinstaled my environment, senlin does not work now, I got a 500 error with very few error messages | 01:28 |
xuhaiwei | https://bugs.launchpad.net/senlin/+bug/1529206 | 01:28 |
openstack | Launchpad bug 1529206 in senlin "Senlin server failed for ValueError" [Undecided,Invalid] | 01:28 |
xuhaiwei | does anyone meet this or it is my configuration's fault | 01:29 |
Qiming | have you checked my comment? | 01:29 |
Qiming | it was caused by the policy.json file | 01:29 |
xuhaiwei | saw it now | 01:30 |
Qiming | in strict json, the last item in a dict is not supposed to carry an additional ',' | 01:30 |
Qiming | this is an easy bug, you could have figured it out | 01:30 |
xuhaiwei | :( | 01:30 |
xuhaiwei | it's difficult to find which file is wrong | 01:31 |
Qiming | from API log | 01:32 |
xuhaiwei | actually after I update the source, the error still remains | 01:33 |
Qiming | you are supposed to update your /etc/senlin/policy.json file | 01:33 |
Qiming | not just update the source | 01:34 |
xuhaiwei | got it | 01:34 |
Qiming | policy.json is almost useless today, but it is still dynamically loaded and parsed | 01:34 |
Qiming | you don't have to restart the senlin-api process | 01:34 |
Qiming | we are still keeping it there as most projects do | 01:34 |
xuhaiwei | usually I dont make debug True in senlin.conf, so there was no log in api log | 01:36 |
*** elynn has joined #senlin | 02:01 | |
*** zhenguo has joined #senlin | 02:25 | |
Qiming | elynn, there? | 02:27 |
elynn | Hi Qiming | 02:27 |
Qiming | about patch #261138 | 02:27 |
elynn | yes | 02:28 |
elynn | Saw your comment | 02:28 |
Qiming | we may need to think about a long term, generic solution | 02:28 |
Qiming | I can understand the need to check the progress of an operation (action) | 02:28 |
elynn | What do you think about a generic solution? | 02:29 |
Qiming | the problem is about asynchronous execution | 02:29 |
elynn | ah, you mean heat resource? | 02:29 |
Qiming | check this: http://git.openstack.org/cgit/openstack/api-wg/tree/guidelines/http.rst#n96 | 02:30 |
Qiming | API WG is proposing something about sync/async resource creation | 02:31 |
Qiming | when doing async operations, the recommended behavior is to return 202 as status code | 02:31 |
Qiming | and in the response header, the service in question returns a Location header | 02:31 |
Qiming | line 110 says that location is the URI you will use to check the progress of an asynchronous operation | 02:32 |
Qiming | in Senlin, we do most create/update/delete as asynchronous operations | 02:32 |
Qiming | we return 202 as status code | 02:33 |
elynn | yes | 02:33 |
Qiming | we also return Location header | 02:33 |
elynn | so we do not need to set the cluster status after action starts? | 02:33 |
Qiming | so ... the generic solution is about how to make the requester aware of the Location | 02:33 |
Qiming | no, we don't need to update the status, we even don't know when that will happen | 02:33 |
Qiming | an action is stored into DB | 02:34 |
Qiming | then queued for execution | 02:34 |
Qiming | for example, a cluster is being resized | 02:34 |
Qiming | you are adding 100 new nodes to a cluster | 02:34 |
elynn | Qiming, 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 |
Qiming | at the same time, you are receiving a request to update the cluster to new profile | 02:35 |
Qiming | this new UPDATE request should wait | 02:35 |
Qiming | it should wait until the RESIZE has completed (or failed) | 02:35 |
Qiming | it is very very dangerous to set the cluster status to be 'UPDATING' | 02:36 |
Qiming | you cannot do that before locking the cluster | 02:36 |
Qiming | so ... the correct solution would be make keystoneauth1 and openstacksdk aware of the Location | 02:36 |
Qiming | and return the location to the caller | 02:37 |
Qiming | the caller then decide whether to check the location repeatedly or not to get notified about the progress | 02:37 |
Qiming | keystoneauth1 today has some logic for handling redirect: http://git.openstack.org/cgit/openstack/keystoneauth/tree/keystoneauth1/session.py#n492 | 02:39 |
elynn | you mean when this patch will set status before locking cluster? | 02:39 |
Qiming | and it has some logics to check the 'location' field here: http://git.openstack.org/cgit/openstack/keystoneauth/tree/keystoneauth1/session.py#n492 | 02:40 |
Qiming | that is something we need to help improve | 02:40 |
Qiming | patch #261138 is doing the status change at the right spots, when the do_xxxx() methods are invoked, you already have the cluster locked | 02:42 |
Qiming | My comment about that patch is simply about the 'UPDATING' status, it should be 'RESIZING' | 02:42 |
elynn | I'm still not sure how to use keystonauth in senlin, I will go through the codes later. | 02:42 |
Qiming | elynn, we are not using it directly, we are already indirectly using it through openstacksdk | 02:43 |
Qiming | we need to figure out a clean way to support asynchronous actions | 02:43 |
elynn | Qiming, yes, we might need to change some codes in openstacksdk to get location back. | 02:44 |
elynn | Qiming, yes | 02:44 |
Qiming | right | 02:44 |
Qiming | that will benefit all OpenStack projects | 02:44 |
elynn | I need to go through keystoneauth codes first... | 02:44 |
Qiming | if they care using sdk | 02:44 |
Qiming | yep, that would be great | 02:45 |
elynn | Maybe add a location property to all resource? | 02:45 |
Qiming | that should be hidden | 02:46 |
elynn | If it's hidden, how do we get it? | 02:46 |
Qiming | maybe here? http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/openstack/proxy.py#n252 | 02:47 |
elynn | I'm not clear the routine for a request, will dig into it. | 02:50 |
Qiming | okay | 02:50 |
Qiming | a request was processed directly by SDK before | 02:50 |
Qiming | now it is completely moved over to keystoneauth1 --- which I don't like | 02:51 |
elynn | sdk seems to use keystoneuath | 02:51 |
Qiming | it does not harm to dig more | 02:51 |
elynn | Qiming, yes, that's the hard part, let's find out if there's a function in keystonauth can get location back. | 02:52 |
Qiming | yep | 02:53 |
elynn | Qiming, do you think location is enough? | 02:54 |
elynn | https://github.com/openstack/senlin/blob/master/senlin/api/openstack/v1/clusters.py#L229 | 02:54 |
elynn | the location for cluster_update is a link to cluster | 02:54 |
elynn | I would expect it to an aciton. | 02:54 |
Qiming | well, that is another question | 02:55 |
Qiming | we may need to return the action in location | 02:56 |
Qiming | for consistency | 02:56 |
elynn | Qiming, yes, just raise it to let you aware of it :) | 02:56 |
Qiming | there are still some grey areas in the guidelines | 02:56 |
Qiming | I thought about that before | 02:57 |
Qiming | we are returning a body when serving an UPDATE request (a PATCH command) | 02:57 |
Qiming | even though we are returning 202 | 02:58 |
elynn | From guideline, it doesn't mention returning body in Asynchronous operation. | 03:00 |
Qiming | yep | 03:01 |
Qiming | that is a grey area | 03:01 |
Qiming | we are returning the cluster dict in the body for cluster_update | 03:01 |
Qiming | so maybe we can return the action itself in the Location header | 03:01 |
Qiming | we have some freedoms here, :) | 03:02 |
elynn | That would be great :) | 03:03 |
Qiming | but we should always bear in mind, we are in the grey zone, :) | 03:03 |
*** pratikmallya has quit IRC | 03:05 | |
*** yuanying has quit IRC | 03:30 | |
*** gongysh has quit IRC | 03:41 | |
*** gongysh has joined #senlin | 03:44 | |
*** gongysh has quit IRC | 03:56 | |
*** gongysh has joined #senlin | 03:57 | |
*** yuanying has joined #senlin | 04:07 | |
openstackgerrit | Merged openstack/python-senlinclient: Remove MANIFEST.in https://review.openstack.org/259301 | 04:15 |
openstackgerrit | Merged openstack/senlin: User documentation for receivers https://review.openstack.org/261791 | 04:15 |
*** gongysh has quit IRC | 04:15 | |
*** gongysh has joined #senlin | 04:30 | |
*** elynn has quit IRC | 04:34 | |
*** gongysh has quit IRC | 04:49 | |
*** elynn has joined #senlin | 04:52 | |
*** gongysh has joined #senlin | 04:53 | |
*** gongysh has quit IRC | 05:25 | |
*** gongysh has joined #senlin | 05:27 | |
xuhaiwei | Qiming, I found availability_zone_list api is not supported in openstacksdk, should I submit a patch for it? | 06:09 |
Qiming | xuhaiwei, there was a patch | 06:10 |
Qiming | you can take it over though, I don't think that guy is still working on it | 06:10 |
xuhaiwei | ok, I will search for it | 06:10 |
Qiming | found it? | 06:21 |
Qiming | xuhaiwei, this one: https://review.openstack.org/#/c/221646/ | 06:24 |
*** Qiming has quit IRC | 06:28 | |
xuhaiwei | yes, I have found it | 06:49 |
xuhaiwei | about your comment of it, should we add 'create, retrieve and delete'? | 06:50 |
*** yuanying has quit IRC | 08:20 | |
openstackgerrit | Ethan Lynn proposed openstack/senlin: Add new cluster status RESIZING https://review.openstack.org/261934 | 08:45 |
*** xujun has quit IRC | 09:20 | |
*** xuhaiwei has quit IRC | 10:06 | |
*** gongysh has quit IRC | 10:38 | |
*** gongysh has joined #senlin | 10:52 | |
*** Qiming has joined #senlin | 10:53 | |
elynn | Hi Qiming | 12:06 |
elynn | I 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 #senlin | 12:12 | |
*** elynn has quit IRC | 12:15 | |
*** elynn_ has quit IRC | 12:17 | |
*** openstackgerrit has quit IRC | 12:53 | |
*** openstackgerrit has joined #senlin | 13:05 | |
openstackgerrit | zhurong proposed openstack/senlin-dashboard: Use the defined INDEX_URL in clusters forms and views https://review.openstack.org/261995 | 13:48 |
*** Qiming has quit IRC | 15:11 | |
*** bdrich_ has joined #senlin | 15:26 | |
*** bdrich_ has quit IRC | 15:27 | |
*** bdrich has joined #senlin | 15:27 | |
*** pratikmallya has joined #senlin | 18:51 | |
*** pratikmallya has quit IRC | 20:52 | |
*** pratikmallya has joined #senlin | 22:35 | |
*** bdrich has quit IRC | 23:22 | |
*** Qiming has joined #senlin | 23:39 | |
*** bdrich has joined #senlin | 23:40 | |
*** bdrich has quit IRC | 23:45 | |
*** bdrich has joined #senlin | 23:49 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!