资源参数配置错误导致资源启动失败

发布时间:  2015-04-25 浏览次数:  279 下载次数:  0
问题描述
配置浮动IP资源Res_float_ip后,该资源在主备节点上均启动失败。执行crm_mon -fr1命令,检查资源状态时,界面报如下错误。

Online: [ host1 host2 ]

Full list of resources:
     Res_NIC (ocf::users:hwNIC): Started host1
     Res_float_ip (ocf::users:hwIPaddr): Stopped 
...
Migration summary:
* Node host1: 
   Res_float_ip: migration-threshold=1 fail-count=1 last-failure='Fri Mar 29 10:06:32 2013'
...
Failed actions:
    Res_float_ip_start_0 (node=host1, call=17, rc=6, status=complete): not configured
    ...

处理过程
1. 检查配置文件“configure”与“hacs_config.ini”中的信息是否一致,重点关注黑体信息。

crm configure show
linux1:/opt/hacs # crm configure show
node linux1
node linux2
primitive Res_apache ocf:heartbeat:apache \
        params configfile="/opt/lb/conf/httpd-ssl.conf" httpd-ssl="/opt/lb/bin/httpd-ssl" envfiles="/opt/lb/bin/envvars" statusurl="https://127.0.0.1:443/agentclient" testregex="</ *html *>" \
        meta migration-threshold="2" failure-timeout="50" \
        op start interval="0" timeout="20s" \
        op stop interval="0" timeout="20s" \
        op monitor interval="2s" role="Started" timeout="20s"
primitive Res_floatIP ocf:users:hwIPaddr \
        params ip="10.10.10.111" nic="eth0" cidr_netmask="255.255.255.0" broadcast="10.10.10.255" \
        meta migration-threshold="2" failure-timeout="50" \
        op start interval="0" timeout="20s" \
        op stop interval="0" timeout="20s" \
        op monitor interval="2s" role="Started" timeout="20s"
primitive Res_nic ocf:users:hwNIC \
        params device="eth0" \
        meta migration-threshold="2" failure-timeout="50" \
        op start interval="0" timeout="20s" \
        op stop interval="0" timeout="20s" \
        op monitor interval="2s" role="Started" timeout="20s"
group group_apache Res_nic Res_floatIP Res_apache \
        meta ordered="true"
location rsc_location1_group_apache group_apache \
        rule $id="group_apache_rule_linux1" 2720: #uname eq linux1 \
        rule $id="group_apache_rule_linux2" 2710: #uname eq linux2
property $id="cib-bootstrap-options" \
        cluster-infrastructure="openais" \
        no-quorum-policy="ignore" \
        expected-quorum-votes="2" \
        stonith-enabled="false" \
        symmetric-cluster="true" \
        default-resource-stickiness="3000" \
        cluster-delay="60s" \
        start-failure-is-fatal="false" \
        cluster-recheck-interval="1min" \
        pe-error-series-max="100" \
        pe-warn-series-max="100" \
        pe-input-series-max="100" \
        dc-version="1.0.12-f372204" \
        maintenance-mode="false"

2. 修改“configure”文件与“hacs_config.ini”保持一致。
crm configure edit

3. 重新启动HACS核心资源文件。
service corosync stop
service corosync start
根因
配置文件“configure”与“hacs_config.ini”中的信息是不一致。

END