[ClusterLabs] Expected resource-discovery=exclusive behavior

Ken Gaillot kgaillot at redhat.com
Fri Jun 1 10:44:09 EDT 2018


On Fri, 2018-06-01 at 11:15 +0300, Michael Kolomiets wrote:
> Hi
> I have asymmetric cluster. After upgrade pacemaker to version 1.1.18
> I tried to use "resource-discovery=exclusive" attr to limit probes
> when resources (VirtualDomain) start.
> But I dont see records in log on nodes where cluster does probes
> before start resource. Moreover, I have run the guest manually and
> then tried to run appropriate resource with cluster, without succes -
> cluster doesnt see already running guest and launch another instance
> on different node.
> May be I have wrong understand about "resource-discovery=exclusive"
> behavior? Pls, clarify it for me.

That is confusing. It should work as you expect, i.e. the resource is
probed and can run on cluster nodes only. The fact that the cluster
starts the VM at all (in an asymmetric cluster) implies that the
location constraint is working, so I'm not sure why there wouldn't be
probes.

Can you submit a bug report at bugs.clusterlabs.org, preferably with a
tarball from crm_report attached? Did this work differently before
1.1.18?

> 
> Sample configuration.
> 
> Cluster properties
> 
> [root at n01 mmike]# pcs property show
> Cluster Properties:
>  batch-limit: 3
>  cluster-infrastructure: corosync
>  cluster-name: smo01
>  cluster-recheck-interval: 5min
>  dc-version: 1.1.18-11.el7_5.2-2b07d5c5a9
>  have-watchdog: false
>  last-lrm-refresh: 1527458783
>  maintenance-mode: false
>  migration-limit: 2
>  no-quorum-policy: freeze
>  placement-strategy: balanced
>  start-failure-is-fatal: false
>  stonith-enabled: true
>  symmetric-cluster: false
> 
> Resource
> 
> [root at n01 mmike]# pcs resource show vm-sl-gate-01
>  Resource: vm-sl-gate-01 (class=ocf provider=heartbeat
> type=VirtualDomain)
>   Attributes: autoset_utilization_cpu=yes
> autoset_utilization_hv_memory=yes config=/etc/libvirt/shared/sl-gate-
> 01.xml hypervisor=qemu:///system migration_downtime=3000
> migration_network_suffix=-libvirt migration_speed=32
> migration_transport=tls
>   Meta Attrs: allow-migrate=true remote-node=sl-gate-01 remote-
> addr=remote-sl-gate-01 remote-connect-timeout=120s 
>   Utilization: cpu=2 hv_memory=4096
>   Operations: migrate_from interval=0s timeout=1800s (vm-sl-gate-01-
> migrate_from-interval-0s)
>               migrate_to interval=0s timeout=1800s (vm-sl-gate-01-
> migrate_to-interval-0s)
>               monitor interval=30s timeout=120s (vm-sl-gate-01-
> monitor-interval-30s)
>               start interval=0s timeout=60s (vm-sl-gate-01-start-
> interval-0s)
>               stop interval=0s on-fail=block timeout=120s (vm-sl-
> gate-01-stop-interval-0s)
> 
> Location constraint
> 
> [root at n01 mmike]# pcs constraint location show resources vm-sl-gate-
> 01 --full
> Location Constraints:
>   Resource: vm-sl-gate-01
>     Constraint: location-vm-sl-gate-01 (resource-discovery=exclusive)
>       Rule: score=100  (id:location-vm-sl-gate-01-score100)
>         Expression: #kind eq cluster  (id:location-vm-sl-gate-01-
> score100-expr)
> 
> 
> Result
> 
> [root at n02 mmike]# LANG=C virsh list
>  Id    Name                           State
> ----------------------------------------------------
>  9     sl-gate-01               running
> 
> 
> [root at n03 mmike]# LANG=C virsh list
>  Id    Name                           State
> ----------------------------------------------------
>  4     sl-gate-01               running
> 
> -- 
> Michael Kolomiets
-- 
Ken Gaillot <kgaillot at redhat.com>



More information about the Users mailing list