Bug 1922996
Summary: | New web UI - add more functionalities to the cluster management | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Ivan Devat <idevat> |
Component: | pcs | Assignee: | Ivan Devat <idevat> |
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> |
Severity: | unspecified | Docs Contact: | Steven J. Levine <slevine> |
Priority: | high | ||
Version: | 8.4 | CC: | cfeist, cluster-maint, idevat, mlisik, mmazoure, mpospisi, omular, slevine, tojeline |
Target Milestone: | rc | Keywords: | TechPreview, Triaged |
Target Release: | 8.5 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | pcs-0.10.8-2.el8 | Doc Type: | Technology Preview |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-11-09 17:33:51 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1552470, 1996067, 1999014 |
Description
Ivan Devat
2021-02-01 09:22:18 UTC
Features * create constraints * location * colocation * colocation with resource set * order * order with resource set * ticket * ticket with resource set * delete constraints Following bugs will be included in bz1970508 Test: [root@r8-node-01 ~]# rpm -q pcs pcs-0.10.8-2.el8.x86_64 * It is possible to create constraints: * location * colocation * colocation with resource set * order with set * ticket * ticket with resource set * It is possible to delete all types of constraints. There is a bug in order constraint creation: Create order constraint failed Error adding constraint: Error: missing value of '' option AFTER: ====== [root@virt-037 ~]# rpm -q pcs pcs-0.10.10-1.el8.x86_64 ## Have a cluster [root@virt-037 ~]# pcs status Cluster name: STSRHTS8897 Cluster Summary: * Stack: corosync * Current DC: virt-037 (version 2.1.0-5.el8-7c3f660707) - partition with quorum * Last updated: Wed Aug 18 11:54:30 2021 * Last change: Wed Aug 18 10:12:57 2021 by root via cibadmin on virt-037 * 2 nodes configured * 2 resource instances configured Node List: * Online: [ virt-037 virt-038 ] Full List of Resources: * fence-virt-037 (stonith:fence_xvm): Started virt-037 * fence-virt-038 (stonith:fence_xvm): Started virt-038 Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled ## Steps in web UI - open the web ui (https://<hostname>:2224/ui/) - log in - click 'Add existing cluster' and proceed with adding cluster (via virt-037 in this case) - Click on the added cluster - Click on 'Constraints' menu "No constraint is configured. You don't have any configured constraint here." > OK note: a new menu for creating each constraint is present ## Preparing resources for constraint usage [root@virt-037 ~]# pcs resource create d1 ocf:heartbeat:Dummy [root@virt-037 ~]# pcs resource create d2 ocf:heartbeat:Dummy ## Location constraint - Click on 'Create Location' - Select a resource or type resource pattern - Select a node or type a rule - Choose preference (prefer/avoid) - Type a score cases: ====== case 1: d1, node virt-037, prefer, INFINITY - in web UI: "Type Location Resource d1 in role Started on node virt-037 Score INFINITY" - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Resource: d1 Enabled on: Node: virt-037 (score:INFINITY) (id:location-d1-virt-037-INFINITY) Ordering Constraints: Colocation Constraints: Ticket Constraints: > OK [root@virt-037 ~]# pcs resource | grep d1 * d1 (ocf::heartbeat:Dummy): Started virt-037 > OK - Clicking on the trash can icon to delete the constraint - confirmation dialog is shown > OK: constraint is deleted from web UI and from CLI successfully case 2: d1 (typed as resource pattern), typed rule of 'date gt 2021-08-15', prefer, 10 - in web UI: "Type Location (rule) Resources matching d1 in role Started according to the rule date gt 2021-08-15 Score 10" - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Resource pattern: d1 Constraint: location-d1 Rule: score=10 (id:location-d1-rule) Expression: date gt 2021-08-15 (id:location-d1-rule-expr) Ordering Constraints: Colocation Constraints: Ticket Constraints: > OK # deleting the constraint case 3: d1, node virt-037, avoid, INFINITY - in web UI: "Type Location Resource d1 in role Started on node virt-037 Score -INFINITY" > OK: Avoid is reached by changing INFINITY to -INFINITY with prefer - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Resource: d1 Disabled on: Node: virt-037 (score:-INFINITY) (id:location-d1-virt-037--INFINITY) Ordering Constraints: Colocation Constraints: Ticket Constraints: > OK [root@virt-037 ~]# pcs resource | grep d1 * d1 (ocf::heartbeat:Dummy): Started virt-038 > OK # deleting the constraint case 4: d1, node virt-037, avoid, -INFINITY > This can't be done with warning message "Score must be integer or INFINITY". This is ok, as every option can be reached by prefer/avoid and INFINITY (-INFINITY avoid can be reached as INFINITY prefer) case 5: input options - Omitting a resource: OK, exclamation mark with resource field - Omitting a node: OK, exclamation mark with node field - Omitting a score: OK, constraint created with default score value INFINITY - Input an invalid rule: OK: "Create location constraint failed Error adding constraint: Error: 'test test' is not a valid rule expression: unexpected 'test'". Buttons: "Start from the beginning", "Try again", "Cancel" ## Create Order - Click on "Create Order" button - First resource - Action - Then resource - Action - Score cases: ====== case 1: d1, start, d2, start, INFINITY - in web UI: "Type Order Resource d1 starts before resource d2 starts Score INFINITY" -in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: start d1 then start d2 (score:INFINITY) (id:order-d1-d2-INFINITY) Colocation Constraints: Ticket Constraints: > OK # Delete constraint case 2: d2, promote, d1, promote, 10 - in web UI: "Type Order Resource d2 promotes before resource d1 promotes Score 10" - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: promote d2 then promote d1 (score:10) (id:order-d2-d1-10) Colocation Constraints: Ticket Constraints: > OK # Delete constraint case 3: d1, stop, d2, demote, nothing (mandatory by default) - in web UI: "Type Order Resource d1 stops before resource d2 demotes" - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: stop d1 then demote d2 (kind:Mandatory) (id:order-d1-d2-mandatory) Colocation Constraints: Ticket Constraints: > OK # Delete constraint case 4: Inputs - the same resources can't be select for First and Then resource - exclamation mark when omitting one of the resources - 'Score must be integer or INFINITY' when giving score as negative number or text ## Create Order Set - Click on "Create Order Set" button. A setup wizard of the new constraint will appear - 1. Resource Sets - resources - Action (with help message) - Sequential (with help message) - Require all (with help message) - Add resource set - 2. Options - Use custom id - 3. Review # Creating more resources [root@virt-037 ~]# pcs resource create d3 ocf:heartbeat:Dummy [root@virt-037 ~]# pcs resource create d4 ocf:heartbeat:Dummy case 1: resource set d1;d2;d3, start action, sequential, require all, not custom id - in web UI Review: "Review settings Id Not set; will be generated Resource set 1 Resources d1, d2, d3 Action start Sequential yes Require all yes" - Create order constraint (alternative choices are Back or Cancel) - in web UI: "Type Order (set) Resources d1, d2, d3 start in given order Sequential true Require all true" - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: Resource Sets: set d1 d2 d3 action=start require-all=true sequential=true (id:order_set_d1d2d3_set) (id:order_set_d1d2d3) Colocation Constraints: Ticket Constraints: > OK # Deleting the constraint case 2: resource set1 d1;d2, stop action, sequential, require all, resource set2 d3;d4, stop action, not sequential, not require all, custom id set1 - in web UI Review: "Id set1 Resource set 1 Resources d1, d2 Action stop Sequential yes Require all yes Resource set 2 Resources d3, d4 Action stop Sequential no Require all no" - Create order constraint - in web UI: "Type Order (set) Resources d1, d2 stop in given order Sequential true Require all true Resources d3, d4 stop in given order Sequential false Require all false" in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: Resource Sets: set d1 d2 action=stop require-all=true sequential=true (id:set1_set) set d3 d4 action=stop require-all=false sequential=false (id:set1_set-1) (id:set1) Colocation Constraints: Ticket Constraints: > OK # Deleting the constraint case 3: Inputs - the setup will not let you continue with just one resource given (even if the resources are deleted after selected once - "Please provide at least 2 resources") - Sequential can be turned off only with more resource set, require all can be turned off only when sequential is turned off ## Create Colocation - Click on "Create Colocation" button - Resource - With resource - Placement - Score case 1: d1, d2, together, INFINITY - in web UI: "Type Colocation Resources d1 in role Started and d2 in role Started are together Score INFINITY" - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: Colocation Constraints: d1 with d2 (score:INFINITY) (id:colocation-d1-d2-INFINITY) Ticket Constraints: [root@virt-037 ~]# pcs resource | grep "d1\|d2" * d1 (ocf::heartbeat:Dummy): Started virt-037 * d2 (ocf::heartbeat:Dummy): Started virt-037 > OK # Deleting the constraint case 2: d1, d2, apart, score omitting (default value) - in web UI: "Type Colocation Resources d1 in role Started and d2 in role Started are separate Score -INFINITY " - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: Colocation Constraints: d1 with d2 (score:-INFINITY) (id:colocation-d1-d2--INFINITY) Ticket Constraints: [root@virt-037 ~]# pcs resource | grep "d1\|d2" * d1 (ocf::heartbeat:Dummy): Started virt-037 * d2 (ocf::heartbeat:Dummy): Started virt-038 > OK # Deleting the constraint case 3: d1, d2, apart, score 20 - in web UI: "Type Colocation Resources d1 in role Started and d2 in role Started are separate Score -20" - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: Colocation Constraints: d1 with d2 (score:-20) (id:colocation-d1-d2--20) Ticket Constraints: [root@virt-037 ~]# pcs resource | grep "d1\|d2" * d1 (ocf::heartbeat:Dummy): Started virt-037 * d2 (ocf::heartbeat:Dummy): Started virt-038 > OK # Deleting the constraint case 4: d1, d2, together, score 20 - in web UI: "Type Colocation Resources d1 in role Started and d2 in role Started are separate Score 20" - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: Colocation Constraints: d1 with d2 (score:20) (id:colocation-d1-d2-20) Ticket Constraints: [root@virt-037 ~]# pcs resource | grep "d1\|d2" * d1 (ocf::heartbeat:Dummy): Started virt-038 * d2 (ocf::heartbeat:Dummy): Started virt-038 > There is an issue, constraint is shown in web UI in a confusion manner, as "Resources d1 in role Started and d2 in role Started are separate" even though the resources are started together. This is only when positive score (not INFINITY) is given. The function and status in CLI are correct. # Deleting the constraint case 5: Inputs - "Please select a resource" when omitting one of the resources - The same resource can't be selected as both - Resource and With resource - "Score must be integer or INFINITY" when passing negative number or test to score ## Colocation set - Click on "Create Colocation Set" button, setup wizard will appear - Resource Sets - resources - Sequential - role - Options - Use custom id - Placement - together/apart - Score - Review case 1: resource set d1;d2;d3, Sequential, started, no custeom id, placement together, score INFINITY - in web UI Review: "Review settings Id Not set; will be generated Resource set 1 Resources d1, d2, d3 Sequential yes Role Started" in web UI: "Type Colocation (set) Resources d1, d2, d3 in role Started are together Score INFINITY Sequential true" in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: Colocation Constraints: Resource Sets: set d1 d2 d3 role=Started sequential=true (id:colocation_set_d1d2d3_set) setoptions score=INFINITY (id:colocation_set_d1d2d3) Ticket Constraints: [root@virt-037 ~]# pcs resource | grep "d1\|d2\|d3" * d1 (ocf::heartbeat:Dummy): Started virt-038 * d2 (ocf::heartbeat:Dummy): Started virt-038 * d3 (ocf::heartbeat:Dummy): Started virt-038 > OK # Deleting the constraint case 2: resource set1 d1;d2, Sequential, Started, resource set2 d3;d4, not sequential, Started, custom id set1, together, score 20 - in web UI Review: "Review settings Id set1 Resource set 1 Resources d1, d2 Sequential yes Role Started Resource set 2 Resources d3, d4 Sequential no Role Started" in web UI: "Type Colocation (set) Resources d1, d2 in role Started are separate Score 20 Sequential true Resources d3, d4 in role Started are separate Score 20 Sequential false" > The same cosmetic issue, resources are marked as separate, it should be 'together'. This is written correctly, when INFINITY score is used in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: Colocation Constraints: Resource Sets: set d1 d2 role=Started sequential=true (id:set1_set) set d3 d4 role=Started sequential=false (id:set1_set-1) setoptions score=20 (id:set1) Ticket Constraints: [root@virt-037 ~]# pcs resource * d1 (ocf::heartbeat:Dummy): Started virt-038 * d2 (ocf::heartbeat:Dummy): Started virt-038 * d3 (ocf::heartbeat:Dummy): Started virt-038 * d4 (ocf::heartbeat:Dummy): Started virt-038 > OK # Deleting the constraint case 3: resource set1 d1;d2, not sequential, role no limitation, resource set2 d3;d4, Sequential, Master, not custom id, apart, default score - in web UI Review: "Review settings Id Not set; will be generated Resource set 1 Resources d1, d2 Sequential no Role no limitation Resource set 2 Resources d3, d4 Sequential yes Role Master" - in web UI: "Type Colocation (set) Resources d1, d2 in role Started are separate Score -INFINITY Sequential false Resources d3, d4 in role Master are separate Score -INFINITY Sequential true" in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: Colocation Constraints: Resource Sets: set d1 d2 sequential=false (id:colocation_set_d1d2d3_set) set d3 d4 role=Master sequential=true (id:colocation_set_d1d2d3_set-1) setoptions score=-INFINITY (id:colocation_set_d1d2d3) Ticket Constraints: > OK # Deleting the constraint case 4: Inputs - Not choosing resources: "Please provide at least 2 resources" - Sequential can't be turned off, if only single resource set is used - If there are more multiple sets, the check is active only on the first one, the second resource set can be passed without resources and eventually will fail on creation "Task "create colocation 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." and cib output is shown. Ideally this should be prevented > An issue described above was found, the same goes for order set constraint ## Ticket - Click on "Create Ticket" - Ticket - Loss policy - Resource - Role - Use custom id case 1: ticket test, loss policy stop, resource d1, role Started, no custom id - in web UI: "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'" > An issue was found: Ticket can't be created with specified role case 1: ticket test, loss policy stop, resource d1, role no limitation, no custom id - in web UI: "Type Ticket Resource d1 in role Started depends on ticket test" - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: Colocation Constraints: Ticket Constraints: d1 ticket=test (id:ticket-test-d1) > An issue was found: Resource is market in web UI as "role Started", even though it should have no limitation # Deleting the constraint: "Task: delete constraint failed Error removing constraint: Details in the browser console. " > An issue was found: Ticket constraints can't be deleted ## Ticket set - Click on "Create Ticket Set" - Resource Sets - resources - role - Options - Review case 1: resources d1;d2, role no limitation, no custom id, test, loss policy stop - in web UI Review: "Review settings Id Not set; will be generated Loss policy stop Resource set 1 Resources d1, d2 Role no limitation" - in web UI: "Type Ticket (set) Resources d1, d2 in role Started depends on ticket test Loss policy stop" > An issue: same as with Ticket constraint, no limitation is translated to Started - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: Colocation Constraints: Ticket Constraints: Resource Sets: set d1 d2 (id:ticket_set_d1d2_set) setoptions loss-policy=stop ticket=test (id:ticket_set_d1d2) # Deleting the constraint case 2: resource set1 d1;d2, role Started, resource set2 d3;d4, role Master, custom id set1, ticket test, loss policy demote - in web UI Review: "Review settings Id set1 Loss policy demote Resource set 1 Resources d1, d2 Role no limitation Resource set 2 Resources d3, d4 Role no limitation" - in web UI: "Type Ticket (set) Resources d1, d2 in role Started depends on ticket test Resources d3, d4 in role Started depends on ticket test" > An issue: role with ticket set constraint can be created (unlike with Ticket constraint), hovewer it is always translated to Started, similiar problem as in case above - in CLI: [root@virt-037 ~]# pcs constraint --full Location Constraints: Ordering Constraints: Colocation Constraints: Ticket Constraints: Resource Sets: set d1 d2 (id:set1_set) set d3 d4 (id:set1_set-1) setoptions loss-policy=demote ticket=test (id:set1) # Deleting the constraint case 3: Inputs - with one resource set, at least 2 resources have to be selected - with two or more resource sets, at least one resource each has to be selected - with two or more resource sets, when first resource set have at least 2 resource, other sets can be passed without resources causing error > An issue, that has been described above - ticket has to be specified ("Please provide ticket") Conclusion: =========== Several issues were find while testing the constraints. A new BZ was created for this situation, mentioning all of the found issues - bz1997011, which will be resolved in upcoming release. Marking as VERIFIED for pcs-0.10.10-1.el8 with bz1997011 filed 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-2021:4142 |