Bug 2111583 - Warning about existing constraints in 'pcs status' should not display expired constraints
Summary: Warning about existing constraints in 'pcs status' should not display expired...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcs
Version: 8.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks: 2111591
TreeView+ depends on / blocked
 
Reported: 2022-07-27 14:43 UTC by Nina Hostakova
Modified: 2023-08-10 15:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 2111591 (view as bug list)
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-129304 0 None None None 2022-07-27 14:46:08 UTC

Description Nina Hostakova 2022-07-27 14:43:10 UTC
Description of problem:
The new feature of pcs prints out a warning when location constraints are created by moving resources. The warning about existing constraints is displayed in 'pcs status' as well. This warning should not be present in status when the constraint is no longer in effect, i.e. temporary constraints created with --lifetime parameter that are already expired.

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

How reproducible:
always

Steps to Reproduce:

# pcs resource move dummy1 lifetime=PT1M
Migration will take effect until: 2022-07-20 15:13:12 +02:00
Warning: Creating location constraint 'cli-ban-dummy1-on-virt-487' with a score of -INFINITY for resource dummy1 on virt-487.
	This will prevent dummy1 from running on virt-487 until the constraint is removed
	This will be the case even if virt-487 is the last node in the cluster

# date
Wed Jul 20 15:12:17 CEST 2022

# pcs constraint location
Location Constraints:
  Resource: dummy1
    Constraint: cli-ban-dummy1-on-virt-487
      Rule: boolean-op=and score=-INFINITY
        Expression: #uname eq string virt-487
        Expression: date lt 2022-07-20 15:13:12 +02:00

# pcs status | grep "WARNINGS" -A 3
WARNINGS:
Following resources have been moved and their move constraints are still in place: 'dummy1'
Run 'pcs constraint location' or 'pcs resource clear <resource id>' to view or remove the constraints, respectively

# date
Wed Jul 20 15:13:22 CEST 2022

# pcs constraint location
Location Constraints:

# pcs status | grep "WARNINGS" -A 3
WARNINGS:
Following resources have been moved and their move constraints are still in place: 'dummy1'
Run 'pcs constraint location' or 'pcs resource clear <resource id>' to view or remove the constraints, respectively

Additional info:
Introduced in RFE bz1730232


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