Thursday, 2016-07-28

*** zhangshuai has joined #openstack-smaug00:45
*** iceyao has joined #openstack-smaug00:47
*** yamamoto_ has joined #openstack-smaug01:12
*** zhurong has joined #openstack-smaug01:25
openstackgerritdaiki kato proposed openstack/smaug: Fix several typos  https://review.openstack.org/34809901:27
*** yamamoto_ has quit IRC02:31
*** zhurong has quit IRC02:56
*** mingyu has joined #openstack-smaug02:58
*** mingyu has quit IRC03:00
*** iceyao has quit IRC03:01
*** iceyao has joined #openstack-smaug03:02
*** zhurong has joined #openstack-smaug03:03
*** gampel has joined #openstack-smaug05:12
openstackgerritzhangshuai proposed openstack/smaug: Add fullstack tests of the resource restores RESTAPI  https://review.openstack.org/33708305:14
*** gampel has quit IRC05:21
*** gampel has joined #openstack-smaug05:30
*** gampel has quit IRC05:36
*** yamamoto_ has joined #openstack-smaug06:27
*** yuval has joined #openstack-smaug06:28
openstackgerritMerged openstack/smaug: add list and get fullstack for checkpoint  https://review.openstack.org/34023406:48
openstackgerritMerged openstack/smaug: Updated from global requirements  https://review.openstack.org/33994306:48
*** iceyao has quit IRC06:58
openstackgerritMerged openstack/smaug: Fix several typos  https://review.openstack.org/34809907:17
*** xiangxinyong_ is now known as xiangxinyong07:44
openstackgerritYuval Brik proposed openstack/smaug: Reimplement the Protection workflow for new design  https://review.openstack.org/34816307:54
xiangxinyongHi guy, what about the new name of project?07:56
openstackgerritYuval Brik proposed openstack/smaug: Implement Cinder Backup Protection Plugin  https://review.openstack.org/34816407:56
*** saggi has joined #openstack-smaug08:00
yuvalxiangxinyong: Yesterday there was a coin-toss and Kolla won the Koala logo08:03
xiangxinyongyuval: so karbor is not suitable for us?08:04
yuvalxiangxinyong: maybe08:04
yuvalxiangxinyong: IMO we should decide on a new one08:05
xiangxinyongyuval: understood.08:05
xiangxinyongthanks08:05
zhonghua-lee:(08:17
zengchenping yuval08:35
yuvalping zengchen08:35
zengchenhi, how are you08:35
yuvalgood, you?08:36
*** zhongjun_ has quit IRC08:36
zengchenabout the issue we discussed yesterday, i have read the material. http://restful-api-design.readthedocs.io/en/latest/methods.html#actions08:36
yuvalok08:36
*** zhongjun_ has joined #openstack-smaug08:36
zengchendo you have time to discuss the implementation?08:37
yuvalsure08:37
yuvalplease tag me when you send a message here, so I can get a notification08:39
zengchenmy idea is two define two functions:pause and resume which do the corresponding work seperately. my question is how to route to these two functions if we just use post method with api path '/{project_id}/scheduled_operations/{scheduled_operation_id'08:39
zengchenyuval:ok, sorry08:40
zengchenyuval:it is better to give me an example.08:41
yuvalzengchen: ok. If you do POST /{project_id}/scheduled_operations/{scheduled_operation_id08:41
yuvalzengchen: if the POST has a json body08:41
yuvalzengchen: and if that body has a 'status' key08:41
zengchenyuval:yes08:41
yuvalzengchen: check the current status and the requested status08:41
yuvalzengchen: if the current status is available and you asked for 'paused' -> pause the scheduled operation08:42
yuvalzengchen: if the current status is 'paused' and you asked for available -> resume08:42
zengchenyuval:so you still insist that user will update the status?08:43
yuvalzengchen: what do you mean?08:43
yuvalzengchen: I don't understand what is 'the user will update the status'08:43
zengchenyuval:as you said, user will send an request body with status item08:45
yuvalzengchen: I don't understand what's the problem08:45
zengchenyuval:why do the user will updae the status?08:45
yuvalzengchen: who is the 'user'? we are speaking about a northbound api08:46
zengchenyuval:yes, we are speaking the same.08:46
zengchenyuval:the normal user.08:46
yuvalzengchen: how do you want to pause the scheduled operation without updating the status?08:47
*** saggi1 has joined #openstack-smaug08:47
*** saggi has quit IRC08:47
zengchenyuval:that's the way we implement the requirement by update the status, but not by user to update the status, just by the smaug.08:48
yuvalzengchen: do you mean why not use '/action'?08:49
zengchenyuval:yes08:49
yuvalzengchen: why use '/actions'?08:49
yuvalzengchen: if you want to change an attribute, for example, change the status of an object, you update it using a REST API. The only use for /actions is when there are multiple 'pathes' to reach the same status, or an action which affects multiple fields08:52
yuvalzengchen: unless there is a very good reason to use '/actions', I don't understand why not adhere to the regular REST API08:53
zengchenyuval:take the nova for example, when user want to reboot the vm, user just need to invoke the server/{server_id}/action with request body {'reboot':''}, not post a body with some shell command08:53
yuvalzengchen: because 'reboot' doesn't change the machine status to 'rebooting' as there is no such thing. It shuts down the machine and brings it up again. Have you used POST to change the VM status to 'UP' when it was 'UP', it wouldn't make any sense to reboot08:55
yuvalzengchen: if what bothers you is the JSON body, this is the way REST APIs work08:55
yuvalzengchen: I'm going to eat, be back later08:58
zengchenyuval:so, do you think the user can update status of scheduled operation? how do they know what status scheduled operation have08:58
zengchenyvual:ok, thank you08:58
*** yamamoto_ has quit IRC09:43
yuvalzengchen: back09:45
yuvalzengchen: by using a GET request they can find the current status09:45
yuvalzengchen: by using POST they ask to update it09:46
zengchenyuval:you can see the show api of scheduled operation will not return the status.09:49
zengchenyuval:in other words, we should not expose the status of operation to user, it is the internal attribute.09:51
yuvalzengchen: that's right, because there is currently no status in the ScheduledOperation model, and we should add it if we want to let user pause/resume ScheduledOperations09:51
zengchenyuval:the status of operation is stored in the another table 'scheduled_operation_state'09:52
*** saggi1 has quit IRC09:54
yuvalzengchen: ok, then?09:57
zengchenyuval:at present, we don't expose the status to user, if we do as your said, we will add another api to list all valid status in order to send right value when update the operations.09:59
zengchenyuval:why not just send an action not update the internal status.09:59
yuvalzengchen: just to be clear: if we want to pause/resume scheduled operation, regardless of the API to do so, the user MUST know if that ScheduledOperation is currently paused or not10:00
yuvalzengchen: can we agree on that?10:02
zengchenyuval:yes10:02
yuvalzengchen: great. So why do you think we need to add another API?10:03
yuvalwhat do you mean by 'list all valid status'?10:03
zengchenyuval:because you want to update the status of scheduled operation, you should send the right parameter10:04
zengchenyuval:how to get the right status, you should invoke the list api to get.10:05
yuvalzengchen: if you want to change the status to 'paused', send JSON: {"status": "paused"}10:05
yuvalzengchen: are you asking how will the user know to use "paused"?10:06
zengchenyuval:yes10:06
yuvalzengchen: the user has an API reference exactly for that10:06
zengchenyuval:what api10:06
yuvalzengchen: Smaug API10:06
zengchenyuval:i mean which api10:07
zengchenyuval:i don't have now10:07
yuvalzengchen: POST /{project_id}/scheduled_operations/{scheduled_operation_id10:07
*** zhurong has quit IRC10:07
zengchenyuval:how do the user know to use 'paused'10:09
yuvalzengchen: the user will have an API reference. Just like this: https://www.google.co.il/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjdi6Se9ZXOAhWG0xoKHZDbBMgQFggaMAA&url=http%3A%2F%2Fdeveloper.openstack.org%2Fapi-ref-blockstorage-v2.html&usg=AFQjCNGWWEZB1P5dcp_-UAdYEvUbdWWq_w&sig2=ReEnrVypRa8r91obS9TzZw&bvm=bv.128153897,d.bGg10:09
yuvaldisregard10:09
yuvaldeveloper.openstack.org/api-ref-blockstorage-v2.html10:09
yuvalzengchen: developer.openstack.org/api-ref-blockstorage-v2.html10:09
zengchenyuval:ok, i will read, now i will go to have dinner. thank you very much.10:10
yuvalzengchen: sure, cya10:10
*** yamamoto has joined #openstack-smaug10:46
*** yamamoto has quit IRC10:49
*** yamamoto has joined #openstack-smaug10:54
zengchenyuval:which api do you want me to look at in the 'developer.openstack.org/api-ref-blockstorage-v2.html'10:59
zengchenyuval:i will go to a conference, please leave me a message.11:03
yuvalzengchen: not a specific route, just the fact that there is such API reference. It will include the possible statuses11:12
*** saggi has joined #openstack-smaug11:48
*** saggi has quit IRC12:11
*** gampel has joined #openstack-smaug12:35
*** yamamoto has quit IRC12:40
openstackgerritYuval Brik proposed openstack/smaug: Implement Cinder Backup Protection Plugin  https://review.openstack.org/34816412:40
*** saggi has joined #openstack-smaug12:46
*** gampel has quit IRC12:53
*** saggi has quit IRC12:57
*** saggi has joined #openstack-smaug13:05
*** yuval has quit IRC13:33
*** yamamoto has joined #openstack-smaug13:41
*** yamamoto has quit IRC13:46
*** saggi has quit IRC13:54
*** iceyao has joined #openstack-smaug14:08
*** gampel has joined #openstack-smaug14:22
*** saggi has joined #openstack-smaug14:27
*** gampel has quit IRC14:35
*** zhurong has joined #openstack-smaug14:36
*** saggi has quit IRC14:59
*** yamamoto has joined #openstack-smaug15:06
*** yamamoto has quit IRC15:10
*** openstackgerrit has quit IRC15:18
*** openstackgerrit has joined #openstack-smaug15:18
*** zhurong has quit IRC15:27
*** gampel has joined #openstack-smaug15:28
*** zhangshuai has quit IRC16:14
*** iceyao has quit IRC16:22
*** gampel has quit IRC16:26
*** gampel has joined #openstack-smaug16:29
*** gampel has quit IRC16:43
*** gampel has joined #openstack-smaug18:04
*** gampel has quit IRC18:17
*** zhangshuai has joined #openstack-smaug19:06
*** zhangshuai has quit IRC19:10
*** yamamoto has joined #openstack-smaug21:09
*** yamamoto has quit IRC21:21
*** yamamoto has joined #openstack-smaug22:22
*** yamamoto has quit IRC22:27
*** zhonghua-lee has quit IRC23:02
*** zhonghua-lee has joined #openstack-smaug23:03
*** yamamoto has joined #openstack-smaug23:24
*** yamamoto has quit IRC23:29
*** iceyao has joined #openstack-smaug23:44

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