<div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">Hi all,</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap"><br></span></div><div>

<span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">My setup is as follows : RedHat 6.3 (yes, I know,this is quite old) , Pacemaker 1.1.7, Corosync 1.4.1.</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap"><br>

</span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">I noticed something that is strange because since it doesn't complies with what I read (and understood) from the following ressources :</span></div>

<div><font face="arial, sans-serif"><span style="white-space:nowrap">1. <a href="http://crmsh.nongnu.org/crm.8.html#cmdhelp_configure_order">http://crmsh.nongnu.org/crm.8.html#cmdhelp_configure_order</a></span></font></div>

<div><font face="arial, sans-serif"><span style="white-space:nowrap">2. <a href="http://doc.opensuse.org/products/draft/SLE-HA/SLE-ha-guide_sd_draft/cha.ha.manual_config.html">http://doc.opensuse.org/products/draft/SLE-HA/SLE-ha-guide_sd_draft/cha.ha.manual_config.html</a></span><br>

</font></div><div><font face="arial, sans-serif"><span style="white-space:nowrap"><br></span></font></div><div><font face="arial, sans-serif"><span style="white-space:nowrap"><br></span></font></div><div><font face="arial, sans-serif"><span style="white-space:nowrap">The strange behaviour I experience is related to ordering.</span></font></div>

<div><font face="arial, sans-serif"><span style="white-space:nowrap">Let's have this very basic case :</span></font></div><div><font face="arial, sans-serif"><span style="white-space:nowrap"><br></span></font></div><div>

<font face="arial, sans-serif"><span style="white-space:nowrap">One zookeeper process, and one PostgreSQL master. I want them to run alltogether on the master node. Since they bind on the VIP IP, I want the VIP to be started before ZK and PostgreSQL.</span></font></div>

<div><font face="arial, sans-serif"><span style="white-space:nowrap">So I setup :</span></font></div><div><font face="arial, sans-serif"><span style="white-space:nowrap"><br></span></font></div><div><div>primitive VIP73 ocf:heartbeat:IPaddr2 \</div>

<div>        params ip="192.168.73.222" broadcast="192.168.73.255" nic="eth1" cidr_netmask="24" iflabel="VIP73" \</div><div>        op monitor interval="10s" timeout="20s"</div>

</div><div><br></div><div>primitive POSTGRESQL ocf:custom:postgresql \<br></div><div><div>        params repmgr_conf="/var/lib/pgsql/repmgr/repmgr.conf" pgctl="/usr/pgsql-9.2/bin/pg_ctl" pgdata="/opt/custom/pgdata" \</div>

<div>        op start interval="0" timeout="90s" \</div><div>        op stop interval="0" timeout="60s" \</div><div>        op promote interval="0" timeout="120s" \</div>

<div>        op monitor interval="53s" role="Master" \</div><div>        op monitor interval="60s" role="Slave"</div><div><br></div><div>primitive ZK ocf:custom:zookeeper \</div><div>

        op monitor interval="5s" timeout="10s" \</div><div>        op start interval="0" timeout="10s" \</div><div>        op stop interval="0" timeout="10s"</div>

<div><br></div><div>ms MS_POSTGRESQL POSTGRESQL \</div><div>        meta clone-max="2" target-role="Started" resource-stickiness="100" notify="true"</div><div><br></div><div>I then add an ordering such as this one :</div>

<div>order VIP_last inf: VIP73 ZK MS_POSTGRESQL:promote<br></div></div><div><br></div><div>I expect the VIP to be mounted, and then ZK started, and then PostgreSQL master to be promoted. Instead, all the resources seem to be started in parallel.</div>

<div><br></div><div>Here comes a /var/log/messages extract, taken just after a corosync restart.</div><div>It can be seen at Jun 25 05:19:52 that VIP73 and POSTGRESQL are all started simultaneously.<br></div><div>Do I have something wrong here, or something I didn't understand ?</div>

<div><br></div><div><br></div><div><div><br></div><div>primitive VIP73 ocf:heartbeat:IPaddr2 \</div><div>        params ip="192.168.73.222" broadcast="192.168.73.255" nic="eth1" cidr_netmask="24" iflabel="VIP73" \</div>

