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 1997011 - Repair issues with constraints in new web UI
Summary: Repair issues with constraints in new web UI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcs
Version: 8.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.6
Assignee: Ivan Devat
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-24 08:30 UTC by Michal Mazourek
Modified: 2022-05-10 15:24 UTC (History)
7 users (show)

Fixed In Version: pcs-0.10.12-1.el8
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1997019 (view as bug list)
Environment:
Last Closed: 2022-05-10 14:50:42 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix (19.28 KB, patch)
2021-10-11 08:57 UTC, Ivan Devat
no flags Details | Diff
proposed fix 2 (2.69 KB, patch)
2021-11-09 14:05 UTC, Ivan Devat
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-94566 0 None None None 2021-08-24 08:31:09 UTC
Red Hat Product Errata RHEA-2022:1978 0 None None None 2022-05-10 14:51:15 UTC

Description Michal Mazourek 2021-08-24 08:30:47 UTC
Description of problem:
A several issues appeared while new constraint features were tested in new web UI (in bz1922996).

1. When creating a colocation constraint and setting a score (e.g. 20) with 'together' placement, a constraint is then shown with 'apart' description.

2. When creating an Order set or Colocation set, the second (newly added) set doesn't have any check for given resources and can be passed with no resource at all. This will end with an error and cib is printed in 'Messages' window.

3. When creating a Ticket, specifying 'Role' with 'no limitation' ends up with 'Started' role. The same goes for the Ticket set

4. Another issue with a Ticket is that a constraint with any other 'Role' than 'no limitation' can't be created (e.g. Started or Stopped role)

5. Ticket constraints can't be deleted (it seems that the id of the constraint is not parsed correctly). This is not an issue with other constraints.


Version-Release number of selected component (if applicable):
pcs-0.10.10-1.el8


How reproducible:
always


Steps to Reproduce:
- open new web ui
- go to the Constraint section
- create an constraint according to the description above


Actual results:

issue 1:
--------
"Type Colocation
Resources d1 in role Started and d2 in role Started are separate
Score 20"

issue 2:
--------
- in 'Review' of created constraint order set
"Review settings

Id
    Not set; will be generated
Resource set 1

    Resources
        d1, d2, d3
    Action
        start
    Sequential
        yes
    Require all
        yes

Resource set 2

    Resources
    Action
        no limitation
    Sequential
        yes
    Require all
        yes"

"Task "create order constraint with resource set" failed
Operation has not completed sucessfully (see messages below). You can return back, change settings and try again. All messages below will stay available."
{cib output in Messages}

> There is also a typo in 'sucessfully', which should be 'successfully'

issue 3:
--------
"Type Ticket
Resource d1 in role Started depends on ticket test1
Loss policy"

> Also, the loss policy here is not shown

issue 4:
--------
"Task "create ticket constraint" failed
Operation has not completed sucessfully (see messages below). You can return back, change settings and try again. All messages below will stay available.
Messages
Danger alert:invalid option 'role', allowed options are: 'id', 'loss-policy', 'rsc', 'rsc-role', 'ticket'"

issue 5:
--------
"Delete constraint
Delete constraint ""?"
"Task: delete constraint failed

Error removing constraint:

Details in the browser console."
- in console:
"Communication error while: delete constraint :
Server returned http status: 400 (Error removing constraint: )"


Expected results:
the issues are not present


Additional info:

Comment 1 Ivan Devat 2021-10-11 08:57:13 UTC
Created attachment 1831778 [details]
proposed fix

Tests in web ui:
1. 
* Create a colocation constraint with "together" placement. 
* The created constraint should be displayed with "together" placement.

2. 
* Start creation of an order constraint with resource sets. 
* Add resource in the first resource set.
* Add new resource set but don't select any resource.
* Click "next".
* You should stay on the same step with validation error.

3.
* Create a ticket constraint and select "no-limitation" for role.
* The created constraint should be displayed without role specification.

4.
* Create a ticket constraint and select e.g. "Started" for role.
* The constraint should be created successfully.

5.
* Delete a ticket constraint.
* The constraint should be deleted successfully.

Comment 3 Miroslav Lisik 2021-11-02 09:21:08 UTC
DevTestResults:

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


Issue 1) colocation constraint, together, score=20
Result:
Type Colocation
Resources d1 in role Started and d2 in role Started are together
Score 20

