[Pacemaker] Unable to start cloned apache service on node 2

Digimer lists at alteeve.ca
Fri Jan 3 05:42:09 UTC 2014


On 03/01/14 12:07 AM, Digimer wrote:
> On 02/01/14 11:56 PM, Vladislav Bogdanov wrote:
>> 03.01.2014 07:46, Digimer wrote:
>>> Hi all,
>>>
>>>    While trying to test to answer questions from my previous thread, I
>>> hit another problem. Since posting the first thread, I moved on in the
>>> Cluster from Scratch tutorial and got to the point where I was running
>>> Active/Active.
>>>
>>>    Here I have a couple of problems.
>>>
>>>    First up, the dlm service doesn't start with the cluster, but I can
>>> start it successfully manually.
>>>
>>>    Second, and more annoying, I can't get the cloned apache service to
>>> start on both nodes:
>>>
>>> [root at an-c03n01 ~]# pcs config show --full
>>> Cluster Name: an-cluster-03
>>> Corosync Nodes:
>>>   an-c03n01.alteeve.ca an-c03n02.alteeve.ca
>>> Pacemaker Nodes:
>>>   an-c03n01.alteeve.ca an-c03n02.alteeve.ca
>>>
>>> Resources:
>>>   Master: WebDataClone
>>>    Meta Attrs: master-node-max=1 clone-max=2 clone-node-max=1
>>> notify=true
>>> master-max=2
>>>    Resource: WebData (class=ocf provider=linbit type=drbd)
>>>     Attributes: drbd_resource=r0
>>>     Operations: monitor interval=60s (WebData-monitor-60s)
>>>   Clone: dlm-clone
>>>    Meta Attrs: clone-max=2 clone-node-max=1
>>>    Resource: dlm (class=ocf provider=pacemaker type=controld)
>>>     Operations: monitor interval=60s (dlm-monitor-interval-60s)
>>>   Clone: ClusterIP-clone
>>>    Meta Attrs: globally-unique=true clone-max=2 clone-node-max=2
>>>    Resource: ClusterIP (class=ocf provider=heartbeat type=IPaddr2)
>>>     Attributes: ip=192.168.122.10 cidr_netmask=32
>>> clusterip_hash=sourceip
>>>     Operations: monitor interval=30s (ClusterIP-monitor-interval-30s)
>>>   Clone: WebFS-clone
>>>    Resource: WebFS (class=ocf provider=heartbeat type=Filesystem)
>>>     Attributes: device=/dev/drbd0 directory=/var/www/html fstype=gfs2
>>>     Operations: monitor interval=60s (WebFS-monitor-interval-60s)
>>>   Clone: WebSite-clone
>>>    Resource: WebSite (class=ocf provider=heartbeat type=apache)
>>>     Attributes: configfile=/etc/httpd/conf/httpd.conf
>>> statusurl=http://127.0.0.1/server-status
>>>     Operations: monitor interval=60s (WebSite-monitor-interval-60s)
>>>
>>> Stonith Devices:
>>>   Resource: fence_n01_virsh (class=stonith type=fence_virsh)
>>>    Attributes: pcmk_host_list=an-c03n01.alteeve.ca ipaddr=lemass
>>> login=root passwd_script=/root/lemass.pw delay=15 port=an-c03n01
>>>    Operations: monitor interval=60s
>>> (fence_n01_virsh-monitor-interval-60s)
>>>   Resource: fence_n02_virsh (class=stonith type=fence_virsh)
>>>    Attributes: pcmk_host_list=an-c03n02.alteeve.ca ipaddr=lemass
>>> login=root passwd_script=/root/lemass.pw port=an-c03n02
>>>    Operations: monitor interval=60s
>>> (fence_n02_virsh-monitor-interval-60s)
>>> Fencing Levels:
>>>
>>> Location Constraints:
>>>    Resource: ClusterIP-clone
>>>      Enabled on: an-c03n01.alteeve.ca (score:INFINITY) (role: Started)
>>> (id:cli-prefer-ClusterIP)
>>
>> ^^^ This one?
>
> Hiya! Thanks for the idea. I tried it, but it doesn't look like it;
>
> [root at an-c03n01 ~]# pcs resource disable WebSite
>
> [root at an-c03n01 ~]# pcs constraint show --full
> Location Constraints:
>    Resource: ClusterIP-clone
>      Enabled on: an-c03n01.alteeve.ca (score:INFINITY) (role: Started)
> (id:cli-prefer-ClusterIP)
> Ordering Constraints:
>    promote WebDataClone then start WebFS-clone (Mandatory)
> (id:order-WebDataClone-WebFS-mandatory)
>    start WebFS-clone then start WebSite-clone (Mandatory)
> (id:order-WebFS-WebSite-mandatory)
> Colocation Constraints:
>    WebFS-clone with WebDataClone (INFINITY) (with-rsc-role:Master)
> (id:colocation-WebFS-WebDataClone-INFINITY)
>    WebSite-clone with ClusterIP-clone (INFINITY)
> (id:colocation-WebSite-ClusterIP-INFINITY)
>    WebSite-clone with WebFS-clone (INFINITY)
> (id:colocation-WebSite-WebFS-INFINITY)
>
> [root at an-c03n01 ~]# pcs constraint delete cli-prefer-ClusterIP
>
> [root at an-c03n01 ~]# pcs resource enable WebSite
>
> [root at an-c03n01 ~]# pcs status
> Cluster name: an-cluster-03
> Last updated: Fri Jan  3 00:06:07 2014
> Last change: Fri Jan  3 00:05:23 2014 via crm_resource on
> an-c03n01.alteeve.ca
> Stack: corosync
> Current DC: an-c03n01.alteeve.ca (1) - partition with quorum
> Version: 1.1.10-19.el7-368c726
> 2 Nodes configured
> 12 Resources configured
>
>
> Online: [ an-c03n01.alteeve.ca an-c03n02.alteeve.ca ]
>
> Full list of resources:
>
>   fence_n01_virsh    (stonith:fence_virsh):    Started an-c03n01.alteeve.ca
>   fence_n02_virsh    (stonith:fence_virsh):    Started an-c03n02.alteeve.ca
>   Master/Slave Set: WebDataClone [WebData]
>       Masters: [ an-c03n01.alteeve.ca an-c03n02.alteeve.ca ]
>   Clone Set: dlm-clone [dlm]
>       Started: [ an-c03n01.alteeve.ca an-c03n02.alteeve.ca ]
>   Clone Set: ClusterIP-clone [ClusterIP] (unique)
>       ClusterIP:0    (ocf::heartbeat:IPaddr2):    Started
> an-c03n01.alteeve.ca
>       ClusterIP:1    (ocf::heartbeat:IPaddr2):    Started
> an-c03n01.alteeve.ca
>   Clone Set: WebFS-clone [WebFS]
>       Started: [ an-c03n01.alteeve.ca an-c03n02.alteeve.ca ]
>   Clone Set: WebSite-clone [WebSite]
>       Started: [ an-c03n01.alteeve.ca ]
>       Stopped: [ an-c03n02.alteeve.ca ]
>
> PCSD Status:
> an-c03n01.alteeve.ca:
>    an-c03n01.alteeve.ca: Online
> an-c03n02.alteeve.ca:
>    an-c03n02.alteeve.ca: Online
>
> Daemon Status:
>    corosync: active/disabled
>    pacemaker: active/disabled
>    pcsd: active/enabled
>
> [root at an-c03n01 ~]# pcs config show
> Cluster Name: an-cluster-03
> Corosync Nodes:
>   an-c03n01.alteeve.ca an-c03n02.alteeve.ca
> Pacemaker Nodes:
>   an-c03n01.alteeve.ca an-c03n02.alteeve.ca
>
> Resources:
>   Master: WebDataClone
>    Meta Attrs: master-node-max=1 clone-max=2 clone-node-max=1
> notify=true master-max=2
>    Resource: WebData (class=ocf provider=linbit type=drbd)
>     Attributes: drbd_resource=r0
>     Operations: monitor interval=60s (WebData-monitor-60s)
>   Clone: dlm-clone
>    Meta Attrs: clone-max=2 clone-node-max=1
>    Resource: dlm (class=ocf provider=pacemaker type=controld)
>     Operations: monitor interval=60s (dlm-monitor-interval-60s)
>   Clone: ClusterIP-clone
>    Meta Attrs: globally-unique=true clone-max=2 clone-node-max=2
>    Resource: ClusterIP (class=ocf provider=heartbeat type=IPaddr2)
>     Attributes: ip=192.168.122.10 cidr_netmask=32 clusterip_hash=sourceip
>     Operations: monitor interval=30s (ClusterIP-monitor-interval-30s)
>   Clone: WebFS-clone
>    Resource: WebFS (class=ocf provider=heartbeat type=Filesystem)
>     Attributes: device=/dev/drbd0 directory=/var/www/html fstype=gfs2
>     Operations: monitor interval=60s (WebFS-monitor-interval-60s)
>   Clone: WebSite-clone
>    Resource: WebSite (class=ocf provider=heartbeat type=apache)
>     Attributes: configfile=/etc/httpd/conf/httpd.conf
> statusurl=http://127.0.0.1/server-status
>     Operations: monitor interval=60s (WebSite-monitor-interval-60s)
>
> Stonith Devices:
>   Resource: fence_n01_virsh (class=stonith type=fence_virsh)
>    Attributes: pcmk_host_list=an-c03n01.alteeve.ca ipaddr=lemass
> login=root passwd_script=/root/lemass.pw delay=15 port=an-c03n01
>    Operations: monitor interval=60s (fence_n01_virsh-monitor-interval-60s)
>   Resource: fence_n02_virsh (class=stonith type=fence_virsh)
>    Attributes: pcmk_host_list=an-c03n02.alteeve.ca ipaddr=lemass
> login=root passwd_script=/root/lemass.pw port=an-c03n02
>    Operations: monitor interval=60s (fence_n02_virsh-monitor-interval-60s)
> Fencing Levels:
>
> Location Constraints:
> Ordering Constraints:
>    promote WebDataClone then start WebFS-clone (Mandatory)
> (id:order-WebDataClone-WebFS-mandatory)
>    start WebFS-clone then start WebSite-clone (Mandatory)
> (id:order-WebFS-WebSite-mandatory)
> Colocation Constraints:
>    WebFS-clone with WebDataClone (INFINITY) (with-rsc-role:Master)
> (id:colocation-WebFS-WebDataClone-INFINITY)
>    WebSite-clone with ClusterIP-clone (INFINITY)
> (id:colocation-WebSite-ClusterIP-INFINITY)
>    WebSite-clone with WebFS-clone (INFINITY)
> (id:colocation-WebSite-WebFS-INFINITY)
>
> Cluster Properties:
>   cluster-infrastructure: corosync
>   dc-version: 1.1.10-19.el7-368c726
>   last-lrm-refresh: 1388723732
>   no-quorum-policy: ignore
>   stonith-enabled: true
>
>
> Any other thoughts?
>

I went over CfS again and this time I don't see the WebSite clone, so I 
probably just screwed up while trying to follow along. I'm going to blow 
away my config and start over. :)

Cheers!

-- 
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without 
access to education?




More information about the Pacemaker mailing list