<div>        op monitor interval="10s" timeout="20s"</div><div><br></div><div>primitive POSTGRESQL ocf:custom:postgresql \</div><div>        params repmgr_conf="/var/lib/pgsql/repmgr/repmgr.conf" pgctl="/usr/pgsql-9.2/bin/pg_ctl" pgdata="/opt/custom/pgdata" \</div>

<div>        op start interval="0" timeout="90s" \</div><div>        op stop interval="0" timeout="60s" \</div><div>        op promote interval="0" timeout="120s" \</div>

<div>        op monitor interval="53s" role="Master" \</div><div>        op monitor interval="60s" role="Slave"</div><div><br></div><div>primitive ZK ocf:custom:zookeeper \</div><div>

        op monitor interval="5s" timeout="10s" \</div><div>        op start interval="0" timeout="10s" \</div><div>        op stop interval="0" timeout="10s"</div>

<div>ms MS_POSTGRESQL POSTGRESQL \</div><div>        meta clone-max="2" target-role="Started" resource-stickiness="100" notify="true"</div><div><br></div><div>I then add an ordering such as this one :</div>

<div>order VIP_last inf: VIP73 ZK MS_POSTGRESQL:promote</div><div><br></div><div>I expect the VIP to be mounted, and then ZK started, and then PostgreSQL master to be promoted. Instead, all the resources seem to be started in parallel.</div>

<div><br></div><div>Here comes a /var/log/messages extract, taken just after a corosync restart.</div><div>It can be seen at Jun 25 05:19:52 that VIP73 and POSTGRESQL are all started simultaneously.</div><div>Do I have something wrong here, or something I didn't understand ?</div>

<div><br></div><div>Thank you !</div><div><br></div><div>Jun 25 05:19:52 clustera pengine[33832]:     info: determine_online_status: Node clustera is online</div><div>Jun 25 05:19:52 clustera pengine[33832]:     info: native_print: VIP73#011(ocf::heartbeat:IPaddr2):#011Stopped </div>

<div>Jun 25 05:19:52 clustera pengine[33832]:     info: clone_print:  Master/Slave Set: MS_POSTGRESQL [POSTGRESQL]</div><div>Jun 25 05:19:52 clustera pengine[33832]:     info: short_print:      Stopped: [ POSTGRESQL:0 POSTGRESQL:1 ]</div>

<div>Jun 25 05:19:52 clustera pengine[33832]:     info: native_print: ZK#011(ocf::custom:zookeeper):#011Stopped </div><div>Jun 25 05:19:52 clustera pengine[33832]:     info: native_color: Resource POSTGRESQL:1 cannot run anywhere</div>

<div>Jun 25 05:19:52 clustera pengine[33832]:     info: master_color: MS_POSTGRESQL: Promoted 0 instances of a possible 1 to master</div><div>Jun 25 05:19:52 clustera pengine[33832]:     info: RecurringOp:  Start recurring monitor (10s) for VIP73 on clustera</div>

<div>Jun 25 05:19:52 clustera pengine[33832]:     info: RecurringOp:  Start recurring monitor (60s) for POSTGRESQL:0 on clustera</div><div>Jun 25 05:19:52 clustera pengine[33832]:     info: RecurringOp:  Start recurring monitor (60s) for POSTGRESQL:0 on clustera</div>

<div>Jun 25 05:19:52 clustera pengine[33832]:     info: RecurringOp:  Start recurring monitor (5s) for ZK on clustera</div><div>Jun 25 05:19:52 clustera pengine[33832]:   notice: LogActions: Start   VIP73#011(clustera)</div>

<div>Jun 25 05:19:52 clustera pengine[33832]:   notice: LogActions: Start   POSTGRESQL:0#011(clustera)</div><div>Jun 25 05:19:52 clustera pengine[33832]:     info: LogActions: Leave   POSTGRESQL:1#011(Stopped)</div><div>
Jun 25 05:19:52 clustera pengine[33832]:   notice: LogActions: Start   ZK#011(clustera)</div>
<div><br></div><div>...</div><div>Jun 25 05:19:52 clustera crmd[33833]:     info: te_rsc_command: Initiating action 3: probe_complete probe_complete on clustera (local) - no waiting</div><div>Jun 25 05:19:52 clustera crmd[33833]:     info: te_rsc_command: Initiating action 7: start VIP73_start_0 on clustera (local)</div>