Issue 2) order set & colocation set with more resource sets
If you try to create order/colocation set constraint with empty resource sets then a red note will show up after clicking on the 'Next' button:
a) 1st resource set: Please provide at least 2 resources
b) 2nd and subsequent sets: Please provide at least 1 resource

Wizard will not continue to the next step.

Issue 3)
a) ticket constraint - Ticket: T1, loss policy: stop, Resource: d1, Role: no limitation
Result: Type Ticket     Resource d1 depends on ticket T1

b) ticket constraint set - Resource set 1: d2, d3,  Role: no limitation, Ticket: T2, Loss policy: stop
Result: Type Ticket (set)   Resources d2, d3 depends on ticket T2


Issue 4) ticket constraint with other role then 'no limitation' can be created:

Result: Type Ticket     Resource d1 in role Started depends on ticket T1

Issue 5) deleting of ticket constraints

Result: ticket constraints can be deleted

Comment 5 Ivan Devat 2021-11-09 14:05:39 UTC
Created attachment 1840887 [details]
proposed fix 2

Test:
1. create ticket constraint with resource set with any other role than "no limitation" - constraint is successfully created
2. create ticket constraint - loss policy for newly created ticket is displayed

Comment 6 Miroslav Lisik 2021-12-02 15:28:24 UTC
DevTestResults:

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

1) Ticket constraint with other role than "no limitation" can be crated.

Ticket: T1, Loss policy: stop (default), Resource: d-01, Role: Started

Result:

Type Ticket
Resource d-01 in role Started depends on ticket T1
Loss policy stop

2) Ticket constraint shows loss policy

Comment 10 Michal Mazourek 2021-12-14 15:11:42 UTC
AFTER FIX:
==========

## in cli

[root@virt-266 ~]# rpm -q pcs
pcs-0.10.12-1.el8.x86_64

[root@virt-266 ~]# pcs resource
  * d1	(ocf::heartbeat:Dummy):	 Started virt-266
  * d2	(ocf::heartbeat:Dummy):	 Started virt-267


## in web UI

1. open new web UI (https://nodename:2224/ui)
2. log in
3. Click 'Add existing cluster' button and proceed with the wizard
4. Click on the added cluster
5. Switch to 'Constraints' tab


## cases from comment 0.

# case 1: colocation constraint, together placement, score 20
'Type Colocation
Resources d1 in role Started and d2 in role Started are together
Score 20'

> OK: The constraint is no longer shown with 'apart' description


# case 2: order set constraint, 2 resource sets, the second set is empty

> OK: There is now a check for the subsequent sets with error message: "Please provide at least 1 resource"

# colocation set constraint, 2 resource sets, the second set is empty

> OK: Same as the order set constraint, this case is now checked with message: "Please provide at least 1 resource"


# case 3: ticket constraint, role no limitation 
'Type Ticket    
Resource d1 depends on ticket test 
Loss policy stop' 
 
> OK: The role is not started, when no limitation is specified

# ticket set constraint, role no limitation
'Type Ticket (set)

    Resources d1, d2 depends on ticket test

Loss policy stop'

> OK


# case 4: ticket constraint, role Started
'Type Ticket
Resource d1 in role Started depends on ticket test
Loss policy stop'

> OK: The role is correct and the loss policy is shown

# ticket constraint, loss policy fence, role Started
'Type Ticket
Resource d1 in role Started depends on ticket test
Loss policy fence'

> OK

# ticket constraint, loss policy demote, role Promoted
'Type Ticket
Resource d1 in role Master depends on ticket test
Loss policy demote'

> OK

# ticket constraint, loss policy freeze, role Unpromoted, custom_id
'Type Ticket
Resource d1 in role Slave depends on ticket test
Loss policy freeze'

> OK

# ticket set constraint, role Started
'Type Ticket (set)

    Resources d1, d2 in role Started depends on ticket test

Loss policy stop'

> OK

# ticket set constraint, role Stopped, Loss policy freeze
'Type Ticket (set)

    Resources d1, d2 in role Stopped depends on ticket test

Loss policy freeze'

# ticket set constraint, first set Promoted, second set Unpromoted, Loss policy demote
'Type Ticket (set)

Resources d1 in role Master depends on ticket test

    Resources d2 in role Slave depends on ticket test

Loss policy demote'

> OK


# case 5: ticket and ticket sets

> OK: ticket and ticket set constraints can be deleted

 
Marking as VERIFIED in pcs-0.10.12-1.el8.

Comment 12 errata-xmlrpc 2022-05-10 14:50:42 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-2022:1978


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