Ahoj,
omluva, ze jdu asi s krizkem po funuse, ale myslim, ze jsem reprodukoval to, o cem mluvis a ze mam odpoved.
Nevim, jestli jsi zkousel spoustet
# pcs constraint --full
v dobe, kdy ti to porad delalo failback i pres nastaveny resource-stickiness. Na mem clusteru to vyhodilo
pcs constraint --full
Location Constraints:
Resource: apache-res-group
Enabled on: node1 (score:70) (id:location-apache-res-group-node1-70)
Enabled on: node2 (score:50) (id:location-apache-res-group-node2-50)
Enabled on: node3 (score:30) (id:location-apache-res-group-node3-30)
Enabled on: node3 (score:INFINITY) (role: Started) (id:cli-prefer-apache-res-group)
Resource: xvmfence1
Enabled on: node3 (score:INFINITY) (role: Started) (id:cli-prefer-xvmfence1)
Disabled on: node1 (score:-INFINITY) (id:location-xvmfence1-node1--INFINITY)
Resource: xvmfence2
Enabled on: node1 (score:INFINITY) (role: Started) (id:cli-prefer-xvmfence2)
Disabled on: node3 (score:-INFINITY) (id:location-xvmfence2-node3--INFINITY)
Resource: xvmfence20
Disabled on: node2 (score:-INFINITY) (id:location-xvmfence20-node2--INFINITY)
Ordering Constraints:
start dlm-clone then start clvmd-clone (kind:Mandatory) (id:order-dlm-clone-clvmd-clone-mandatory)
start clvmd-clone then start apacheconfFS-clone (kind:Mandatory) (id:order-clvmd-clone-apacheconfFS-clone-mandatory)
start apacheconfFS-clone then start apachecontentFS-clone (kind:Mandatory) (id:order-apacheconfFS-clone-apachecontentFS-clone-mandatory)
start apachecontentFS-clone then start apache-res-group (kind:Mandatory) (id:order-apachecontentFS-clone-apache-res-group-mandatory)
Colocation Constraints:
clvmd-clone with dlm-clone (score:INFINITY) (id:colocation-clvmd-clone-dlm-clone-INFINITY)
apachecontentFS-clone with apacheconfFS-clone (score:INFINITY) (id:colocation-apachecontentFS-clone-apacheconfFS-clone-INFINITY)
apacheconfFS-clone with clvmd-clone (score:INFINITY) (id:colocation-apacheconfFS-clone-clvmd-clone-INFINITY)
[root@centos7-1 ~]# pcs constraint
colocation location order ref remove rule
[root@centos7-1 ~]# pcs constraint remove cli-prefer-apache-res-group)
-bash: syntax error near unexpected token `)'
[root@centos7-1 ~]# pcs constraint remove cli-prefer-apache-res-group
[root@centos7-1 ~]# pcs constraint --full
Location Constraints:
Resource: apache-res-group
Enabled on: node1 (score:70) (id:location-apache-res-group-node1-70)
Enabled on: node2 (score:50) (id:location-apache-res-group-node2-50)
Enabled on: node3 (score:30) (id:location-apache-res-group-node3-30)
Resource: xvmfence1
Enabled on: node3 (score:INFINITY) (role: Started) (id:cli-prefer-xvmfence1)
Disabled on: node1 (score:-INFINITY) (id:location-xvmfence1-node1--INFINITY)
Resource: xvmfence2
Enabled on: node1 (score:INFINITY) (role: Started) (id:cli-prefer-xvmfence2)
Disabled on: node3 (score:-INFINITY) (id:location-xvmfence2-node3--INFINITY)
Resource: xvmfence20
Disabled on: node2 (score:-INFINITY) (id:location-xvmfence20-node2--INFINITY)
Ordering Constraints:
start dlm-clone then start clvmd-clone (kind:Mandatory) (id:order-dlm-clone-clvmd-clone-mandatory)
start clvmd-clone then start apacheconfFS-clone (kind:Mandatory) (id:order-clvmd-clone-apacheconfFS-clone-mandatory)
start apacheconfFS-clone then start apachecontentFS-clone (kind:Mandatory) (id:order-apacheconfFS-clone-apachecontentFS-clone-mandatory)
start apachecontentFS-clone then start apache-res-group (kind:Mandatory) (id:order-apachecontentFS-clone-apache-res-group-mandatory)
Colocation Constraints:
clvmd-clone with dlm-clone (score:INFINITY) (id:colocation-clvmd-clone-dlm-clone-INFINITY)
apachecontentFS-clone with apacheconfFS-clone (score:INFINITY) (id:colocation-apachecontentFS-clone-apacheconfFS-clone-INFINITY)
apacheconfFS-clone with clvmd-clone (score:INFINITY) (id:colocation-apacheconfFS-clone-clvmd-clone-INFINITY)
Vsimni si toho
Enabled on: node3 (score:INFINITY) (role: Started) (id:cli-prefer-apache-res-group)
Proto, ze tenhle constraint ma INFIINITY, vzdy vyhral. Tim padem stacilo toto pravidlo vymazat...
# pcs constraint remove cli-prefer-apache-res-group
... a nastavit stickiness, jak ji potrebujes (dej si pozor, aby stickiness mela vyssi skore nez location pravidla, a zkus to.
U me to fungovalo: prelokoval jsem sluzbu na node 3, ten jsem fencnul, sluzba se presunula na node1 (podle pravidel location constraint, node1 ma nejvyssi skore, 70), a po tom, co se node3 dostal zpet do clusteru, sluzba zustala bezet na node1.
Je to to, cos myslel?
Dik,
Ondra