Red Hat Bugzilla – Bug 1272570
clufter does not add resource operations (monitor, start) to converted resource into cib.xml
Last modified: 2016-10-11 15:34:20 EDT
Created attachment 1083797 [details] configuration file cluster.conf with apache resource Description of problem: Converted resource has no start/monitor operations in cib.xml. Version-Release number of selected component (if applicable): clufter-cli-0.50.4-1.el7.noarch How reproducible: always Steps to Reproduce: 1. Convert attached configuration file with apache resource using clufter. 2. Check the resulting cib.xml file for operations. Actual results: The resulting cib file contains only stop operation: <operations> <op id="RESOURCE-apache-webserver-OP-stop" name="stop" interval="0" timeout="0s"/> </operations> Expected results: The resulting cib file contains start, stop and monitor operations: <operations> <op id="webserver-start-interval-0s" interval="0s" name="start" timeout="40s"/> <op id="webserver-stop-interval-0s" interval="0s" name="stop" timeout="60s"/> <op id="webserver-monitor-interval-10" interval="10" name="monitor" timeout="20s"/> </operations> Additional info: http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#_resource_operations https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html-single/High_Availability_Add-On_Reference/index.html#s1-resourceoperate-HAAR
Thanks for the report. Should be fixed upstream as of https://pagure.io/clufter/db80d13dd3dffbcda6a4c5aac2c9c7e5605efac4 This is planned for new (soonish) release.
Note this is addressed in RHEL 6.8 through rebase ([bug 1269964]) + in RHEL 7.3 also through rebase ([bug 1343661]).
[root@virt-101 ~]# rpm -q clufter-cli clufter-cli-0.59.5-2.el7.noarch ccs2pcs-flatirion/ccs2pcs-needle for apache and ip resource: [root@virt-101 ~]# cat cluster-apache.conf <?xml version="1.0"?> <cluster name="test" config_version="1"> <clusternodes> </clusternodes> <fencedevices> </fencedevices> <rm> <failoverdomains/> <resources> <ip address="10.34.71.228/23" monitor_link="yes" sleeptime="10"/> <apache config_file="conf/httpd.conf" name="webserver" server_root="/etc/httpd" shutdown_wait="0"/> </resources> <service autostart="1" name="webserver" recovery="relocate"> <ip ref="10.34.71.228/23"/> <apache ref="webserver"/> </service> </rm> </cluster> [root@virt-101 ~]# clufter ccs2pcs-needle --input=cluster-apache.conf --cib=cib-apache.xml [ccs2needlexml ] xslt: WARNING: secret key used by corosync for encryption/integrity checking is, as a measure to prevent from dropping these security features entirely, stored directly in the main configuration file (totem/key), possibly readable by arbitrary system-local user [xml2simpleconfig ] output: corosync-a7363234.conf [cibcompact2cib ] xslt: NOTE: no fencing is configured hence stonith is disabled; please note, however, that this is suboptimal, especially in shared storage scenarios [cib2cibfinal ] output: cib-apache.xml [root@virt-101 ~]# clufter ccs2pcs-flatiron --input=cluster-apache.conf --cib=cib-apache-flatiron.xml [ccs-version-bump ] output: cluster-a7363234.conf [cibcompact2cib ] xslt: NOTE: no fencing is configured hence stonith is disabled; please note, however, that this is suboptimal, especially in shared storage scenarios [cib2cibfinal ] output: cib-apache-flatiron.xml [root@virt-101 ~]# diff -ur cib-apache.xml cib-apache-flatiron.xml [root@virt-101 ~]# grep monitor cib-apache.xml <op id="RESOURCE-ip-10.34.71.228_23-OP-monitor" name="monitor" interval="20s"/> <op id="RESOURCE-apache-webserver-OP-monitor" name="monitor" interval="60s"/> > OK. Both resources have a monitor operation. ccs2pcs-flatirion/ccs2pcs-needle for mysql resource: [root@virt-101 ~]# cat cluster-mysql.conf <?xml version="1.0"?> <cluster name="test" config_version="1"> <clusternodes> </clusternodes> <fencedevices> </fencedevices> <rm> <failoverdomains/> <resources/> <service name="mysql" recovery="relocate"> <mysql config_file="/etc/oh-my.cnf" listen_address="0.0.0.0" mysqld_options="--verbose" name="oh-my" shutdown_wait="34" startup_wait="12"/> </service> </rm> </cluster> [root@virt-101 ~]# clufter ccs2pcs-needle --input=cluster-mysql.conf --cib=cib-mysql.xml [ccs2needlexml ] xslt: WARNING: secret key used by corosync for encryption/integrity checking is, as a measure to prevent from dropping these security features entirely, stored directly in the main configuration file (totem/key), possibly readable by arbitrary system-local user [xml2simpleconfig ] output: corosync-fa470f0b.conf [cibcompact2cib ] xslt: NOTE: no fencing is configured hence stonith is disabled; please note, however, that this is suboptimal, especially in shared storage scenarios [cib2cibfinal ] output: cib-mysql.xml [root@virt-101 ~]# clufter ccs2pcs-flatiron --input=cluster-mysql.conf --cib=cib-mysql-flatiron.xml [ccs-version-bump ] output: cluster-fa470f0b.conf [cibcompact2cib ] xslt: NOTE: no fencing is configured hence stonith is disabled; please note, however, that this is suboptimal, especially in shared storage scenarios [cib2cibfinal ] output: cib-mysql-flatiron.xml [root@virt-101 ~]# diff -ur cib-mysql.xml cib-mysql-flatiron.xml [root@virt-101 ~]# grep monitor cib-mysql.xml <op id="RESOURCE-mysql-oh_my-OP-monitor" name="monitor" interval="60s"/> > OK. Resource has a monitor operation.