<div>Jun 25 05:19:52 clustera attrd[33831]:     info: find_hash_entry: Creating hash entry for probe_complete</div><div>Jun 25 05:19:52 clustera attrd[33831]:   notice: attrd_trigger_update: Sending flush op to all hosts for: probe_complete (true)</div>

<div>Jun 25 05:19:52 clustera lrmd: [33830]: info: rsc:VIP73:5: start</div><div>Jun 25 05:19:52 clustera attrd[33831]:   notice: attrd_perform_update: Sent update 4: probe_complete=true</div><div>Jun 25 05:19:52 clustera crmd[33833]:     info: te_rsc_command: Initiating action 9: start POSTGRESQL:0_start_0 on clustera (local)</div>

<div>Jun 25 05:19:52 clustera lrmd: [33830]: info: rsc:POSTGRESQL:0:6: start</div><div>Jun 25 05:19:52 clustera IPaddr2(VIP73)[33953]: INFO: ip -f inet addr add <a href="http://192.168.73.222/24">192.168.73.222/24</a> brd 192.168.73.255 dev eth1 label eth1:VIP73</div>

<div>Jun 25 05:19:52 clustera avahi-daemon[2065]: Registering new address record for 192.168.73.222 on eth1.IPv4.</div><div>Jun 25 05:19:52 clustera IPaddr2(VIP73)[33953]: INFO: ip link set eth1 up</div><div>Jun 25 05:19:52 clustera IPaddr2(VIP73)[33953]: INFO: /usr/lib64/heartbeat/send_arp -i 200 -r 5 -p /var/run/heartbeat/rsctmp/send_arp-192.168.73.222 eth1 192.168.73.222 auto not_used not_used</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: POSTGRESQL:0: Starting</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: ACTION=start</div><div>Jun 25 05:19:52 clustera lrmd: [33830]: info: Managed VIP73:start process 33953 exited with return code 0.</div>

<div>Jun 25 05:19:52 clustera crmd[33833]:     info: process_lrm_event: LRM operation VIP73_start_0 (call=5, rc=0, cib-update=29, confirmed=true) ok</div><div>Jun 25 05:19:52 clustera crmd[33833]:     info: te_rsc_command: Initiating action 8: monitor VIP73_monitor_10000 on clustera (local)</div>

<div>Jun 25 05:19:52 clustera lrmd: [33830]: info: rsc:VIP73:7: monitor</div><div>Jun 25 05:19:52 clustera crmd[33833]:     info: te_rsc_command: Initiating action 35: start ZK_start_0 on clustera (local)</div><div>Jun 25 05:19:52 clustera lrmd: [33830]: info: rsc:ZK:8: start</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RA_VERSION_MAJOR=1</div><div>Jun 25 05:19:52 clustera zookeeper(ZK)[34058]: INFO: [ZK] No pid file found</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RA_VERSION_MINOR=0</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_clone=0</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_clone_max=2</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_clone_node_max=1</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_globally_unique=false</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_master_max=1</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_master_node_max=1</div><div>Jun 25 05:19:52 clustera lrmd: [33830]: info: Managed VIP73:monitor process 34057 exited with return code 0.</div>

<div>Jun 25 05:19:52 clustera crmd[33833]:     info: process_lrm_event: LRM operation VIP73_monitor_10000 (call=7, rc=0, cib-update=30, confirmed=false) ok</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_name=start</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify=true</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_active_resource=</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_active_uname=</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_demote_resource=</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_demote_uname=</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_inactive_resource=POSTGRESQL:0</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: POSTGRESQL:1</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_master_resource=</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_master_uname=</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_promote_resource=</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_promote_uname=</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_slave_resource=</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_slave_uname=</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_start_resource=POSTGRESQL:0</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_start_uname=clustera</div>

<div>Jun 25 05:19:52 clustera lrmd: [33830]: info: RA output: (ZK:start:stdout) Starting zookeeper ... </div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_stop_resource=</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_notify_stop_uname=</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_CRM_meta_timeout=90000</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_crm_feature_set=3.0.6</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_pgctl=/usr/pgsql-9.2/bin/pg_ctl</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_pgdata=/opt/custom/pgdata</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESKEY_repmgr_conf=/var/lib/pgsql/repmgr/repmgr.conf</div>

