Monday, 2016-01-11

*** zengyingzhe_ has joined #openstack-smaug00:38
openstackgerrityinwei proposed openstack/smaug: Basic design doc for Protection Service  https://review.openstack.org/26145504:12
yinweiguys, together with the class graph, a rst is also committed. There's more description in the rst. Pls. have a check.04:12
*** WANG_Feng has quit IRC05:26
*** WANG_Feng has joined #openstack-smaug05:26
openstackgerritMerged openstack/smaug: basic OperationEngine service: Implement a runnable service  https://review.openstack.org/26143505:50
*** WANG_Feng has quit IRC06:11
*** WANG_Feng has joined #openstack-smaug06:12
openstackgerritchenying proposed openstack/smaug: basic protection service: Implement a runnable service  https://review.openstack.org/26159006:45
*** openstackgerrit has quit IRC08:32
*** openstackgerrit has joined #openstack-smaug08:32
zengyingzhe_yinwei, copy that.08:36
yinweihi08:37
yinweizengyingzhe_,what's up?08:38
yinweiwhat do you mean by copy that?08:38
yinweithe patch uploaded is together with rst and sequential graph, don't miss them08:38
zengyingzhe_收到08:39
zengyingzhe_Have you discussed with saggi about the pluggable provider today?08:40
saggizengyingzhe_: ?08:40
zengyingzhe_I saw you gave some comments in saggi's patch.08:41
zengyingzhe_saggi, you there?08:43
saggizengyingzhe_: Yes08:43
zengyingzhe_why the resource member of Context parameter passed to get_pre_task, is ResourceGraphNode type, instead of Resource type?08:47
zengyingzhe_Does this mean a protection plugin can protect a resource tree?08:48
saggizengyingzhe_: If the plugin want's to protect a tree it will have to register for all sub types not just back up the tree. It's put there so that the plugin could maybe make a decision based on it's children.08:52
zengyingzhe_So a plugin may protect multiple resource type?08:55
zengyingzhe_Why don't let provider handle this? A protection plugin just focuses on one type resource.08:57
saggiThe pluggable providers calls the get_(pre|post)_task() function for the plugin registered for that specific type. If you want to handle more than one type you will need to register for more than one type. By registering for a type you commit to all aspects of that type. You backup a volume no matter where it is in the tree.09:04
saggiOn the same note, you can't really backup a subtree since it might contain types you don't know about that are part of a use defined protectable.09:04
saggi*user defined09:05
yinweisaggi, are you available 2~3 hours later?09:06
saggiyinwei: Yes09:06
yinweiI neet talk with your about the pluggable provider09:06
yinweithanks.09:06
yinweiwill ping you then09:06
saggiI'm here for at least 7 more hours :)09:06
saggiyinwei: sure09:07
yinweicool09:07
zengyingzhe_According to your discription, can I say that get_(pre|post)_task() function will return a task, for handling all resources of the type which current plugin supports, not just for one individual resource?09:19
saggiIt could do either09:36
zengyingzhe_Is this resource contained in Context the same as the root_resource parameter for create_checkpoint in ProtectionProvider?09:43
zengyingzhe_Seems there lacks an important interface in ProtectionProvider. build_all_task or something like this, return the task list to workflow-engine to execute.09:52
*** zengyingzhe_ has quit IRC10:32
openstackgerritwangliuan proposed openstack/smaug: Implement the basic protection service framework  https://review.openstack.org/26576010:42
*** chenying has quit IRC11:36
*** chenying has joined #openstack-smaug11:45
*** chenying has quit IRC12:07
*** c00281451 has joined #openstack-smaug12:52
*** yinweimac has joined #openstack-smaug13:09
yinweimachi, saggi13:10
saggiyinweimac: hi13:10
yinweimachow are you doing13:10
yinweimacI'd like to check two scenarios with you13:11
yinweimacfrom your pluggable provider design, to make sure we're on the same page13:12
yinweimacfirst, is how to build the resource graph?13:12
saggiUsing the ProtectableRegistery13:14
yinweimacyes, more details?13:14
yinweimacsay, what we get as input in protection service is the backup plan, where the resources are aggregated into a tuple13:15
saggiA plan has at least one resource associated with it13:15
yinweimacyes13:15
saggiWe'll call it ResourceA13:16
saggiyou do ProtectableRegistry.get_dependent_resources(ResourceA)13:16
saggiget a least of dependent resources.13:16
saggiFor each resource we have not already encountered we do the same thing13:17
saggislowly building the graph13:17
saggiEvery Protectable defines possible_parent_types13:17
saggiSo when you register it the registry puts it in a map between a type and protectables. So whe you call fetch_dependant_resources() it will call Protectable.fetch_child_resources() for every Protectable registered for that type.13:18
saggiyinweimac: OK?13:18
yinweimacI'm reading your sentences and checking with your class file13:19
saggiyinweimac: I will write a short pesudo code section. 2 min.13:20
yinweimacyes, that's why i suggested you write a sequential graph. Yes, I guessed so, but I'm not sure how those classes talks with each other13:22
yinweimacso, is Protectable is abstraction of a type of resource, who will handle the potential hierarchy of resources which belongs to this type. Like, for all VMs, there's one VMProtectable class, which will handle all VM resources to fetch_child_resources of them. Sounds like Protectable a helper class of Resource class?13:29
saggiyinweimac: http://fpaste.org/309390/14525190/13:31
yinweimacchecking13:31
yinweimacthanks!13:31
saggiyinweimac: Is that clear now?13:36
yinweimacyes, the registry scenario is quite clear13:36
yinweimacfor node graph building, since our input is a list of resources, say, a list of VMs, they are trees.  No edges link to those independent trees.13:38
yinweimacone call of build_graph won't complete the graph, right?13:38
yinweimacwe need iterate all resources of the plan's resource list and then build the whole graph, right?13:39
yinweimacit's not a full-connected graph, right?13:39
saggiNo13:40
yinweimacwhy13:40
saggiWe will run build_graph on every resource on the list13:40
saggibut with the same reousrces_seen map13:40
saggithis will make sure that if there is a connection we will find it and we will have one node per resrouces13:40
saggiThat you run DFS on the graph which will do a topological sort of the nodes13:41
saggiWe don't allow circles though13:41
yinweimacwhy is there a connection between two VMs13:41
saggiThey might use the same glance image13:41
saggiso they will share dependencies13:42
yinweimachmm13:42
yinweimacthen VMs with different images?13:42
yinweimacwhy they're connected?13:42
yinweimacsame network?13:42
saggiThey are not directly connected in the graph13:43
saggibut you do have a shared node13:43
saggiOr you could have a case where nothing is shared13:43
yinweimacok13:43
yinweimacso the graph could be a tree or a forest13:43
yinweimacright?13:43
saggiNo because a tree doesn't allow having a shared node13:44
saggiin a tree that should only be one path between two nodes13:44
yinweimaccould you give me a non tree example?13:46
saggiProjectA->VM_A -> GlanceA13:47
saggiProjectA->VM_B -> GlanceA13:47
saggiThere are two paths between ProjectA and GlanceA so it's not a tree.13:47
saggiIt's just a project with 2 VMs that share the same glance image. It's a pretty common use case13:48
yinweimachmm, got it13:49
yinweimacok, so we iterate all resources to build_graph with same resources_seen13:50
saggiYes, so we don't create a node for the same resource twice13:50
saggithat way we get a full graph13:50
saggiwe do a topological sort13:50
saggiMake sure we have no loops13:50
yinweimacthe output would either be a full connected graph or a not connected graph13:50
saggiYou could have any kind of graph13:51
saggisince you could have resources that don't share anything13:51
yinweimacjust no cyclic13:51
yinweimacgraph13:51
saggiyes13:52
yinweimacso how about walk through the graph to build tasks, is it necessary to get_pre_task and get_post_task?13:52
yinweimacdo you want to get output as two parallel flows, first for pre tasks, second for post tasks?13:53
yinweimacthose two parallel subflows will compose a sequential flow13:53
saggiyinweimac: I got to go for an interview.13:53
yinweimacok13:53
saggiBut the tasks relate to iteration on the graph13:53
saggiand creating dependencies between tasks13:54
saggiI admit it's not fully baked yet13:54
saggiSo I'll\ appreciate your feedback13:54
yinweimacyes, I will talk with you tommorrow, to see how to align our two designs together13:54
yinweimacso pls feel free to go for your interview13:55
*** yinweimac has quit IRC14:06
*** gampel has joined #openstack-smaug14:31
openstackgerritMerged openstack/smaug: basic protection service: Implement a runnable service  https://review.openstack.org/26159015:25
*** gampel has quit IRC15:39
openstackgerritSaggi Mizrahi proposed openstack/smaug: Pluggable protection provider doc  https://review.openstack.org/26226416:35
*** gampel has joined #openstack-smaug23:22
*** gampel has quit IRC23:48

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