[Pacemaker] pcs command does not work as expected.

Naoya Anzai anzai-naoya at mxu.nes.nec.co.jp
Tue Mar 25 01:55:39 UTC 2014


Hi all,

I'm using pcs 0.9.115 on fedora 20.

---
[root at saturn ~]# pcs --version
0.9.115
[root at saturn ~]# cat /etc/redhat-release
Fedora release 20 (Heisenbug)
---

I want to add locational rule property "boolean-op" using pcs,
but this pcs seems it does not be implemented...

---
[root at saturn ~]# pcs -f pgsql_cfg constraint location vip-backup rule score="-INFINITY" pgsql-status ne "HS:sync" and pgsql-status ne "PRI"
[root at saturn ~]# pcs -f pgsql_cfg constraint location --full
Location Constraints:
  Resource: vip-backup
    Constraint: location-vip-backup
      Rule: score=-INFINITY  (id:location-vip-backup-rule)
        Expression: pgsql-status ne HS:sync  (id:location-vip-backup-rule-expr)
[root at saturn ~]# cat pgsql_cfg|grep -e location-vip-backup-rule -A2 -B1
      <rsc_location id="location-vip-backup" rsc="vip-backup">
        <rule id="location-vip-backup-rule" score="-INFINITY">
          <expression attribute="pgsql-status" id="location-vip-backup-rule-expr" operation="ne" value="HS:sync"/>
        </rule>
      </rsc_location>
---

If this feature is implemented, can anybody teach me how to use?

Incidentally,
By editing the xml file directly, it can read and load correctly.
---
#After edit pgsql_cfg
[root at saturn ~]# pcs -f pgsql_cfg constraint location --full
Location Constraints:
  Resource: vip-backup
    Constraint: location-vip-backup
      Rule: score=-INFINITY boolean-op=and  (id:location-vip-backup-rule)
        Expression: pgsql-status ne HS:sync  (id:location-vip-backup-rule-expr)
        Expression: pgsql-status ne PRI  (id:location-vip-backup-rule-expr-1)
---

Regards,

Naoya

---
Naoya Anzai
Engineering Department
NEC Soft, Ltd.
E-Mail: anzai-naoya at mxu.nes.nec.co.jp
---





More information about the Pacemaker mailing list