LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   pacemaker starting resources in disorder (http://www.linuxquestions.org/questions/linux-server-73/pacemaker-starting-resources-in-disorder-4175435353/)

eantoranz 11-02-2012 03:28 PM

pacemaker starting resources in disorder
 
Hi!

I have these pacemaker experiment going on.

I have 5 resources that have to move between 2 servers (all must run on the same server, by the way):
- Floating IP
- SAN resource (postgres data_directory)
- postgres
- pgbouncer
- apache2

I have these rules set in pacemaker:
Code:


order apache_after_pgbouncer inf: apache:start pgbouncer:start
order mount_after_ip inf: datapostgres:start ip_flotante:start
order pgbouncer_after_postgres inf: pgbouncer:start postgres:start
order postgres_after_mount inf: postgres:start datapostgres:start

Why is postgres started before mounting or setting up floating IP?
Code:

Nov  2 15:41:45 cluster1 crmd: [9554]: info: do_lrm_rsc_op: Performing key=1:43:0:146c57e8-9df9-485a-bcb4-213806636ef1 op=pgbouncer_stop_0 )
Nov  2 15:41:45 cluster1 lrmd: [9551]: info: rsc:pgbouncer:7: stop
Nov  2 15:41:45 cluster1 lrmd: [9631]: WARN: For LSB init script, no additional parameters are needed.
Nov  2 15:41:45 cluster1 lrmd: [9551]: info: RA output: (pgbouncer:stop:stdout)  * Stopping pgbouncer
Nov  2 15:41:45 cluster1 lrmd: [9551]: info: RA output: (pgbouncer:stop:stdout)    ...done.
Nov  2 15:41:45 cluster1 crmd: [9554]: info: process_lrm_event: LRM operation pgbouncer_stop_0 (call=7, rc=0, cib-update=12, confirmed=true) ok
Nov  2 15:41:47 cluster1 crmd: [9554]: info: do_lrm_rsc_op: Performing key=12:43:0:146c57e8-9df9-485a-bcb4-213806636ef1 op=apache_start_0 )
Nov  2 15:41:47 cluster1 lrmd: [9551]: info: rsc:apache:8: start
Nov  2 15:41:47 cluster1 lrmd: [9632]: WARN: For LSB init script, no additional parameters are needed.
Nov  2 15:41:47 cluster1 lrmd: [9551]: info: RA output: (apache:start:stdout)  * Starting web server apache2
Nov  2 15:41:47 cluster1 lrmd: [9551]: info: RA output: (apache:start:stderr) apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
Nov  2 15:41:47 cluster1 lrmd: [9551]: info: RA output: (apache:start:stdout)    ...done.
Nov  2 15:41:47 cluster1 crmd: [9554]: info: process_lrm_event: LRM operation apache_start_0 (call=8, rc=0, cib-update=13, confirmed=true) ok
Nov  2 15:41:47 cluster1 crmd: [9554]: info: do_lrm_rsc_op: Performing key=10:43:0:146c57e8-9df9-485a-bcb4-213806636ef1 op=pgbouncer_start_0 )
Nov  2 15:41:47 cluster1 lrmd: [9551]: info: rsc:pgbouncer:9: start
Nov  2 15:41:47 cluster1 lrmd: [9641]: WARN: For LSB init script, no additional parameters are needed.
Nov  2 15:41:48 cluster1 lrmd: [9551]: info: RA output: (pgbouncer:start:stdout)  * Starting pgbouncer
Nov  2 15:41:48 cluster1 lrmd: [9551]: info: RA output: (pgbouncer:start:stdout)    ...done.
Nov  2 15:41:48 cluster1 crmd: [9554]: info: process_lrm_event: LRM operation pgbouncer_start_0 (call=9, rc=0, cib-update=14, confirmed=true) ok
Nov  2 15:41:48 cluster1 crmd: [9554]: info: do_lrm_rsc_op: Performing key=8:43:0:146c57e8-9df9-485a-bcb4-213806636ef1 op=postgres_start_0 )
Nov  2 15:41:48 cluster1 lrmd: [9551]: info: rsc:postgres:10: start
Nov  2 15:41:48 cluster1 lrmd: [9703]: WARN: For LSB init script, no additional parameters are needed.
Nov  2 15:41:48 cluster1 lrmd: [9551]: info: RA output: (postgres:start:stdout)  * Starting PostgreSQL 8.4 database server
Nov  2 15:41:50 cluster1 lrmd: [9551]: info: RA output: (postgres:start:stdout)    ...done.
Nov  2 15:41:50 cluster1 crmd: [9554]: info: process_lrm_event: LRM operation postgres_start_0 (call=10, rc=0, cib-update=15, confirmed=true) ok
Nov  2 15:41:50 cluster1 crmd: [9554]: info: do_lrm_rsc_op: Performing key=7:43:0:146c57e8-9df9-485a-bcb4-213806636ef1 op=datapostgres_start_0 )
Nov  2 15:41:50 cluster1 lrmd: [9551]: info: rsc:datapostgres:11: start
Nov  2 15:41:51 cluster1 Filesystem[9731]: INFO: Running start for /dev/disk/by-uuid/67318124-1978-4dc7-9dd1-0eeac44baffb on /var/lib/postgresql/8.4/main
Nov  2 15:41:51 cluster1 lrmd: [9551]: info: RA output: (datapostgres:start:stderr) FATAL: Module scsi_hostadapter not found.
Nov  2 15:41:51 cluster1 kernel: [24230.022180] kjournald starting.  Commit interval 5 seconds
Nov  2 15:41:51 cluster1 crmd: [9554]: info: process_lrm_event: LRM operation datapostgres_start_0 (call=11, rc=0, cib-update=16, confirmed=true) ok
Nov  2 15:41:51 cluster1 kernel: [24230.036415] EXT3 FS on sdb5, internal journal
Nov  2 15:41:51 cluster1 kernel: [24230.036421] EXT3-fs: mounted filesystem with ordered data mode.
Nov  2 15:41:51 cluster1 crmd: [9554]: info: do_lrm_rsc_op: Performing key=6:43:0:146c57e8-9df9-485a-bcb4-213806636ef1 op=ip_flotante_start_0 )
Nov  2 15:41:51 cluster1 lrmd: [9551]: info: rsc:ip_flotante:12: start
Nov  2 15:41:51 cluster1 IPaddr2[9783]: INFO: ip -f inet addr add 192.168.55.200/24 brd 192.168.55.255 dev eth3
Nov  2 15:41:51 cluster1 IPaddr2[9783]: INFO: ip link set eth3 up
Nov  2 15:41:51 cluster1 IPaddr2[9783]: INFO: /usr/lib/heartbeat/send_arp -i 200 -r 5 -p /var/run/heartbeat/rsctmp/send_arp/send_arp-192.168.55.200 eth3 192.168.55.200 auto not_used not_used
Nov  2 15:41:51 cluster1 crmd: [9554]: info: process_lrm_event: LRM operation ip_flotante_start_0 (call=12, rc=0, cib-update=17, confirmed=true) ok

This is pacemaker/corosync from ubuntu 10.04

Thanks in advance.

PS As a matter of fact, there could be an easier way to tell pacemaker the order in which I want to start the resources? (and in reverse when stopping them)?

Starting:
ip -> mount -> postgres -> pgbouncer -> apache

Stopping
apache -> pgbouncer -> postgres -> mount -> ip

eantoranz 11-02-2012 03:54 PM

Apparently a group took care of the two problems:
- resource start order
- keeping them together on the same host

So no more colocation or order rules, just a simple groop one:

Code:

group todo_junto ip_flotante datapostgres postgres pgbouncer apache


All times are GMT -5. The time now is 03:29 PM.