2

I'm using Pacemaker & Corosync for my cluster. When a node dies pacemaker moving my resources to another online node. Everything ok here. But when the dead node comes back, Pacemaker moving the resource back. I don't have any "location" line in my config and also I tried with "unmove" command but nothing changed.

I failed at somewhere and need to find the reason.

crm configure sh

node 1: DEV1
node 2: DEV2
primitive poolip IPaddr2 \
    params ip=10.1.60.33 nic=enp2s0f0 cidr_netmask=24 \
    meta migration-threshold=2 target-role=Started \
    op monitor interval=20 timeout=20 on-fail=restart
primitive gui systemd:gui \
    op monitor interval=20s \
    meta target-role=Started
primitive gui-ip IPaddr2 \
    params ip=10.1.60.35 nic=enp2s0f0 cidr_netmask=24 \
    meta migration-threshold=2 target-role=Started \
    op monitor interval=20 timeout=20 on-fail=restart
colocation cluster-gui inf: gui gui-ip
order gui-after-ip Mandatory: gui-ip gui
property cib-bootstrap-options: \
    have-watchdog=false \
    dc-version=2.0.0-1-8cf3fe749e \
    cluster-infrastructure=corosync \
    cluster-name=mycluster \
    stonith-enabled=false \
    no-quorum-policy=ignore \
    last-lrm-refresh=1545920437
rsc_defaults rsc-options: \
    migration-threshold=10 \
    resource-stickiness=100

pcs resource defaults

migration-threshold=10
resource-stickiness=100

pcs resource show gui

Resource: gui (class=systemd type=gui)
 Meta Attrs: target-role=Started
 Operations: monitor interval=20s (gui-monitor-20s)
6
  • 1
    does pcs constraint show show anything?
    – Jenny D
    Commented Jan 2, 2019 at 10:09
  • I don't use pcs but i have installed for you. pcs constraint show ``` Location Constraints: Ordering Constraints: gui-ip then gui (kind:Mandatory) Colocation Constraints: gui with gui-ip (score:INFINITY) Ticket Constraints: ```
    – Ozbit
    Commented Jan 2, 2019 at 11:05
  • It would help if you could click the "Edit" link below your question and edit the additional information into the question instead. It's hard to read the info when it's in a comment.
    – Jenny D
    Commented Jan 2, 2019 at 11:13
  • I think you should have a look at stickiness. Since you've got pcs installed now, check it by running pcs resource defaultsand pcs resource show gui
    – Jenny D
    Commented Jan 2, 2019 at 11:17
  • 2
    Are you starting services at boot that Pacemaker is monitoring? If so, it's possible that Pacemaker notices the service is running in both places, and is stopping services on the current primary and leaving them running on the freshly rebooted node. Commented Jan 2, 2019 at 19:06

1 Answer 1

0

It sounds like you might be starting services at boot that only the cluster should be start/stop/monitoring.

Disable your services from starting at boot and then test your reboot again: systemctl disable gui

1
  • No, I dont start my services via systemd.
    – Ozbit
    Commented Jan 9, 2019 at 12:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .