Monday, 2015-12-07

*** zhongjun has quit IRC01:26
*** x00350071 has quit IRC01:33
*** xiangxinyong has joined #openstack-smaug02:54
*** xiangxinyong has quit IRC04:35
*** xiangxinyong has joined #openstack-smaug05:57
*** zhonghua is now known as zhonghua-lee06:26
*** gampel has joined #openstack-smaug06:33
*** openstackgerrit_ has joined #openstack-smaug06:51
*** gampel has quit IRC07:07
*** x00350071 has joined #openstack-smaug07:16
*** x00350071 is now known as xiangxinyong12307:21
*** xiangxinyong has quit IRC07:26
*** xiangxinyong has joined #openstack-smaug07:28
*** xiangxinyong has quit IRC08:03
*** gampel has joined #openstack-smaug08:31
*** saggi has joined #openstack-smaug09:06
gampelsaggi: i just sent you an e-mail with [Smaug Bank Class Diagram] sent by xiangxinyong09:37
xiangxinyong123Thanks eran.09:42
saggixiangxinyong123: We are going for lunch09:53
xiangxinyong123Oh. Enjoy it.09:55
*** openstackgerrit_ has quit IRC10:23
*** zhonghua-lee has quit IRC11:42
*** zhonghua-lee has joined #openstack-smaug11:42
saggiping xiangxinyong12311:46
xiangxinyong123hello saggi11:46
saggiI'11:46
saggixiangxinyong123: I checked your class diagram. It's very good.11:46
xiangxinyong123I am very glad to see you.11:47
xiangxinyong123Thanks.11:47
saggixiangxinyong123: wrt your question, Smaug should store the bank in the DB11:47
xiangxinyong123Does the Smaug directly write the bank into the DB?11:49
xiangxinyong123Exactly, does the Smaug API Service directly write the bank info into the DB?11:50
saggiWhen you create a Bank it will store the data for bank instance creation in the DB11:51
saggiWhen a plan starts we create a Bank object with the plugin and the saved parameters11:51
saggiusing this object the plan and plugins will write the data to the bank11:51
*** oshidoshi has joined #openstack-smaug11:52
gampel Welcome oshidoshi11:52
oshidoshithank you, glad to be here11:52
xiangxinyong123oshidoshi: welcome11:52
saggixiangxinyong123: do you understand?11:53
*** CrayZee has joined #openstack-smaug11:53
xiangxinyong123saggi: i am a little confused.11:54
saggi:)11:54
saggixiangxinyong123: What are you confused about11:56
xiangxinyong123It means that it won't call the create_bank method in the BankPlugin when we post the create bank request, is it?11:56
saggiWe will do it to make sure that a bank can be created and maybe trigger initialization.11:57
saggiLets say the bank is some swift category11:57
saggiThe bank might want to put data there for initalization. About it's version for example.11:58
saggiwhen we create a bank the bank will check if the target is initalized and will initalize it if it's not11:59
saggiSo we will create an instance.12:00
saggiAlso we should have one bank instance for all users so the object could do some internal synchronization locally.12:00
saggiBut we don't have all the instances of all the banks in memory all the time.12:01
saggiThe BankManager will have to take care of that aspect.12:01
xiangxinyong123Hi saggi,It means that when we post a create bank by rest api, firstly we will store the bank info into db in the Smaug API Service,12:02
xiangxinyong123and then the Smaug Protection Service will invoke the create_bank method in the Bank Plugin to check if the target is initalized and will initalize it if it's not12:03
xiangxinyong123Is this right?12:04
saggiI will make it have a ` create_bank(plugin_uuid, parameters): Bank ` method12:04
saggiYes12:04
saggiif there are any issues the Bank will be marked with some status in the DB so the user can modify the arguments12:04
saggiThis is because a bank can fail to load because of network errors12:05
xiangxinyong123OK.12:05
chenzengsaggi:how are you? about the bank, take the swift for example. what is the bank? the container in the bank or others?12:06
saggiIn my example a bank requires a clean container12:07
chenzengsaggi:yes, so, when create the bank, the bankplugin will return a clean container, is that?12:09
saggiNo, since the bank might have been initialized by someone else and we are now connecting to it12:09
saggiThe Bank will check if a container with that name exists. If it doesn't it will create one and initialize it.12:09
saggiif it does exists it will check that it's a valid bank12:10
chenzengso, the transacion will be stored in an object of the swift, is that?12:13
chenzengit means one object stands for one transaction info.12:13
saggino, transaction will be multiple objects12:16
saggibut there will be one object which is the index of the transaction12:17
saggiand all related files will be prefixed with the transaction dir12:17
saggilook at bank.md for details12:17
chenzengok12:19
xiangxinyong123Hi saggi, When we create a operation by Rest API,  will the Smaug Protection Serivce also invoke ` create_bank(plugin_uuid, parameters): Bank ` method?12:19
saggiyes, but only after puting data in the DB12:20
saggiit will use it to make sure the bank is initialized and put initial error information if the parameters lead to nowhere or a bad bank12:20
saggiSo we don't get those errors for the first time when we try and start backing up :)12:21
saggixiangxinyong123: OK?12:23
xiangxinyong123OK.12:23
chenzengsaggi:if the parameters are error, it can not create bank. so we can put the bank info to the DB after creating the bank successfully.12:24
saggiThe bank can fail at any time since it's remote.12:26
saggiTo make the use case uniform we create the db data first and put error information there.12:26
saggiIf the user checks the DB it will see that the instance had an error (Could not connect, Not a bank, etc...)12:26
chenzengok12:27
saggiWe should validate the arguments before creating the DB so if the arguments are wrong (eg. bad format) we should fail before creating the entry12:27
saggichenzeng: do you understand why we need to write to the db first?12:27
chenzengyes, I understand. when to delete the invalid bank info, and who will do it?12:30
saggiThe user will do it.12:31
saggiIf it's wrong the user will either change the parameters or delete the bank12:31
saggiIt's similar to when you create a VM in openstack12:31
saggiyou create the entry and then start the VM12:31
saggiIf there is an error you check the VM entry12:32
saggiand then the user deletes the object12:32
saggichenzeng: ok?12:32
chenzengsaggi:ok, thanks.12:32
xiangxinyong123Hi saggi, will the protection workflow engine invoke the bank's method(ex. write_object,read_object) or will the protection plugin invoke the bank's method?12:32
saggithey will both invoke those methods. The only difference is that plugins will only be able to read\write objects with a specific prefix so that they can't mess with other plugin's files.12:34
saggixiangxinyong123: ^^12:34
saggixiangxinyong123: ok?12:36
xiangxinyong123^-^12:36
*** zengyingzhe has joined #openstack-smaug12:36
xiangxinyong123It means the protection plugin will include a paramenter of a bank12:36
xiangxinyong123Is this right?12:37
saggiNo those methods are on the Bank class not the BankPlugin12:38
xiangxinyong123^-^ saggi I means protection plugin(ex. vm plugin)12:39
xiangxinyong123not bank plugin.12:40
chenzengsaggi: can you describe the structure of the data the engine and plugins write12:40
chenying_sagi  how to check the target is initalized ?                  Does it means that  a swift bank is initalized  with a swift url and a container, when we create a new bank with same wift url and container, we do not need create a new bank? Is that right?12:40
saggichenzeng: it's in bank.md on the patch12:40
chenzengsaggi:ok, i read bank.md first, sorry.12:41
saggichenying_: The bank implementation is responsible for that and it could do it any way it wants. A simple way is to put an object called bank.init12:41
saggiyou should also put information in it. Like the valid version of BankPlugin so that future version know the format if it was changed.12:42
chenying_<saggi> Thanks.12:43
xiangxinyong123 will the protection workflow engine invoke the bank's method(ex. write_object,read_object) or will the protection plugin(ex.vm plugin, volume plugin) invoke the bank's method?12:44
saggiboth, I already answered that a seconds ago, didn't I?12:45
xiangxinyong123sorry.12:46
xiangxinyong123Saggi,Thanks very much. Your answer is very useful for our team.12:46
xiangxinyong123^-^12:47
*** xiangxinyong456 has joined #openstack-smaug13:03
gampelplease all review https://review.openstack.org/#/c/247440/ and https://review.openstack.org/#/c/253233/ so we could push them in this week13:05
xiangxinyong456ok13:06
xiangxinyong456eran, i send a email about the wire frame to you13:07
xiangxinyong456but we are not sure the wire frame is right13:08
gampelok i will go over it today13:09
xiangxinyong456thanks. if we agree on it, we will continue to draw other wire frame like that.13:10
xiangxinyong456^-^13:11
*** zhonghua-lee has quit IRC13:14
*** zhonghua-lee has joined #openstack-smaug13:14
*** xiangxinyong456 has quit IRC13:25
*** xiangxinyong456 has joined #openstack-smaug14:20
*** xiangxinyong456 has quit IRC14:21
*** zhonghua-lee has quit IRC15:25
*** zhonghua-lee has joined #openstack-smaug15:26
*** gampel has quit IRC16:17
openstackgerritSaggi Mizrahi proposed openstack/smaug: Proposed Smaug API v1.0  https://review.openstack.org/24475616:52
*** gampel has joined #openstack-smaug17:09
*** gampel has quit IRC20:53
*** gampel has joined #openstack-smaug20:55
*** gampel has quit IRC21:05

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