[ClusterLabs] notify action is not called for the docker bundle resources

Ken Gaillot kgaillot at redhat.com
Wed Aug 9 11:48:52 EDT 2017


On Fri, 2017-07-28 at 20:24 +0530, Numan Siddique wrote:
> Hi,
> 
> 
> I am creating a redis bundle resource (master - slave mode). It is
> creating successfully, but I am noticing that "notify" action is not
> called by pacemaker_remoted.
> 
> 
> Below are the steps I used to create the redis bundle resource [1].
> The sosreport can be found here - [2]
> 
> 
> 
> I am seeing the same behaviour when I create the "ovndb-servers" [3]
> bundle resource (master/slave) as well. 
> In the case of ovndb-servers OCF resource, we rely on notify action to
> change the mode of the OVN Db server to active or backup.
>  
> Can some one please help me on why notify action is not called ? Is
> there something wrong in my setup ? Or bundle resources lack the
> support to call notify actions ?

Clone notification support for bundles was added in commit b632ef0a in
the current upstream master branch. It hasn't made it into an upstream
release yet, but is expected to be in the next one.

It was backported to the RHEL 7.4 GA release, which is 1.1.16-12.el7.
The pre-release shown in your logs (1.1.16-10.el7-94ff4df) doesn't have
it.

> [1] -
> 
> 
> # pcs cluster cib tmp-cib.xml
> # cp tmp-cib.xml tmp-cib.xml.deltasrc
> # pcs -f tmp-cib.xml resource bundle create tredis-bundle \
>     container docker
> image=192.168.24.1:8787/tripleoupstream/centos-binary-redis:latest
> masters=1 network=host \
>     options="--user=root --log-driver=journald -e
> KOLLA_CONFIG_STRATEGY=COPY_ALWAYS" replicas=3
> run-command="/bin/bash /usr/local/bin/kolla_start" \
>     network control-port=3124 \
>     storage-map id=t1
> source-dir=/var/lib/kolla/config_files/redis.json
> target-dir=/var/lib/kolla/config_files/config.json options=ro\
>     storage-map id=t2
> source-dir=/var/lib/config-data/puppet-generated/redis/
> target-dir=/var/lib/kolla/config_files/src options=ro\
>     storage-map id=t3 source-dir=/etc/hosts target-dir=/etc/hosts
> options=ro\
>     storage-map id=t4 source-dir=/etc/localtime
> target-dir=/etc/localtime options=ro\
>     storage-map id=t5 source-dir=/var/lib/redis
> target-dir=/var/lib/redis options=rw\
>     storage-map id=t6 source-dir=/var/log/redis
> target-dir=/var/log/redis options=rw\
>     storage-map id=t7 source-dir=/var/run/redis
> target-dir=/var/run/redis options=rw \
>     storage-map id=t8 source-dir=/usr/lib/ocf/
> target-dir=/usr/lib/ocf/ options=rw \
>     storage-map id=t9 source-dir=/etc/pki/ca-trust/extracted
> target-dir=/etc/pki/ca-trust/extracted options=ro \
>     storage-map id=t10 source-dir=/etc/pki/tls/certs/ca-bundle.crt
> target-dir=/etc/pki/tls/certs/ca-bundle.crt options=ro \
>     storage-map id=t11
> source-dir=/etc/pki/tls/certs/ca-bundle.trust.crt
> target-dir=/etc/pki/tls/certs/ca-bundle.trust.crt options=ro \
>     storage-map id=t12 source-dir=/etc/pki/tls/cert.pem
> target-dir=/etc/pki/tls/cert.pem options=ro
>     storage-map id=t13 source-dir=/dev/log target-dir=/dev/log
> options=rw
>     storage-map id=t14 source-dir=/etc/corosync
> target-dir=/etc/corosync options=rw\
> 
> 
> # pcs -f tmp-cib.xml resource create tredis ocf:heartbeat:redis
> wait_last_known_master=true meta interleave=true notify=true
> ordered=true \
>    bundle tredis-bundle
> 
> 
> # pcs cluster cib-push tmp-cib.xml diff-against=tmp-cib.xml.deltasrc
> 
> 
> # pcs status
> Cluster name: tripleo_cluster
> Stack: corosync
> Current DC: overcloud-controller-2 (version 1.1.16-10.el7-94ff4df) -
> partition with quorum
> Last updated: Fri Jul 28 14:46:10 2017
> Last change: Fri Jul 28 13:22:53 2017 by root via cibadmin on
> overcloud-controller-0
> 
> 
> 9 nodes configured
> 15 resources configured
> 
> 
> Online: [ overcloud-controller-0 overcloud-controller-1
> overcloud-controller-2 ]
> RemoteOFFLINE: [ rabbitmq-bundle-0 rabbitmq-bundle-1 rabbitmq-bundle-2
> ]
> GuestOnline: [ tredis-bundle-0 at overcloud-controller-0
> tredis-bundle-1 at overcloud-controller-1
> tredis-bundle-2 at overcloud-controller-2 ]
> 
> 
> Full list of resources:
> 
> 
>  ip-192.168.24.8 (ocf::heartbeat:IPaddr2): Started
> overcloud-controller-0
>  ip-10.0.0.6 (ocf::heartbeat:IPaddr2): Started overcloud-controller-1
>  ip-172.16.2.8 (ocf::heartbeat:IPaddr2): Started
> overcloud-controller-2
>  ip-172.16.2.13 (ocf::heartbeat:IPaddr2): Started
> overcloud-controller-0
>  ip-172.16.1.11 (ocf::heartbeat:IPaddr2): Started
> overcloud-controller-1
>  ip-172.16.3.8 (ocf::heartbeat:IPaddr2): Started
> overcloud-controller-2
>  Docker container set: tredis-bundle
> [192.168.24.1:8787/tripleoupstream/centos-binary-redis:latest]
>    tredis-bundle-0 (ocf::heartbeat:redis): Master
> overcloud-controller-0
>    tredis-bundle-1 (ocf::heartbeat:redis): Slave
> overcloud-controller-1
>    tredis-bundle-2 (ocf::heartbeat:redis): Slave
> overcloud-controller-2
> 
> 
> 
> 
> contents of /var/lib/kolla/config_files/redis.json
> ------------------------------------------------------------
> {"config_files": [{"dest": "/etc/libqb/force-filesystem-sockets",
> "owner": "root", "perm": "0644", "source": "/dev/null"}, {"dest": "/",
> "merge": true, "optional": true, "source":
> "/var/lib/kolla/config_files/src/*", "preserve_properties": true}],
> "command": "/usr/sbin/pacemaker_remoted", "permissions": [{"owner":
> "redis:redis", "path": "/var/run/redis", "recurse": true}, {"owner":
> "redis:redis", "path": "/var/lib/redis", "recurse": true}, {"owner":
> "redis:redis", "path": "/var/log/redis", "recurse": true}]}
> 
> 
> 
> Please note the docker image for redis can be pulled as
> "docker pull tripleoupstream/centos-binary-redis"
> 
> 
> 
> 
> [2] - https://github.com/numansiddique/pcs_logs
> 
> 
> [3]
> - https://github.com/openvswitch/ovs/blob/master/ovn/utilities/ovndb-servers.ocf
> 
> 
> 
> 
> 
> 
> Thanks
> Numan
> 
> 
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://lists.clusterlabs.org/mailman/listinfo/users
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org

-- 
Ken Gaillot <kgaillot at redhat.com>








More information about the Users mailing list