RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1465829 - pcs should warn when setting utilization attributes may unexpectedly have no effect
Summary: pcs should warn when setting utilization attributes may unexpectedly have no ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: pcs
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 9.3
Assignee: Miroslav Lisik
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-28 10:06 UTC by Jan Pokorný [poki]
Modified: 2023-11-07 08:58 UTC (History)
8 users (show)

Fixed In Version: pcs-0.11.6-1.el9
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.
Clone Of:
: 2112259 (view as bug list)
Environment:
Last Closed: 2023-11-07 08:23:10 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-5750 0 None None None 2022-05-23 16:03:24 UTC
Red Hat Issue Tracker CLUSTERQE-6210 0 None None None 2022-11-28 15:06:20 UTC
Red Hat Issue Tracker RHELPLAN-113693 0 None None None 2022-02-24 15:48:23 UTC
Red Hat Product Errata RHSA-2023:6316 0 None None None 2023-11-07 08:24:03 UTC

Description Jan Pokorný [poki] 2017-06-28 10:06:57 UTC
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

Comment 1 Tomas Jelinek 2017-06-28 10:27:00 UTC
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.

Comment 2 Tomas Jelinek 2017-06-28 10:32:55 UTC
Also this should be covered in documentation and pcs man page / usage.

Comment 4 Jan Pokorný [poki] 2017-06-28 14:39:45 UTC
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 6 RHEL Program Management 2021-01-15 07:39:00 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 11 RHEL Program Management 2022-08-24 07:27:45 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 19 Miroslav Lisik 2023-05-31 15:21:01 UTC
Upstream commit: https://github.com/ClusterLabs/pcs/commit/58a7306c7a7d78a737b83f4d8adc6df217d92d37

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 20 Michal Pospisil 2023-06-20 16:06:21 UTC
DevTestResults:

[root@r09-03-a ~]# rpm -q pcs
pcs-0.11.6-1.el9.x86_64

[root@r09-03-a ~]# 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 25 Michal Mazourek 2023-07-14 12:39:02 UTC
BEFORE:
=======

[root@virt-510 ~]# rpm -q pcs
pcs-0.11.4-6.el9.x86_64


[root@virt-510 ~]# pcs property --all | grep placement-strategy
 placement-strategy: default

[root@virt-510 ~]# pcs node utilization virt-510 cpu=4
[root@virt-510 ~]# pcs resource create d1 ocf:heartbeat:Dummy
[root@virt-510 ~]# pcs resource utilization d1 ram=20

[root@virt-510 ~]# pcs resource utilization
Resource Utilization:
 d1: ram=20
[root@virt-510 ~]# pcs node utilization
Node Utilization:
 virt-510: cpu=4

> No warning, when the utilization has no effect (placement-strategy is default)


AFTER:
======

[root@virt-496 ~]# rpm -q pcs
pcs-0.11.6-1.el9.x86_64


### CLI

[root@virt-496 ~]# pcs node utilization --help

Usage: pcs node <command>
    utilization [[<node>] [--name <name>] | <node> <name>=<value> ...]
        Add specified utilization options to specified node.  If node is not
        specified, shows utilization of all nodes.  If --name is specified,
        shows specified utilization value from all nodes. If utilization options
        are not specified, shows utilization of specified node.  Utilization
        option should be in format name=value, value has to be integer.  Options
        may be removed by setting an option without a value.
        Example: pcs node utilization node1 cpu=4 ram=
        For the utilization configuration to be in effect, cluster property
        'placement-strategy' must be configured accordingly.

[root@virt-496 ~]# pcs resource utilization --help

Usage: pcs resource utilization...
    utilization [<resource id> [<name>=<value> ...]]
        Add specified utilization options to specified resource. If resource is
        not specified, shows utilization of all resources. If utilization
        options are not specified, shows utilization of specified resource.
        Utilization option should be in format name=value, value has to be
        integer. Options may be removed by setting an option without a value.
        Example: pcs resource utilization TestResource cpu= ram=20
        For the utilization configuration to be in effect, cluster property
        'placement-strategy' must be configured accordingly.

> OK: Paragraph, that placement-strategy must be configured for the utilization to be in effect is present in node and resource utilization usage


## placement-strategy is default (utilization attributes has no effect)

[root@virt-496 ~]# pcs property --all | grep placement-strategy
  placement-strategy=default (default)

[root@virt-496 ~]# pcs node utilization virt-496 cpu=4
Warning: Utilization attributes configuration has no effect until cluster property option 'placement-strategy' is set to one of the values: 'balanced', 'minimal', 'utilization'
[root@virt-496 ~]# echo $?
0

