PCS state module: feature set for creating master slave resources #67452
Replies: 5 comments
-
I ran into the same problem with PCS when I tried to do a more advanced configuration. I put together a working solution, then thought to look and see if anybody else had raised this issue, which I thank you for filing. As you pointed out, the 'resource_present' function can be easily repurposed to do this, with only a couple of minor changes. I named the new function 'master_present' in my solution for clarity. PCS uses the command 'master' to indicate the creation of a 'master/slave' resource, but this type of resource is also known as 'multi-state' or 'ms.' The PCS resource command defines 4 types of resource that can be created: 'resource' So we should add corresponding 'group_present' and 'clone_present' functions as well as 'master_present'. I will take a look at that also. |
Beta Was this translation helpful? Give feedback.
-
I fully tested a working pillar/state definition that builds a nested LVM DRBD resource and uses the master_present function. I tried to hack in a 'group add' function and met with partial success, but the full functionality is not there, it will require more work. |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Beta Was this translation helpful? Give feedback.
-
Thanks for reminding me bot, I was hung up on a different DRBD issue and resolved that recently, I'll repull and reintegrate. |
Beta Was this translation helpful? Give feedback.
-
Thank you for updating this issue. It is no longer marked as stale. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description of Issue/Question
Change PCS modules/state module so, that it is possible to do
Setup
Requirements:
PCS is installed, pcs service is started.
there is a master / slave compatible resource. eg DRBD
pcs command:
adjust the Definition resource_present so that you can specify the create value in _item_present. "create = master"
or better write a separate Definition master_salve_present
Adaptation to the salt/states/pcs.py
Add master slave resources to your cluster from the resource drbdname and override the default create with master
Or with seperate Definition master_salve_present
Beta Was this translation helpful? Give feedback.
All reactions