Bug 2112259

Summary: pcs should warn when setting utilization attributes may unexpectedly have no effect
Product: Red Hat Enterprise Linux 8 Reporter: Tomas Jelinek <tojeline>
Component: pcsAssignee: Miroslav Lisik <mlisik>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: cfeist, cluster-maint, idevat, jpokorny, mlisik, mmazoure, mpospisi, nhostako, omular, tojeline
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.10.17-1.el8 Doc Type: Enhancement
Doc Text:
Feature: Warn user in case of utilization attributes has no effect. Reason: By default utilization attributes are not taken into account during resources allocation. Additional change of cluster property 'placement-strategy' is needed to enable usage of utilization attributes in pacemaker. Result: Pcs warns user when using pcs utilization commands about configuration which has no effect and additional configuation change of cluster property 'placement-strategy' is needed.
Story Points: ---
Clone Of: 1465829 Environment:
Last Closed: 2023-11-14 15:22:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomas Jelinek 2022-07-29 07:58:42 UTC
+++ This bug was initially created as a clone of Bug #1465829 +++

Unfortunately, [bug 1158500] missed this guidance point completely
(also because the effect of utilization was never properly tested?).

When setting utilization attribute while the placement-strategy is
"default" (implicitly or not) ...

1. ... on-the-fly: emit guidance message that placement-strategy cluster
   property needs to be changed for the current change to take effect

2. ... accumulate + push:  ditto as for 1. + make the "grand check"
   in the push stage that will verify that the final CIB indeed
   carries placement-strategy set to non-default, if not, emit
   the warning once more + perhaps prevent the push unless --force
   is specified

Note also there's no restriction of available values for
placement-strategy values in the current code.

References:
http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#_placement_strategy

--- Additional comment from Tomas Jelinek on 2017-06-28 12:27:00 CEST ---

Some kind of warning should be present in both cli and gui.


In reply to Jan Pokorný from comment #0)
> Note also there's no restriction of available values for
> placement-strategy values in the current code.

It would be nice if pacemaker specified allowed values of cluster properties in pengine metadata (and others) in a nicely parsable form.

Also this should be covered in documentation and pcs man page / usage.

This is already documented at https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/High_Availability_Add-On_Reference/s1-utilization-HAAR.html#s2-placementstrategy-HAAR

--- Additional comment from Jan Pokorný [poki] on 2017-06-28 16:39:45 CEST ---

Disclosure:
This is what has rung a bell for me about this configuration
intertwining (thanks, Ken): 
http://oss.clusterlabs.org/pipermail/users/2017-June/005907.html

Note there's also a precedent in pcs where the clash between
the non-properties configuration and particular cluster property
is also accompanied with a whistleblowing:

https://github.com/ClusterLabs/pcs/commit/e5ce08e

Comment 5 Miroslav Lisik 2023-05-31 15:23:05 UTC
Upstream commit: https://github.com/ClusterLabs/pcs/commit/0aa8a28822d4667658576b37be541432991f2b9c

Updated commands:
  * pcs node utilization
  * pcs resource utilization

Test Environment: a running cluster

Test:

# pcs resource utilization
Warning: Utilization attributes configuration has no effect until cluster property option 'placement-strategy' is set to one of the values: 'balanced', 'minimal', 'utilization'
Resource Utilization:

Comment 6 Michal Pospisil 2023-06-20 09:19:28 UTC
DevTestResults:

[root@r08-09-b ~]# rpm -q pcs
pcs-0.10.17-1.el8.x86_64

[root@r08-09-b ~]# pcs resource utilization
Warning: Utilization attributes configuration has no effect until cluster property option 'placement-strategy' is set to one of the values: 'balanced', 'minimal', 'utilization'
Resource Utilization:

Comment 10 Michal Mazourek 2023-07-14 13:00:08 UTC
The same test as in bz1465829 comment 25 was used to verify this bz. Marking as VERIFIED for pcs-0.10.17-2.el8.

Comment 13 errata-xmlrpc 2023-11-14 15:22:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (pcs bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6903