Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1158500 - add support for utilization attributes
add support for utilization attributes
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs (Show other bugs)
7.1
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Ondrej Mular
cluster-qe@redhat.com
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-29 10:00 EDT by Tomas Jelinek
Modified: 2017-06-28 08:14 EDT (History)
11 users (show)

See Also:
Fixed In Version: pcs-0.9.152-9.el7
Doc Type: Enhancement
Doc Text:
Support added for configuring Pacemaker utilization attributes You can now configure Pacemaker utilization attributes with the `pcs` command and the `pcsd` Web UI. This allows you to configure the capacity a particular node provides, the capacity a particular resource requires, and an overall strategy for placement of resources. For information on utilization and placement strategy see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/High_Availability_Add-On_Reference/index.html.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 16:53:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed fix (62.13 KB, patch)
2015-11-27 02:52 EST, Ondrej Mular
no flags Details | Diff
proposed fix 2 (1.04 KB, patch)
2016-01-22 10:44 EST, Tomas Jelinek
no flags Details | Diff
proposed fix 3 (13.73 KB, patch)
2016-09-12 07:22 EDT, Tomas Jelinek
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2596 normal SHIPPED_LIVE Moderate: pcs security, bug fix, and enhancement update 2016-11-03 08:11:34 EDT

  None (edit)
Description Tomas Jelinek 2014-10-29 10:00:18 EDT
Add support for utilization attributes to CLI and GUI.
See pacemaker documentation: http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html/Pacemaker_Explained/_utilization_attributes.html

github issue: https://github.com/feist/pcs/issues/41
Comment 3 Ondrej Mular 2015-11-27 02:52 EST
Created attachment 1099616 [details]
proposed fix
Comment 4 Ondrej Mular 2015-11-27 03:18:22 EST
Test:
[root@node1 ~]# pcs cluster setup --name testcluster node1 node2 --start
Destroying cluster on nodes: node1, node2...
node2: Stopping Cluster (pacemaker)...
node1: Stopping Cluster (pacemaker)...
node2: Successfully destroyed cluster
node1: Successfully destroyed cluster

Sending cluster config files to the nodes...
node1: Succeeded
node2: Succeeded

Starting cluster on nodes: node1, node2...
node1: Starting Cluster...
node2: Starting Cluster...

Synchronizing pcsd certificates on nodes node1, node2...
node2: Success
node1: Success

Restarting pcsd on the nodes in order to reload the certificates...
node2: Success
node1: Success
[root@node1 ~]# pcs resource create dummy Dummy

Before fix:
In pcs, there was no way to set or show utilization attributes.

After fix:
[root@node1 ~]# pcs node utilization node1 cpu=8 mem=8192
[root@node1 ~]# pcs node utilization node1
Node Utilization:
 node1: cpu=8 mem=8192
[root@node1 ~]# pcs node utilization node2 cpu=4
[root@node1 ~]# pcs node utilization node2
Node Utilization:
 node2: cpu=4
[root@node1 ~]# pcs node utilization
Node Utilization:
 node1: cpu=8 mem=8192
 node2: cpu=4
[root@node1 ~]# pcs resource utilization dummy cpu=1 mam=1024 net=10
[root@node1 ~]# pcs resource utilization 
Resource Utilization:
 dummy: cpu=1 mam=1024 net=10
[root@node1 ~]# pcs resource utilization dummy net=
[root@node1 ~]# pcs resource utilization dummy
Resource Utilization:
 dummy: cpu=1 mam=1024

It is possible to manage utilization attributes also in web UI. For resource in resource detail view and for node in node detail view.
Comment 5 Tomas Jelinek 2016-01-22 10:44 EST
Created attachment 1117244 [details]
proposed fix 2
Comment 7 Mike McCune 2016-03-28 19:15:27 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 8 Ivan Devat 2016-05-31 08:19:41 EDT
Setup:
[vm-rhel72-1 ~] $ pcs status|grep Online
Online: [ vm-rhel72-1 vm-rhel72-3 ]

Before fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.143-15.el7.x86_64

In pcs, there was no way to set or show utilization attributes.


After Fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.151-1.el7.x86_64

[vm-rhel72-1 ~] $ pcs node utilization
Node Utilization:
[vm-rhel72-1 ~] $ pcs node utilization vm-rhel72-1
Node Utilization:
 vm-rhel72-1:

[vm-rhel72-1 ~] $ pcs node utilization vm-rhel72-1 cpu=8 mem=8192
[vm-rhel72-1 ~] $ pcs node utilization
Node Utilization:
 vm-rhel72-1: cpu=8 mem=8192
[vm-rhel72-1 ~] $ pcs node utilization vm-rhel72-1
Node Utilization:
 vm-rhel72-1: cpu=8 mem=8192

