*** zhongjun has quit IRC | 01:26 | |
*** x00350071 has quit IRC | 01:33 | |
*** xiangxinyong has joined #openstack-smaug | 02:54 | |
*** xiangxinyong has quit IRC | 04:35 | |
*** xiangxinyong has joined #openstack-smaug | 05:57 | |
*** zhonghua is now known as zhonghua-lee | 06:26 | |
*** gampel has joined #openstack-smaug | 06:33 | |
*** openstackgerrit_ has joined #openstack-smaug | 06:51 | |
*** gampel has quit IRC | 07:07 | |
*** x00350071 has joined #openstack-smaug | 07:16 | |
*** x00350071 is now known as xiangxinyong123 | 07:21 | |
*** xiangxinyong has quit IRC | 07:26 | |
*** xiangxinyong has joined #openstack-smaug | 07:28 | |
*** xiangxinyong has quit IRC | 08:03 | |
*** gampel has joined #openstack-smaug | 08:31 | |
*** saggi has joined #openstack-smaug | 09:06 | |
gampel | saggi: i just sent you an e-mail with [Smaug Bank Class Diagram] sent by xiangxinyong | 09:37 |
---|---|---|
xiangxinyong123 | Thanks eran. | 09:42 |
saggi | xiangxinyong123: We are going for lunch | 09:53 |
xiangxinyong123 | Oh. Enjoy it. | 09:55 |
*** openstackgerrit_ has quit IRC | 10:23 | |
*** zhonghua-lee has quit IRC | 11:42 | |
*** zhonghua-lee has joined #openstack-smaug | 11:42 | |
saggi | ping xiangxinyong123 | 11:46 |
xiangxinyong123 | hello saggi | 11:46 |
saggi | I' | 11:46 |
saggi | xiangxinyong123: I checked your class diagram. It's very good. | 11:46 |
xiangxinyong123 | I am very glad to see you. | 11:47 |
xiangxinyong123 | Thanks. | 11:47 |
saggi | xiangxinyong123: wrt your question, Smaug should store the bank in the DB | 11:47 |
xiangxinyong123 | Does the Smaug directly write the bank into the DB? | 11:49 |
xiangxinyong123 | Exactly, does the Smaug API Service directly write the bank info into the DB? | 11:50 |
saggi | When you create a Bank it will store the data for bank instance creation in the DB | 11:51 |
saggi | When a plan starts we create a Bank object with the plugin and the saved parameters | 11:51 |
saggi | using this object the plan and plugins will write the data to the bank | 11:51 |
*** oshidoshi has joined #openstack-smaug | 11:52 | |
gampel | Welcome oshidoshi | 11:52 |
oshidoshi | thank you, glad to be here | 11:52 |
xiangxinyong123 | oshidoshi: welcome | 11:52 |
saggi | xiangxinyong123: do you understand? | 11:53 |
*** CrayZee has joined #openstack-smaug | 11:53 | |
xiangxinyong123 | saggi: i am a little confused. | 11:54 |
saggi | :) | 11:54 |
saggi | xiangxinyong123: What are you confused about | 11:56 |
xiangxinyong123 | It means that it won't call the create_bank method in the BankPlugin when we post the create bank request, is it? | 11:56 |
saggi | We will do it to make sure that a bank can be created and maybe trigger initialization. | 11:57 |
saggi | Lets say the bank is some swift category | 11:57 |
saggi | The bank might want to put data there for initalization. About it's version for example. | 11:58 |
saggi | when we create a bank the bank will check if the target is initalized and will initalize it if it's not | 11:59 |
saggi | So we will create an instance. | 12:00 |
saggi | Also we should have one bank instance for all users so the object could do some internal synchronization locally. | 12:00 |
saggi | But we don't have all the instances of all the banks in memory all the time. | 12:01 |
saggi | The BankManager will have to take care of that aspect. | 12:01 |
xiangxinyong123 | Hi 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 |
xiangxinyong123 | and 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 not | 12:03 |
xiangxinyong123 | Is this right? | 12:04 |
saggi | I will make it have a ` create_bank(plugin_uuid, parameters): Bank ` method | 12:04 |
saggi | Yes | 12:04 |
saggi | if there are any issues the Bank will be marked with some status in the DB so the user can modify the arguments | 12:04 |
saggi | This is because a bank can fail to load because of network errors | 12:05 |
xiangxinyong123 | OK. | 12:05 |
chenzeng | saggi:how are you? about the bank, take the swift for example. what is the bank? the container in the bank or others? | 12:06 |
saggi | In my example a bank requires a clean container | 12:07 |
chenzeng | saggi:yes, so, when create the bank, the bankplugin will return a clean container, is that? | 12:09 |
saggi | No, since the bank might have been initialized by someone else and we are now connecting to it | 12:09 |
saggi | The Bank will check if a container with that name exists. If it doesn't it will create one and initialize it. | 12:09 |
saggi | if it does exists it will check that it's a valid bank | 12:10 |
chenzeng | so, the transacion will be stored in an object of the swift, is that? | 12:13 |
chenzeng | it means one object stands for one transaction info. | 12:13 |
saggi | no, transaction will be multiple objects | 12:16 |
saggi | but there will be one object which is the index of the transaction | 12:17 |
saggi | and all related files will be prefixed with the transaction dir | 12:17 |
saggi | look at bank.md for details | 12:17 |
chenzeng | ok | 12:19 |
xiangxinyong123 | Hi 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 |
saggi | yes, but only after puting data in the DB | 12:20 |
saggi | it will use it to make sure the bank is initialized and put initial error information if the parameters lead to nowhere or a bad bank | 12:20 |
saggi | So we don't get those errors for the first time when we try and start backing up :) | 12:21 |
saggi | xiangxinyong123: OK? | 12:23 |
xiangxinyong123 | OK. | 12:23 |
chenzeng | saggi: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 |
saggi | The bank can fail at any time since it's remote. | 12:26 |
saggi | To make the use case uniform we create the db data first and put error information there. | 12:26 |
saggi | If the user checks the DB it will see that the instance had an error (Could not connect, Not a bank, etc...) | 12:26 |
chenzeng | ok | 12:27 |
saggi | We should validate the arguments before creating the DB so if the arguments are wrong (eg. bad format) we should fail before creating the entry | 12:27 |
saggi | chenzeng: do you understand why we need to write to the db first? | 12:27 |
chenzeng | yes, I understand. when to delete the invalid bank info, and who will do it? | 12:30 |
saggi | The user will do it. | 12:31 |
saggi | If it's wrong the user will either change the parameters or delete the bank | 12:31 |
saggi | It's similar to when you create a VM in openstack | 12:31 |
saggi | you create the entry and then start the VM | 12:31 |
saggi | If there is an error you check the VM entry | 12:32 |
saggi | and then the user deletes the object | 12:32 |
saggi | chenzeng: ok? | 12:32 |
chenzeng | saggi:ok, thanks. | 12:32 |
xiangxinyong123 | Hi 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 |
saggi | they 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 |
saggi | xiangxinyong123: ^^ | 12:34 |
saggi | xiangxinyong123: ok? | 12:36 |
xiangxinyong123 | ^-^ | 12:36 |
*** zengyingzhe has joined #openstack-smaug | 12:36 | |
xiangxinyong123 | It means the protection plugin will include a paramenter of a bank | 12:36 |
xiangxinyong123 | Is this right? | 12:37 |
saggi | No those methods are on the Bank class not the BankPlugin | 12:38 |
xiangxinyong123 | ^-^ saggi I means protection plugin(ex. vm plugin) | 12:39 |
xiangxinyong123 | not bank plugin. | 12:40 |
chenzeng | saggi: can you describe the structure of the data the engine and plugins write | 12: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 |
saggi | chenzeng: it's in bank.md on the patch | 12:40 |
chenzeng | saggi:ok, i read bank.md first, sorry. | 12:41 |
saggi | chenying_: 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.init | 12:41 |
saggi | you 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 |
saggi | both, I already answered that a seconds ago, didn't I? | 12:45 |
xiangxinyong123 | sorry. | 12:46 |
xiangxinyong123 | Saggi,Thanks very much. Your answer is very useful for our team. | 12:46 |
xiangxinyong123 | ^-^ | 12:47 |
*** xiangxinyong456 has joined #openstack-smaug | 13:03 | |
gampel | please all review https://review.openstack.org/#/c/247440/ and https://review.openstack.org/#/c/253233/ so we could push them in this week | 13:05 |
xiangxinyong456 | ok | 13:06 |
xiangxinyong456 | eran, i send a email about the wire frame to you | 13:07 |
xiangxinyong456 | but we are not sure the wire frame is right | 13:08 |
gampel | ok i will go over it today | 13:09 |
xiangxinyong456 | thanks. if we agree on it, we will continue to draw other wire frame like that. | 13:10 |
xiangxinyong456 | ^-^ | 13:11 |
*** zhonghua-lee has quit IRC | 13:14 | |
*** zhonghua-lee has joined #openstack-smaug | 13:14 | |
*** xiangxinyong456 has quit IRC | 13:25 | |
*** xiangxinyong456 has joined #openstack-smaug | 14:20 | |
*** xiangxinyong456 has quit IRC | 14:21 | |
*** zhonghua-lee has quit IRC | 15:25 | |
*** zhonghua-lee has joined #openstack-smaug | 15:26 | |
*** gampel has quit IRC | 16:17 | |
openstackgerrit | Saggi Mizrahi proposed openstack/smaug: Proposed Smaug API v1.0 https://review.openstack.org/244756 | 16:52 |
*** gampel has joined #openstack-smaug | 17:09 | |
*** gampel has quit IRC | 20:53 | |
*** gampel has joined #openstack-smaug | 20:55 | |
*** gampel has quit IRC | 21:05 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!