Re: [ClusterLabs] Parallel execution of resources in resource group
On Fri, 2020-05-08 at 20:47 +0200, Kab Naj wrote: > Hello, > > thank you very much for possible alternatives. > I still prefer if group unordered resources were possible, but > probably there was no demand for it. > > I understand that in all three provided options I wouldn't use > resource groups at all. Correct > In option 2 - "all with A" trick, I would use A as element to move > the whole "group". > In option 3 - I would use a tag as reference the whole "group", > right? Correct > In pcs implementation, can I move a "group" by naming a tag of > ordering or colocation resource sets ? Not with the "move" command, which looks for a particular resource to stop then start. But all "move" does is create a location constraint for the resource, and you can do that with a tag. Unfortunately the pcs constraint command currently checks that the given name exists as a resource, so you can't create the constraint that way. But you could use pcs cluster edit or cibadmin to add the XML directly. Instead of: pcs resource move rsc1 or equivalently with the pacemaker tools crm_resource --move -r rsc1 you can add this XML to the configuration: > I will need to test the behavior of cluster while moving, clearing, > cleanup,.. > All my co-workers are used to "resource/service groups" as reference > points, so I will need to change the procedures and the way of > thinking. > > Regards > > Jan > > > On Thu, May 7, 2020 at 7:04 PM Ken Gaillot > wrote: > > Hi, > > > > You have a few alternatives to groups. > > > > 1 - You can configure independent colocation constraints for each > > resource. E.g. "B with A", "C with B", etc. This has the advantage > > that > > if you just want all the resources on the same node, you could > > colocate > > all later resources with the first one ("B with A", "C with A", > > etc.), > > so that there's no dependency between later resources (only the > > first > > resource has to be active for any of the others to be active, > > taking > > into account any ordering constraints). > > > > 2 - You can use resource sets in colocation constraints. You can do > > the > > "all with A" trick with this method using two resource sets, one > > with > > just A and the other non-sequential with all the rest. See: > > > > https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#s-resource-sets-colocation > > > > 3 - You can use tags, and use a tag in a colocation constraint > > resource > > set. The main advantage of this approach would be if you want to > > use > > the logical group in more than one place. See: > > > > https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#_tagging_configuration_elements > > > > > > On Thu, 2020-05-07 at 18:06 +0200, Kab Naj wrote: > > > Hello, > > > > > > I was trying to set parallel execution of resources in resource > > > group, but I was not successful. > > > The goal was to have resources within one resource group in one > > > location but order of resources would rely on Ordering > > constraints, > > > thus possibly resources could run in parallel if constraints > > allowed > > > it. > > > > > > By default it is not the case and resources run one by one in > > their > > > order of resource group. > > > I found the option that is designed to be used in resource clones > > - > > > "ordered" > > > ordered - Should the copies be started in series (instead of in > > > parallel). Allowed values: false, true. > > > > > > I tried to use this option in my resource group by setting > > > "ordered=false" > > > Resources could be started in parallel then, but I encountered > > > strange and unpredictable behavior when some resource start was > > not > > > successful. > > > > > > I understand that "ordered=false" is documented to be used only > > in > > > resource clones, not in resource groups. > > > > > > Do we have other option that resources within resource group > > would > > > start in parallel and rely on Ordering constraints, not their > > > resource group order? > > > We have many logical resource groups, so we don't want to have > > > resources without being added to any resource group. > > > > > > Regards > > > > > > Jan > > ___ > > Manage your subscription: > > https://lists.clusterlabs.org/mailman/listinfo/users > > > > ClusterLabs home: https://www.clusterlabs.org/ -- Ken Gaillot ___ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/
Re: [ClusterLabs] Parallel execution of resources in resource group
Hello, thank you very much for possible alternatives. I still prefer if group unordered resources were possible, but probably there was no demand for it. I understand that in all three provided options I wouldn't use resource groups at all. In option 2 - "all with A" trick, I would use A as element to move the whole "group". In option 3 - I would use a tag as reference the whole "group", right? In pcs implementation, can I move a "group" by naming a tag of ordering or colocation resource sets ? I will need to test the behavior of cluster while moving, clearing, cleanup,.. All my co-workers are used to "resource/service groups" as reference points, so I will need to change the procedures and the way of thinking. Regards Jan On Thu, May 7, 2020 at 7:04 PM Ken Gaillot wrote: > Hi, > > You have a few alternatives to groups. > > 1 - You can configure independent colocation constraints for each > resource. E.g. "B with A", "C with B", etc. This has the advantage that > if you just want all the resources on the same node, you could colocate > all later resources with the first one ("B with A", "C with A", etc.), > so that there's no dependency between later resources (only the first > resource has to be active for any of the others to be active, taking > into account any ordering constraints). > > 2 - You can use resource sets in colocation constraints. You can do the > "all with A" trick with this method using two resource sets, one with > just A and the other non-sequential with all the rest. See: > > > https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#s-resource-sets-colocation > > 3 - You can use tags, and use a tag in a colocation constraint resource > set. The main advantage of this approach would be if you want to use > the logical group in more than one place. See: > > > https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#_tagging_configuration_elements > > > On Thu, 2020-05-07 at 18:06 +0200, Kab Naj wrote: > > Hello, > > > > I was trying to set parallel execution of resources in resource > > group, but I was not successful. > > The goal was to have resources within one resource group in one > > location but order of resources would rely on Ordering constraints, > > thus possibly resources could run in parallel if constraints allowed > > it. > > > > By default it is not the case and resources run one by one in their > > order of resource group. > > I found the option that is designed to be used in resource clones - > > "ordered" > > ordered - Should the copies be started in series (instead of in > > parallel). Allowed values: false, true. > > > > I tried to use this option in my resource group by setting > > "ordered=false" > > Resources could be started in parallel then, but I encountered > > strange and unpredictable behavior when some resource start was not > > successful. > > > > I understand that "ordered=false" is documented to be used only in > > resource clones, not in resource groups. > > > > Do we have other option that resources within resource group would > > start in parallel and rely on Ordering constraints, not their > > resource group order? > > We have many logical resource groups, so we don't want to have > > resources without being added to any resource group. > > > > Regards > > > > Jan > -- > Ken Gaillot > > ___ > Manage your subscription: > https://lists.clusterlabs.org/mailman/listinfo/users > > ClusterLabs home: https://www.clusterlabs.org/ > ___ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/
Re: [ClusterLabs] Parallel execution of resources in resource group
Hi, You have a few alternatives to groups. 1 - You can configure independent colocation constraints for each resource. E.g. "B with A", "C with B", etc. This has the advantage that if you just want all the resources on the same node, you could colocate all later resources with the first one ("B with A", "C with A", etc.), so that there's no dependency between later resources (only the first resource has to be active for any of the others to be active, taking into account any ordering constraints). 2 - You can use resource sets in colocation constraints. You can do the "all with A" trick with this method using two resource sets, one with just A and the other non-sequential with all the rest. See: https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#s-resource-sets-colocation 3 - You can use tags, and use a tag in a colocation constraint resource set. The main advantage of this approach would be if you want to use the logical group in more than one place. See: https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#_tagging_configuration_elements On Thu, 2020-05-07 at 18:06 +0200, Kab Naj wrote: > Hello, > > I was trying to set parallel execution of resources in resource > group, but I was not successful. > The goal was to have resources within one resource group in one > location but order of resources would rely on Ordering constraints, > thus possibly resources could run in parallel if constraints allowed > it. > > By default it is not the case and resources run one by one in their > order of resource group. > I found the option that is designed to be used in resource clones - > "ordered" > ordered - Should the copies be started in series (instead of in > parallel). Allowed values: false, true. > > I tried to use this option in my resource group by setting > "ordered=false" > Resources could be started in parallel then, but I encountered > strange and unpredictable behavior when some resource start was not > successful. > > I understand that "ordered=false" is documented to be used only in > resource clones, not in resource groups. > > Do we have other option that resources within resource group would > start in parallel and rely on Ordering constraints, not their > resource group order? > We have many logical resource groups, so we don't want to have > resources without being added to any resource group. > > Regards > > Jan -- Ken Gaillot ___ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/
[ClusterLabs] Parallel execution of resources in resource group
Hello, I was trying to set parallel execution of resources in resource group, but I was not successful. The goal was to have resources within one resource group in one location but order of resources would rely on Ordering constraints, thus possibly resources could run in parallel if constraints allowed it. By default it is not the case and resources run one by one in their order of resource group. I found the option that is designed to be used in resource clones - "ordered" ordered - Should the copies be started in series (instead of in parallel). Allowed values: false, true. I tried to use this option in my resource group by setting "ordered=false" Resources could be started in parallel then, but I encountered strange and unpredictable behavior when some resource start was not successful. I understand that "ordered=false" is documented to be used only in resource clones, not in resource groups. Do we have other option that resources within resource group would start in parallel and rely on Ordering constraints, not their resource group order? We have many logical resource groups, so we don't want to have resources without being added to any resource group. Regards Jan ___ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/