<div dir="ltr">Thank you very much for the detailed explanation. We will look for another way to determine master/slave status of this application then.</div><div class="gmail_extra"><br><div class="gmail_quote">On 20 September 2017 at 09:20, Tomas Jelinek <span dir="ltr">&lt;<a href="mailto:tojeline@redhat.com" target="_blank">tojeline@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Dne 20.9.2017 v 09:03 Tomas Jelinek napsal(a):<span class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
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 [1], which systemd resources don&#39;t.<br>
<br>
# pcs resource create test systemd:postfix<br>
# pcs resource master test<br>
# pcs cluster verify -V<br>
    error: native_unpack:        Resource test:0 is of type systemd and therefore cannot be used as a master/slave resource<br>
    error: create_child_clone:   Failed unpacking resource test<br>
    error: unpack_resources:     Failed unpacking master test-master<br>
Errors found during check: config not valid<br>
<br>
You need to use an ocf resource agent (with promote and demote actions implemented) for your resource for this to work.<br>
<br>
Because the resource cannot be unpacked by pacemaker, it is not shown in the &quot;pcs status&quot; output - pcs doesn&#39;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. [2]<br>
<br>
The resource may not be running but it is still defined in the configuration:<br>
# pcs resource --full<br>
  Master: test-master<br>
   Resource: test (class=systemd type=postfix)<br>
    Operations: monitor interval=60 timeout=100 (test-monitor-interval-60)<br>
                start interval=0s timeout=100 (test-start-interval-0s)<br>
                stop interval=0s timeout=100 (test-stop-interval-0s)<br>
<br>
That&#39;s why you get an error that the id already exists.<br>
<br>
<br>
I&#39;m going to file a bug against pcs so it won&#39;t be possible to master/slave systemd resources as it is not supported anyway.<br>
</blockquote>
<br>
</span><a href="https://bugzilla.redhat.com/show_bug.cgi?id=1493416" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/sh<wbr>ow_bug.cgi?id=1493416</a><div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
Tomas<br>
<br>
[1]: <a href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#_requirements_for_multi_state_resource_agents" rel="noreferrer" target="_blank">http://clusterlabs.org/doc/en-<wbr>US/Pacemaker/1.1-pcs/html-sing<wbr>le/Pacemaker_Explained/index.<wbr>html#_requirements_for_multi_<wbr>state_resource_agents</a> <br>
[2]: <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1447951" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/sh<wbr>ow_bug.cgi?id=1447951</a><br>
<br>
<br>
Dne 19.9.2017 v 17:13 Tiemen Ruiten napsal(a):<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
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:<br>
<br>
pcs resource create ivr systemd:japp@ivr - works, the service is started on one of the nodes.<br>
pcs resource master ivr-master ivr - doesn&#39;t work as expected: the service is stopped and the output of pcs resource show doesn&#39;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.<br>
<br>
pacemaker-libs-1.1.16-12.el7_4<wbr>.2.x86_64<br>
pacemaker-cluster-libs-1.1.16-<wbr>12.el7_4.2.x86_64<br>
pacemaker-1.1.16-12.el7_4.2.x8<wbr>6_64<br>
pacemaker-cli-1.1.16-12.el7_4.<wbr>2.x86_64<br>
corosynclib-2.4.0-9.el7_4.2.x8<wbr>6_64<br>
corosync-2.4.0-9.el7_4.2.x86_6<wbr>4<br>
<br>
Am I doing something wrong?<br>
<br>
-- <br>
Tiemen Ruiten<br>
Systems Engineer<br>
R&amp;D Media<br>
<br>
<br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/m<wbr>ailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc<wbr>/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
</blockquote>
<br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/m<wbr>ailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc<wbr>/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
</blockquote>
<br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/m<wbr>ailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/doc<wbr>/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Tiemen Ruiten<br>Systems Engineer<br>R&amp;D Media<br></div></div>
</div>