Bug 1465829
Summary: | pcs should warn when setting utilization attributes may unexpectedly have no effect | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Jan Pokorný [poki] <jpokorny> | |
Component: | pcs | Assignee: | Miroslav Lisik <mlisik> | |
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 9.0 | CC: | cluster-maint, idevat, mlisik, mmazoure, mpospisi, nhostako, omular, tojeline | |
Target Milestone: | rc | Keywords: | FutureFeature, Reopened, Triaged | |
Target Release: | 9.3 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
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.
|
Story Points: | --- | |
Clone Of: | ||||
: | 2112259 (view as bug list) | Environment: | ||
Last Closed: | 2023-11-07 08:23:10 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
Jan Pokorný [poki]
2017-06-28 10:06:57 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. Also this should be covered in documentation and pcs man page / usage. 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 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. 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. 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: 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: 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. 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 |