Bug 1892685

Summary: pcs should keep XML IDs to a reasonable length [rhel-7.7.z]
Product: Red Hat Enterprise Linux 7 Reporter: RAD team bot copy to z-stream <autobot-eus-copy>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 7.7CC: ccaulfie, cfeist, cluster-maint, cluster-qe, dhellard, idevat, jfriesse, jreznik, juholmes, kgaillot, kostos, michael.oldham, mjuricek, mlisik, mmazoure, mpospisi, nhostako, omular, sbradley, tojeline
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: pcs-0.9.167-3.el7_7.2 Doc Type: Bug Fix
Doc Text:
Cause: User creates a set constraint referencing several resources. Pcs generates an ID for such constraint by concatenating all the resources' names. Consequence: Resulting IDs may be extremely long which causes various issues. The IDs do not fit in pcs output and logs and are generally hard to work with. Fix: Auto-generated set constraints' IDs no longer consist of all resources referenced in constraints. Result: Reasonably short IDs fit better in pcs output, logs and are generally easier to work with.
Story Points: ---
Clone Of: 1824206 Environment:
Last Closed: 2020-11-24 10:57:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1824206    
Bug Blocks:    
Attachments:
Description Flags
proposed fix + tests none

Description RAD team bot copy to z-stream 2020-10-29 13:04:30 UTC
This bug has been copied from bug #1824206 and has been proposed to be backported to 7.7 z-stream (EUS).

Comment 2 Tomas Jelinek 2020-11-03 12:43:49 UTC
Created attachment 1726194 [details]
proposed fix + tests

Changed the way IDs for set constraints are generated, they no longer consist of full names of all resources in the constraints.

Generating other IDs was not changed. Plain constraints reference two resources, therefore there is no risk of 1KB+ IDs (unless the resource IDs are that long). Other IDs are either provided by the user or reasonably short. If you find it's not the case, feel free to open another BZ with a reproducer. If plain constraint IDs are still too long, feel free to open a BZ for that as well.


Test: Create set constraints with several resources. Check that the auto-generated constraint IDs are reasonably short.

Comment 3 Ivan Devat 2020-11-09 08:16:41 UTC
Before Fix

[kid76 ~] $ rpm -q pcs
pcs-0.9.167-3.el7_7.1.x86_64

[kid76 ~] $ pcs constraint colocation set A B C
[kid76 ~] $ pcs cluster cib |grep pcs_rsc_colocation_set_A_B_C
      <rsc_colocation score="INFINITY" id="pcs_rsc_colocation_set_A_B_C">

After Fix

[kid76 ~] $ rpm -q pcs
pcs-0.9.167-3.el7_7.2.x86_64

[kid76 ~] $ pcs constraint colocation set A B C
[kid76 ~] $ pcs cluster cib |grep colocation_set_AABBCC
      <rsc_colocation score="INFINITY" id="colocation_set_AABBCC">
        <resource_set id="colocation_set_AABBCC_set">

Comment 11 errata-xmlrpc 2020-11-24 10:57: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 (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-2020:5207