[root@virt-496 ~]# pcs resource create d1 ocf:heartbeat:Dummy
[root@virt-496 ~]# pcs resource utilization d1 ram=20
Warning: Utilization attributes configuration has no effect until cluster property option 'placement-strategy' is set to one of the values: 'balanced', 'minimal', 'utilization'
[root@virt-496 ~]# echo $?
0

> OK: The warning is present when setting the utilization with default placement-strategy property


[root@virt-496 ~]# 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:
 d1: ram=20

[root@virt-496 ~]# pcs node utilization
Warning: Utilization attributes configuration has no effect until cluster property option 'placement-strategy' is set to one of the values: 'balanced', 'minimal', 'utilization'
Node Utilization:
 virt-496: cpu=4

> OK: The warning is present when showing configured utilization attributes with no effect as placement-strategy is default


# showing utilization attributes with specified node/resource

[root@virt-496 ~]# pcs node utilization virt-496
Warning: Utilization attributes configuration has no effect until cluster property option 'placement-strategy' is set to one of the values: 'balanced', 'minimal', 'utilization'
Node Utilization:
 virt-496: cpu=4
[root@virt-496 ~]# pcs node utilization virt-497
Warning: Utilization attributes configuration has no effect until cluster property option 'placement-strategy' is set to one of the values: 'balanced', 'minimal', 'utilization'
Node Utilization:

[root@virt-496 ~]# pcs resource utilization d1
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:
 d1: ram=20

> OK


# showing node utilization attributes with specified name (with and without node)

[root@virt-496 ~]# pcs node utilization virt-496 --name cpu
Warning: Utilization attributes configuration has no effect until cluster property option 'placement-strategy' is set to one of the values: 'balanced', 'minimal', 'utilization'
Node Utilization:
 virt-496: cpu=4
[root@virt-496 ~]# pcs node utilization --name cpu
Warning: Utilization attributes configuration has no effect until cluster property option 'placement-strategy' is set to one of the values: 'balanced', 'minimal', 'utilization'
Node Utilization:
 virt-496: cpu=4

> OK: Warning is present in all cases


## placement-strategy is not default (utilization attributes has effect)

# placement-strategy is balanced

[root@virt-496 ~]# pcs property set placement-strategy=balanced

[root@virt-496 ~]# pcs node utilization virt-496 cpu=2
[root@virt-496 ~]# echo $?
0
[root@virt-496 ~]# pcs resource utilization d1 ram=19
[root@virt-496 ~]# echo $?
0

[root@virt-496 ~]# pcs resource utilization
Resource Utilization:
 d1: ram=19
[root@virt-496 ~]# pcs node utilization
Node Utilization:
 virt-496: cpu=2

> OK: The warning is not present, when utilization is in effect (placement-strategy is balanced)


# placement-strategy is minimal

[root@virt-496 ~]# pcs property set placement-strategy=minimal

[root@virt-496 ~]# pcs node utilization virt-496 cpu=4
[root@virt-496 ~]# echo $?
0
[root@virt-496 ~]# pcs resource utilization d1 ram=20
[root@virt-496 ~]# echo $?
0

[root@virt-496 ~]# pcs resource utilization
Resource Utilization:
 d1: ram=20
[root@virt-496 ~]# pcs node utilization
Node Utilization:
 virt-496: cpu=4

> OK: The warning is not present, when utilization is in effect (placement-strategy is minimal)


# placement-strategy is utilization

[root@virt-496 ~]# pcs property set placement-strategy=utilization

[root@virt-496 ~]# pcs node utilization virt-496 cpu=2
[root@virt-496 ~]# echo $?
0
[root@virt-496 ~]# pcs resource utilization d1 ram=19
[root@virt-496 ~]# echo $?
0

[root@virt-496 ~]# pcs resource utilization
Resource Utilization:
 d1: ram=19
[root@virt-496 ~]# pcs node utilization
Node Utilization:
 virt-496: cpu=2

> OK: The warning is not present, when utilization is in effect (placement-strategy is utilization)


### GUI (placement-strategy is default)
1. open web UI
2. add existing cluster
3. click on the added cluster
4. go to resources tab, click on the resource
5. go to utilization tab
> NOK: No warning message for the resource utilization attributes is present when placement-strategy is default
6. go to nodes tab, click on the node
7. go to utilization tab
> NOK: No warning message for the node utilization attributes is present when placement-strategy is default


Result: A warning message is present, when utilization is not in effect (placement-strategy is default) in CLI, however it was mentioned in bz1465829 comment 1, that this should be present in GUI as well. This bz was cloned for the GUI part: bz2222905. Marking as VERIFIED for pcs-0.11.6-1.el9.

Comment 28 errata-xmlrpc 2023-11-07 08:23:10 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 (Low: pcs security, 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/RHSA-2023:6316


Note You need to log in before you can comment on or make changes to this bug.