On Tue, Dec 13, 2011 at 9:40 AM, Reid, Mike <mbr...@thepei.com> wrote: > I've been doing a lot of testing while I've been learning > Pacemaker/Heartbeat, DRBD, OCFS2, etc (Nginx, PHP-FPM, Apache…) Below I've > attached my working CIB, but I worry I am missing something obvious (or > perhaps going about it incorrectly altogether): It seems I cannot start the > cluster as a single node, and sometimes if the other node is having issues, > the functioning node does not mount the file system, etc….…until I've set > the other node to "Standby", restart, etc. Shouldn't I be able to run on a > single node with HA? I presume I've not configured something correctly, > possibly I'm using "clone" incorrectly based on my needs?
This looks suspicious: primitive resST-NULL stonith:null We're not going to do anything until we've fenced the second node. So depending on what this does, it might explain what you're seeing. > > Basically, for this two-node web server cluster, I'm running a OCFS2 > Primary/Primary DRBD, with Nginx + PHP-FPM / Apache. I need a little help > confirming if the CIB configuration below is the appropriate way to handle > this: As long as one of the node's DRBD is UpToDate (Primary), then ideally > I'd be able to mount the OCFS2 Filesystem (resFS), start PHP-FPM (resPHP), > start NGINX (resPROXY), and then Apache (resAPACHE) and handle web traffic. > Don't worry, not storing any access logs or sessions in DRBD, I'm using > local disk + memcached for that. > > Is my usage of clone / order correct here, or is that perhaps what's > blocking me from running on a single node more reliably? …I've been able to > do it by going from a working cluster to setting one node the "standby" or > simulating a power fault, however I haven't been able to simply start a > single node and have work as described above. > > Software: > OS: Ubuntu 10.10 (Maverick) / Kernel: 2.6.35 > Corosync 1.2.1 > DRBD 8.3.10 > OCFS2: v1.5.0 > > > Pacemakr config / CIB: > > node MACHINE1 \ > attributes standby="off" > node MACHINE2 \ > attributes standby="off" > primitive resAPACHE ocf:heartbeat:apache \ > params configfile="/usr/local/apache/conf/httpd.conf" \ > op monitor interval="1min" \ > op start interval="0" timeout="40" \ > op stop interval="0" timeout="60" > primitive resDLM ocf:pacemaker:controld \ > op monitor interval="120s" > primitive resDRBD ocf:linbit:drbd \ > params drbd_resource="repdata" \ > operations $id="resDRBD-operations" \ > op monitor interval="20s" role="Master" timeout="120s" \ > op monitor interval="30s" role="Slave" timeout="120s" > primitive resFS ocf:heartbeat:Filesystem \ > params device="/dev/drbd/by-res/repdata" directory="/data" > fstype="ocfs2" \ > op monitor interval="120s" > primitive resO2CB ocf:pacemaker:o2cb \ > op monitor interval="120s" > primitive resPHP ocf:heartbeat:anything \ > params binfile="/usr/local/sbin/php-fpm" > cmdline_options="--fpm-config /usr/local/etc/php-fpm.conf" > pidfile="/var/run/php-fpm.pid" \ > op start interval="0" timeout="20" \ > op stop interval="0" timeout="30" \ > op monitor interval="20" \ > meta target-role="Started" > primitive resPROXY ocf:heartbeat:nginx \ > params conffile="/etc/nginx/nginx.conf" \ > op monitor interval="60s" \ > op start interval="0" timeout="40" \ > op stop interval="0" timeout="60" > primitive resST-NULL stonith:null \ > params hostlist="MACHINE1 MACHINE2" > ms msDRBD resDRBD \ > meta resource-stickines="100" notify="true" master-max="2" > interleave="true" > clone cloneDLM resDLM \ > meta globally-unique="false" interleave="true" > clone cloneFS resFS \ > meta interleave="true" ordered="true" target-role="Started" > clone cloneHTTPD resAPACHE \ > meta globally-unique="false" interleave="true" ordered="true" > target-role="Started" > clone cloneO2CB resO2CB \ > meta globally-unique="false" interleave="true" > clone clonePHP resPHP \ > meta globally-unique="false" interleave="true" ordered="true" > target-role="Started" > clone clonePROXY resPROXY \ > meta globally-unique="false" interleave="true" ordered="true" > target-role="Started" > clone fencing resST-NULL > colocation colDLMDRBD inf: cloneDLM msDRBD:Master > colocation colFSO2CB inf: cloneFS cloneO2CB > colocation colO2CBDLM inf: cloneO2CB cloneDLM > order ordDLMO2CB inf: cloneDLM cloneO2CB > order ordDRBDDLM inf: msDRBD:promote cloneDLM > order ordO2CBFS inf: cloneO2CB cloneFS > order ordPHP inf: cloneFS clonePHP > order ordPROXY inf: clonePHP clonePROXY > order ordWEB inf: cloneFS cloneHTTPD > property $id="cib-bootstrap-options" \ > dc-version="1.0.9-unknown" \ > cluster-infrastructure="openais" \ > stonith-enabled="true" \ > no-quorum-policy="ignore" \ > expected-quorum-votes="2" > > > > > NOTE: Please disregard stonith:null usage in this example… > > > Any feedback or suggestions would be highly appreciated! > > > _______________________________________________ > Pacemaker mailing list: Pacemaker@oss.clusterlabs.org > http://oss.clusterlabs.org/mailman/listinfo/pacemaker > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > Bugs: http://bugs.clusterlabs.org > _______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org