Hi Willi,

On 2013-12-09 07:58, Willi Fehler wrote:
> Hi Chris,
> 
> I've upgraded to CentOS-6.5 with the latest version of pcs but the issue
> still exists.
> 
> [root@linsrv006 ~]# pcs constraint location mysql rule score=pingd
> defined pingd
> Error: 'mysql' is not a resource
> 
> Do I need to download the latest pcs code and build my own package?

pcs is not mandatory and you can download and use the crm shell for
Centos from:

http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/RedHat_RHEL-6/x86_64/


Regards,
Andreas

> 
> Regards - Willi
> 
> 
> 
> Am 03.12.13 01:54, schrieb Chris Feist:
>> On 11/26/2013 03:27 AM, Willi Fehler wrote:
>>> Hello,
>>>
>>> I'm trying to create the following setup in Pacemaker 1.1.10.
>>>
>>> pcs property set no-quorum-policy=ignore
>>> pcs property set stonith-enabled=false
>>> pcs resource create drbd_mysql ocf:linbit:drbd drbd_resource=r0 op
>>> monitor
>>> interval=60s
>>> pcs resource master ms_drbd_mysql drbd_mysql master-max=1
>>> master-node-max=1
>>> clone-max=2 clone-node-max=1 notify=true
>>> pcs resource create fs_mysql Filesystem device="/dev/drbd/by-res/r0"
>>> directory="/var/lib/mysql" fstype="xfs" options="noatime"
>>> pcs resource create ip_mysql IPaddr2 ip=192.168.0.12 cidr_netmask=32
>>> op monitor
>>> interval=20s
>>> pcs resource create ping ocf:pacemaker:ping host_list="192.168.0.1"
>>> multiplier="100" dampen=10s op monitor interval=60s
>>> pcs resource clone ping ping_clone globally-unique=false
>>> pcs resource create mysqld ocf:heartbeat:mysql binary="/usr/sbin/mysqld"
>>> datadir="/var/lib/mysql" config="/etc/my.cnf" \
>>> pid="/var/run/mysqld/mysqld.pid" socket="/var/run/mysqld/mysqld.sock" \
>>> op monitor interval="15s" timeout="30s" op start interval="0"
>>> timeout="180s" op
>>> stop interval="0" timeout="300s"
>>> pcs resource group add mysql fs_mysql mysqld ip_mysql
>>> pcs constraint colocation add mysql ms_drbd_mysql INFINITY
>>> with-rsc-role=Master
>>> pcs constraint order promote ms_drbd_mysql then start mysql
>>> pcs constraint location mysql rule pingd: defined ping
>>
>> There are two issues here, first, there's a bug in pcs which doesn't
>> recognize groups in location constraint rules and the second is that
>> the pcs rule syntax is slightly different than crm.
>>
>> You should be able to use this command with the latest upstream:
>> pcs constraint location mysql rule score=pingd defined pingd
>>
>> Thanks,
>> Chris
>>
>>>
>>> The last line is not working:
>>>
>>> [root@linsrv006 ~]# pcs constraint location mysql rule pingd: defined
>>> pingd
>>> Error: 'mysql' is not a resource
>>>
>>> By the way, can everybody verify the other lines? I'm very now to
>>> pcs. Here is
>>> my old configuration.
>>>
>>> crm configure
>>> crm(live)configure#primitive drbd_mysql ocf:linbit:drbd \
>>>                             params drbd_resource="r0" \
>>>                             op monitor interval="10s" role="Master" \
>>>                             op monitor interval="20s" role="Slave" \
>>>                             op start interval="0" timeout="240" \
>>>                             op stop interval="0" timeout="240"
>>> crm(live)configure#ms ms_drbd_mysql drbd_mysql \
>>>                             meta master-max="1" master-node-max="1" \
>>>                             clone-max="2" clone-node-max="1" \
>>>                             notify="true" target-role="Master"
>>> crm(live)configure#primitive fs_mysql ocf:heartbeat:Filesystem \
>>>                             params device="/dev/drbd/by-res/r0"
>>> directory="/var/lib/mysql" fstype="xfs" options="noatime" \
>>>                             op start interval="0" timeout="180s" \
>>>                             op stop interval="0" timeout="300s" \
>>>                             op monitor interval="60s"
>>> crm(live)configure#primitive ip_mysql ocf:heartbeat:IPaddr2 \
>>>                             params ip="192.168.0.92" cidr_netmask="24" \
>>>                             op monitor interval="20"
>>> crm(live)configure#primitive ping_eth0 ocf:pacemaker:ping \
>>>                             params host_list="192.168.0.1"
>>> multiplier="100" \
>>>                             op monitor interval="10s" timeout="20s" \
>>>                             op start interval="0" timeout="90s" \
>>>                             op stop interval="0" timeout="100s"
>>> crm(live)configure#clone ping_eth0_clone ping_eth0 \
>>>                             meta globally-unique="false"
>>> crm(live)configure#primitive mysqld ocf:heartbeat:mysql \
>>>                             params binary="/usr/sbin/mysqld"
>>> datadir="/var/lib/mysql" config="/etc/my.cnf"
>>> pid="/var/run/mysqld/mysqld.pid"
>>> socket="/var/run/mysqld/mysqld.sock" \
>>>                             op monitor interval="15s" timeout="30s" \
>>>                             op start interval="0" timeout="180s" \
>>>                             op stop interval="0" timeout="300s" \
>>>                             meta target-role="Started"
>>> crm(live)configure#group mysql fs_mysql mysqld ip_mysql
>>> crm(live)configure#location l_mysql_on_01 mysql 100:
>>> linsrv001.willi-net.local
>>> crm(live)configure#location mysql-on-connected-node mysql \
>>>                     rule $id="mysql-on-connected-node-rule" -inf:
>>> not_defined
>>> pingd or pingd lte 0
>>> crm(live)configure#colocation mysql_on_drbd inf: mysql
>>> ms_drbd_mysql:Master
>>> crm(live)configure#order mysql_after_drbd inf: ms_drbd_mysql:promote
>>> mysql:start
>>> crm(live)configure#rsc_defaults $id="rsc-options" \
>>>                                resource-stickiness="200"
>>> crm(live)configure#commit
>>> crm(live)configure#exit
>>>
>>> Thank you & Regards,
>>> Willi
>>> _______________________________________________
>>> Linux-HA mailing list
>>> [email protected]
>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>> See also: http://linux-ha.org/ReportingProblems
>>
>> _______________________________________________
>> Linux-HA mailing list
>> [email protected]
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
> 
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems


-- 
Need help with Pacemaker?
http://www.hastexo.com/now


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to