[ClusterLabs] can't create master/slave resource
tojeline at redhat.com
Wed Sep 20 03:20:27 EDT 2017
Dne 20.9.2017 v 09:03 Tomas Jelinek napsal(a):
> systemd resources cannot be used as master/slave resources. In order to
> use a resource as a master/slave, the resource must support promote and
> demote actions , which systemd resources don't.
> # pcs resource create test systemd:postfix
> # pcs resource master test
> # pcs cluster verify -V
> error: native_unpack: Resource test:0 is of type systemd and
> therefore cannot be used as a master/slave resource
> error: create_child_clone: Failed unpacking resource test
> error: unpack_resources: Failed unpacking master test-master
> Errors found during check: config not valid
> You need to use an ocf resource agent (with promote and demote actions
> implemented) for your resource for this to work.
> Because the resource cannot be unpacked by pacemaker, it is not shown in
> the "pcs status" output - pcs doesn't get any info about it from
> pacemaker. This issue has been already discussed. Pacemaker will provide
> info when such errors occur so pcs will be able to display it. 
> The resource may not be running but it is still defined in the
> # pcs resource --full
> Master: test-master
> Resource: test (class=systemd type=postfix)
> Operations: monitor interval=60 timeout=100 (test-monitor-interval-60)
> start interval=0s timeout=100 (test-start-interval-0s)
> stop interval=0s timeout=100 (test-stop-interval-0s)
> That's why you get an error that the id already exists.
> I'm going to file a bug against pcs so it won't be possible to
> master/slave systemd resources as it is not supported anyway.
> : https://bugzilla.redhat.com/show_bug.cgi?id=1447951
> Dne 19.9.2017 v 17:13 Tiemen Ruiten napsal(a):
>> We have a 3-node cluster (CentOS 7.4) with several systemd resources
>> configured. One of them I would like to create as a master/slave
>> resource, so following the RedHat documentation:
>> pcs resource create ivr systemd:japp at ivr - works, the service is
>> started on one of the nodes.
>> pcs resource master ivr-master ivr - doesn't work as expected: the
>> service is stopped and the output of pcs resource show doesn't list it
>> anymore. However, if I try the command again, I get an error saying
>> the resource ivr already exists! I have to delete the resource and
>> recreate it to get the service to run.
>> Am I doing something wrong?
>> Tiemen Ruiten
>> Systems Engineer
>> R&D Media
>> Users mailing list: Users at clusterlabs.org
>> Project Home: http://www.clusterlabs.org
>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> Bugs: http://bugs.clusterlabs.org
> Users mailing list: Users at clusterlabs.org
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
More information about the Users