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 1832973 - [GUI] Colocation constraint can't be added
Summary: [GUI] Colocation constraint can't be added
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcs
Version: 8.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.3
Assignee: Ivan Devat
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1840156 1840157 1840158
TreeView+ depends on / blocked
 
Reported: 2020-05-07 14:45 UTC by Michal Mazourek
Modified: 2020-11-04 02:34 UTC (History)
7 users (show)

Fixed In Version: pcs-0.10.6-1.el8
Doc Type: Bug Fix
Doc Text:
Cause: Web ui backend internally uses syntax of a command `pcs constraint colocation add` that is not supported yet. Consequence: Adding a colocation constraint from the web ui always fails. Fix: Web ui backend has been fixed to use current syntax of command `pcs constraint colocation add`. Result: Adding a colocation constraint from the web ui succeeds.
Clone Of:
: 1840156 1840157 1840158 (view as bug list)
Environment:
Last Closed: 2020-11-04 02:28:18 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix (1.46 KB, patch)
2020-05-11 12:41 UTC, Ivan Devat
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:4617 0 None None None 2020-11-04 02:28:54 UTC

Description Michal Mazourek 2020-05-07 14:45:11 UTC
Description of problem:
When adding a colocation constraint in the web UI, the error message is shown: 'Unable to add constraint (Bad Request)'. Since this problem wasn't present in RHEL7 and first occurred in RHEL8, it is a regression.  


Version-Release number of selected component (if applicable): 
found in pcs-0.10.4-6.el8


How reproducible:
always


Steps to Reproduce:
1. Log in to the web UI
2. Add cluster
3. Go to the resources page of the cluster
4. Add 2 Dummy resources
5. Click on 'Resource Colocation Preferences (0)' in the 'Edit Resource' page of one of the resources.
6. Fill in the name of the other resource, set 'Together' in 'Together/Apart' field and click 'Add'


Actual results: Alert message with 'Unable to add constraint (Bad Request)' text is shown and the constraint is not created.


Expected results: The constraint is created.


Additional info: After discussion with developer, it seems like the syntax of 'pcs constraint colocation add' is now more strict in RHEL8, which causing the issue.

Comment 1 Ivan Devat 2020-05-11 12:41:28 UTC
Created attachment 1687304 [details]
proposed fix

Test:
Create new colocation constraint in web UI. It should work.

Comment 4 Miroslav Lisik 2020-06-11 14:20:16 UTC
Test:

[root@r8-node-01 pcs]# rpm -q pcs
pcs-0.10.6-1.el8.x86_64

1. Create 2 Dummy resources in GUI
2. Go to the resource details form and add a Colocation constraint
3. Result: Colocation constraint is created and 'Resource Colocation Preferences' updated

Comment 7 Michal Mazourek 2020-07-17 09:41:10 UTC
BEFORE:
=======

[root@virt-043 ~]# rpm -q pcs
pcs-0.10.4-6.el8.x86_64


> Running pcsd_colocation sts test

{...}
[pcsd_colocation] STEP 1 : login
[pcsd_colocation]   user :  " hacluster "
[pcsd_colocation]   password :  " password "
[pcsd_colocation]   OK: logged in as hacluster
[pcsd_colocation]   INFO: stopping JS updater
[pcsd_colocation] STEP 2 : add_cluster
[pcsd_colocation]   comment :  " Try adding the cluster into GUI, but don't fail if at already exists. "
[pcsd_colocation]   clustername :  " STSRHTS10850 "
[pcsd_colocation]   node :  " virt-044 "
[pcsd_colocation]   user :  " hacluster "
[pcsd_colocation]   password :  " password "
[pcsd_colocation]   No auth needed
[pcsd_colocation]   OK: cluster 'STSRHTS10850' added
[pcsd_colocation] STEP 3 : open_cluster
[pcsd_colocation]   clustername :  " STSRHTS10850 "
[pcsd_colocation]   OK: cluster STSRHTS10850 opened
[pcsd_colocation] STEP 4 : goto_resources
[pcsd_colocation] STEP 5 : add_resource
[pcsd_colocation]   resource-type :  " ocf:heartbeat:Dummy "
[pcsd_colocation]   resource-name :  " dummy2 "
[pcsd_colocation]   INFO: disabling tooltips (selenium bug)
[pcsd_colocation]   INFO: stopping JS updater
[pcsd_colocation]   OK: resource 'dummy2' exists
[pcsd_colocation] STEP 6 : add_resource
[pcsd_colocation]   resource-type :  " ocf:heartbeat:Dummy "
[pcsd_colocation]   resource-name :  " dummy3 "
[pcsd_colocation]   OK: resource 'dummy3' exists
[pcsd_colocation] STEP 7 : check_resource_running
[pcsd_colocation]   resource-name :  " dummy2 "
[pcsd_colocation]   OK: resource dummy2 is running
[pcsd_colocation] STEP 8 : check_resource_running
[pcsd_colocation]   resource-name :  " dummy3 "
[pcsd_colocation]   INFO: waiting for ajax
[pcsd_colocation]   OK: resource dummy3 is running
[pcsd_colocation] STEP 9 : add_location
[pcsd_colocation]   resource-name :  " dummy2 "
[pcsd_colocation]   node :  " virt-044 "
[pcsd_colocation]   score :  " INFINITY "
[pcsd_colocation]   INFO: waiting for ajax
[pcsd_colocation]   OK: Location constraint exists: virt-044 INFINITY
[pcsd_colocation] STEP 10 : add_colocation
[pcsd_colocation]   resource-name :  " dummy2 "
[pcsd_colocation]   relative :  " dummy3 "
[pcsd_colocation]   colocate :  " together "
[pcsd_colocation]   score :  " 500 "
[pcsd_colocation]   ALERT: Unable to add constraint (Bad Request)
[pcsd_colocation] 
[pcsd_colocation] 
[pcsd_colocation] ERROR: in add_colocation: Alert box saying "Unable to add constraint (Bad Request)
[pcsd_colocation] 
[pcsd_colocation] "
[pcsd_colocation] NOTE: Page source saved as /tmp/STANDALONE_RESULTS/sel_20200717_110007.html
[pcsd_colocation] NOTE: Screenshot saved as /tmp/STANDALONE_RESULTS/sel_20200717_110007.png
<fail name="pcsd_colocation" id="pcsd_colocation" pid="61214" time="Fri Jul 17 11:00:09 2020 +0200" type="cmd" duration="298" ec="1" />
PAN2: ALL STOP!!!
------------------- Summary ---------------------
Testcase                                 Result    
--------                                 ------    
generic_setup                            PASS      
setup-noclvmd-noalerts                   PASS      
pcsd_setup                               PASS      
pcsd_colocation                          FAIL      
=================================================
Total Tests Run: 4
Total PASS:      3
Total FAIL:      1
Total TIMEOUT:   0
Total KILLED:    0
Total STOPPED:   0