<div>Jun 25 05:19:52 clustera avahi-daemon[2065]: Invalid legacy unicast query packet.</div><div>Jun 25 05:19:52 clustera avahi-daemon[2065]: Received response from host 192.168.72.1 with invalid source port 50070 on interface 'eth0.0'</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESOURCE_INSTANCE=POSTGRESQL:0</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESOURCE_PROVIDER=custom</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_RESOURCE_TYPE=postgresql</div>

<div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: OCF_ROOT=/usr/lib/ocf</div><div>Jun 25 05:19:52 clustera postgresql(POSTGRESQL:0)[33954]: INFO: Run as postgres: /usr/pgsql-9.2/bin/pg_ctl start -w -D /opt/custom/pgdata -l /var/log/custom/custom/ha/postgresql/postgres_ha.log -o '-c config_file=/opt/custom/pgdata/postgresql.conf' -o '-p 5432'</div>

<div>Jun 25 05:19:53 clustera avahi-daemon[2065]: Invalid legacy unicast query packet.</div><div>Jun 25 05:19:53 clustera avahi-daemon[2065]: Invalid legacy unicast query packet.</div><div>Jun 25 05:19:53 clustera avahi-daemon[2065]: Received response from host 192.168.72.1 with invalid source port 50070 on interface 'eth0.0'</div>

<div>Jun 25 05:19:53 clustera avahi-daemon[2065]: Received response from host 192.168.72.1 with invalid source port 50070 on interface 'eth0.0'</div><div>Jun 25 05:19:53 clustera lrmd: [33830]: info: RA output: (ZK:start:stdout) STARTED</div>

<div>Jun 25 05:19:53 clustera lrmd: [33830]: info: RA output: (ZK:start:stdout) ---------------------------------------------------------#012Starting ZK restore#012---------------------------------------------------------</div>

<div>Jun 25 05:19:53 clustera lrmd: [33830]: info: RA output: (ZK:start:stderr) ls: cannot access /var/custom/custom/ha/snapshots/zk_dump_*.xml: No such file or directory</div><div>Jun 25 05:19:53 clustera lrmd: [33830]: info: RA output: (ZK:start:stdout) [ZK]   Last snapshot :           <NONE>#012[ZK]   WARNING: Nothing to restore</div>

<div>Jun 25 05:19:53 clustera zookeeper(ZK)[34058]: INFO: [ZK] Nothing to restore</div><div>Jun 25 05:19:53 clustera lrmd: [33830]: info: RA output: (ZK:start:stdout) ---------------------------------------------------------</div>

<div>Jun 25 05:19:53 clustera lrmd: [33830]: info: Managed ZK:start process 34058 exited with return code 0.</div><div>Jun 25 05:19:53 clustera crmd[33833]:     info: process_lrm_event: LRM operation ZK_start_0 (call=8, rc=0, cib-update=31, confirmed=true) ok</div>

<div>Jun 25 05:19:53 clustera crmd[33833]:     info: te_rsc_command: Initiating action 36: monitor ZK_monitor_5000 on clustera (local)</div><div>Jun 25 05:19:53 clustera lrmd: [33830]: info: rsc:ZK:9: monitor</div><div>Jun 25 05:19:53 clustera lrmd: [33830]: info: Managed ZK:monitor process 34390 exited with return code 0.</div>

<div>Jun 25 05:19:53 clustera crmd[33833]:     info: process_lrm_event: LRM operation ZK_monitor_5000 (call=9, rc=0, cib-update=32, confirmed=false) ok</div><div>Jun 25 05:19:53 clustera postgresql(POSTGRESQL:0)[33954]: INFO: waiting for server to start.... done server started</div>

<div>Jun 25 05:19:54 clustera avahi-daemon[2065]: Received response from host 192.168.72.1 with invalid source port 50070 on interface 'eth0.0'</div><div>Jun 25 05:19:56 clustera avahi-daemon[2065]: Received response from host 192.168.72.1 with invalid source port 50070 on interface 'eth0.0'</div>

<div>Jun 25 05:19:56 clustera lrmd: [33830]: info: RA output: (VIP73:start:stderr) ARPING 192.168.73.222 from 192.168.73.222 eth1#012Sent 5 probes (5 broadcast(s))#</div></div></div>