[vm-rhel72-1 ~] $ pcs node utilization vm-rhel72-3
Node Utilization:
 vm-rhel72-3:
[vm-rhel72-1 ~] $ pcs node utilization vm-rhel72-3 cpu=4
[vm-rhel72-1 ~] $ pcs node utilization vm-rhel72-3
Node Utilization:
 vm-rhel72-3: cpu=4
[vm-rhel72-1 ~] $ pcs node utilization
Node Utilization:
 vm-rhel72-1: cpu=8 mem=8192
 vm-rhel72-3: cpu=4

[vm-rhel72-1 ~] $ pcs resource create dummy Dummy
[vm-rhel72-1 ~] $ pcs resource utilization dummy cpu=1 mam=1024 net=10
[vm-rhel72-1 ~] $ pcs resource utilization
Resource Utilization:
 dummy: cpu=1 mam=1024 net=10
[vm-rhel72-1 ~] $ pcs resource utilization dummy net=
[vm-rhel72-1 ~] $ pcs resource utilization dummy
 Resource Utilization:
  dummy: cpu=1 mam=1024


It is possible to manage utilization attributes also in web UI. For resource in resource detail view and for node in node detail view.
Comment 13 Tomas Jelinek 2016-09-12 07:22 EDT
Created attachment 1200191 [details]
proposed fix 3

This patch does not fix the name validation issue. We suppose it is not utilization attributes specific and it may be quite common throughout whole pcsd UI. Moreover we do not know which characters are "forbidden". The issue should be filed as a separate bz and planned, fixed and tested accordingly.
Comment 14 Ivan Devat 2016-09-14 11:50:45 EDT
Before Fix:

[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.152-8.el7.x86_64

1)
[vm-rhel72-1 ~] $ pcs node utilization vm-rhel72-1 \=1 something
[vm-rhel72-1 ~] $ pcs node utilization vm-rhel72-1
Node Utilization:
 vm-rhel72-1: =1

2)
[vm-rhel72-1 ~] $ pcs resource create remote-node ocf:pacemaker:remote server="vm-rhel72-2"
[vm-rhel72-1 ~] $ pcs cluster cib | grep "<node "
      <node id="1" uname="vm-rhel72-1"/>
      <node id="2" uname="vm-rhel72-3"/>
[vm-rhel72-1 ~] $ pcs node utilization remote-node a=1
Error: Unable to find a node: remote-node

3)
[vm-rhel72-1 ~] $ pcs node utilization no-node
Node Utilization:


After Fix:

[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.152-9.el7.x86_64

1)
[vm-rhel72-1 ~] $ pcs node utilization vm-rhel72-1 \=1
Error: missing key in '=1' option
[vm-rhel72-1 ~] $ pcs node utilization vm-rhel72-1 something
Error: missing value of 'something' option

2)
[vm-rhel72-1 ~] $ pcs resource create remote-node ocf:pacemaker:remote server="vm-rhel72-2"
[vm-rhel72-1 ~] $ pcs cluster cib | grep "<node "
      <node id="1" uname="vm-rhel72-1"/>
      <node id="2" uname="vm-rhel72-3"/>
[vm-rhel72-1 ~] $ pcs node utilization remote-node a=1
[vm-rhel72-1 ~] $ pcs node utilization remote-node
Node Utilization:
 remote-node: a=1

3)
[vm-rhel72-1 ~] $ pcs node utilization no-node
Error: Unable to find a node: no-node

# newly setup cluster there
[vm-rhel72-1 ~] $ pcs resource create remote-node ocf:pacemaker:remote server="vm-rhel72-2"
[vm-rhel72-1 ~] $ pcs cluster cib | grep "<node "
      <node id="1" uname="vm-rhel72-1"/>
      <node id="2" uname="vm-rhel72-3"/>
[vm-rhel72-1 ~] $ pcs node utilization remote-node
Node Utilization:
Comment 18 errata-xmlrpc 2016-11-03 16:53:24 EDT
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, 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://rhn.redhat.com/errata/RHSA-2016-2596.html
Comment 19 Steven J. Levine 2017-05-02 17:57:17 EDT
Oyvind:

Could you look at the description for the 7.3 release notes I put in the doc text field for this BZ?  Once you ok this I can have this backported to the 7.3 release notes on the Portal.

Thanks.

Steven
Comment 20 Tomas Jelinek 2017-05-03 04:13:04 EDT
There is a typo: missing i in utlization. Otherwise the doc text is ok.
Comment 21 Steven J. Levine 2017-05-04 09:33:18 EDT
This is now in the release notes on the Portal:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/7.3_Release_Notes/new_features_clustering.html

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