AFTER:
======

[root@virt-121 ~]# rpm -q pcs
pcs-0.10.6-2.el8.x86_64


> Running pcsd_colocation sts test

{...}
[pcsd_colocation] STEP 1 : login
[pcsd_colocation]   user :  " hacluster "
[pcsd_colocation]   password :  " password "
[pcsd_colocation]   OK: logged in as hacluster
[pcsd_colocation]   INFO: stopping JS updater
[pcsd_colocation] STEP 2 : add_cluster
[pcsd_colocation]   comment :  " Try adding the cluster into GUI, but don't fail if at already exists. "
[pcsd_colocation]   clustername :  " STSRHTS2479 "
[pcsd_colocation]   node :  " virt-126 "
[pcsd_colocation]   user :  " hacluster "
[pcsd_colocation]   password :  " password "
[pcsd_colocation]   No auth needed
[pcsd_colocation]   INFO: waiting for ajax
[pcsd_colocation]   OK: cluster 'STSRHTS2479' added
[pcsd_colocation] STEP 3 : open_cluster
[pcsd_colocation]   clustername :  " STSRHTS2479 "
[pcsd_colocation]   OK: cluster STSRHTS2479 opened
[pcsd_colocation] STEP 4 : goto_resources
[pcsd_colocation] STEP 5 : add_resource
[pcsd_colocation]   resource-type :  " ocf:heartbeat:Dummy "
[pcsd_colocation]   resource-name :  " dummy2 "
[pcsd_colocation]   INFO: disabling tooltips (selenium bug)
[pcsd_colocation]   INFO: stopping JS updater
[pcsd_colocation]   INFO: waiting for ajax
[pcsd_colocation]   INFO: waiting for ajax
[pcsd_colocation]   OK: resource 'dummy2' exists
[pcsd_colocation] STEP 6 : add_resource
[pcsd_colocation]   resource-type :  " ocf:heartbeat:Dummy "
[pcsd_colocation]   resource-name :  " dummy3 "
[pcsd_colocation]   OK: resource 'dummy3' exists
[pcsd_colocation] STEP 7 : check_resource_running
[pcsd_colocation]   resource-name :  " dummy2 "
[pcsd_colocation]   OK: resource dummy2 is running
[pcsd_colocation] STEP 8 : check_resource_running
[pcsd_colocation]   resource-name :  " dummy3 "
[pcsd_colocation]   INFO: waiting for ajax
[pcsd_colocation]   OK: resource dummy3 is running
[pcsd_colocation] STEP 9 : add_location
[pcsd_colocation]   resource-name :  " dummy2 "
[pcsd_colocation]   node :  " virt-126 "
[pcsd_colocation]   score :  " INFINITY "
[pcsd_colocation]   INFO: waiting for ajax
[pcsd_colocation]   OK: Location constraint exists: virt-126 INFINITY
[pcsd_colocation] STEP 10 : add_colocation
[pcsd_colocation]   resource-name :  " dummy2 "
[pcsd_colocation]   relative :  " dummy3 "
[pcsd_colocation]   colocate :  " together "
[pcsd_colocation]   score :  " 500 "
[pcsd_colocation]   OK: Colocation constraint exists
[pcsd_colocation] STEP 11 : check_resource_loc
[pcsd_colocation]   resource-name :  " dummy3 "
[pcsd_colocation]   node :  " virt-126 "
[pcsd_colocation]   INFO: waiting for ajax
[pcsd_colocation]   OK: resource dummy3 is running
[pcsd_colocation]   OK: resource dummy3 is running on: virt-126
[pcsd_colocation] 0 warning(s) issued
[pcsd_colocation] All OK
<pass name="pcsd_colocation" id="pcsd_colocation" pid="1371164" time="Fri Jul 17 11:30:13 2020 +0200" type="cmd" duration="369" />
------------------- Summary ---------------------
Testcase                                 Result    
--------                                 ------    
generic_setup                            PASS      
setup-noclvmd-noalerts                   PASS      
pcsd_setup                               PASS      
pcsd_colocation                          PASS      
=================================================
Total Tests Run: 4
Total PASS:      4
Total FAIL:      0
Total TIMEOUT:   0
Total KILLED:    0
Total STOPPED:   0


Marking as VERIFIED for pcs-0.10.6-2.el8

Comment 10 errata-xmlrpc 2020-11-04 02:28:18 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/RHEA-2020:4617


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