Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-7669

Warning about existing constraints in 'pcs status' should not display expired constraints

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • rhel-9.4
    • rhel-9.1.0
    • pcs
    • pcs-0.11.6-6.el9
    • None
    • None
    • rhel-sst-high-availability
    • ssg_filesystems_storage_and_HA
    • 13
    • 19
    • 2
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • Bug Fix
    • Hide
      .Output of `pcs status` command no longer shows warning for expired constraints

      Previously, when moving a cluster resource created a temporary location constraint, the `pcs status` command displayed a warning even after the constraint expired. With this fix, the `pcs status` command filters out expired constraints and they no longer generate a warning message in the command output.
      Show
      .Output of `pcs status` command no longer shows warning for expired constraints Previously, when moving a cluster resource created a temporary location constraint, the `pcs status` command displayed a warning even after the constraint expired. With this fix, the `pcs status` command filters out expired constraints and they no longer generate a warning message in the command output.
    • Done
    • None

      +++ This bug was initially created as a clone of Bug #2111583 +++

      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:

      1. 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
      1. date
        Wed Jul 20 15:12:17 CEST 2022
      1. 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
      1. 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
      1. date
        Wed Jul 20 15:13:22 CEST 2022
      1. pcs constraint location
        Location Constraints:
      1. 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

            [RHEL-7669] Warning about existing constraints in 'pcs status' should not display expired constraints

            Errata Tool added a comment -

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Moderate: pcs security 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-2024:2113

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Moderate: pcs security 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-2024:2113

            slevine@redhat.com :

            Output of `pcs status` command no longer shows warning for expired constraints
            Previously, when moving a cluster resource created a temporary location constraint, the `pcs status` command displayed a warning even after the constraint expired. With this fix, the `pcs status` command filters out expired constraints and they no longer generate a warning message in the command output.

            LGTM

            Tomas Jelinek added a comment - slevine@redhat.com : Output of `pcs status` command no longer shows warning for expired constraints Previously, when moving a cluster resource created a temporary location constraint, the `pcs status` command displayed a warning even after the constraint expired. With this fix, the `pcs status` command filters out expired constraints and they no longer generate a warning message in the command output. LGTM

            tojeline@redhat.com:

            This is my proposed release note for this bug fix:

            Output of `pcs status` command no longer shows warning for expired constraints

            Previously, when moving a cluster resource created a temporary location constraint, the `pcs status` command displayed a warning even after the constraint expired. With this fix, the `pcs status` command filters out expired constraints and they no longer generate a warning message in the command output.

            Steven Levine added a comment - tojeline@redhat.com : This is my proposed release note for this bug fix: Output of `pcs status` command no longer shows warning for expired constraints Previously, when moving a cluster resource created a temporary location constraint, the `pcs status` command displayed a warning even after the constraint expired. With this fix, the `pcs status` command filters out expired constraints and they no longer generate a warning message in the command output.

            DevTestResults:

            [root@r09-04-a ~]# rpm -q pcs
            pcs-0.11.6-6.el9.x86_64
            
            [root@r09-04-a ~]# pcs resource move-with-constraint d1 lifetime=PT1M     
            Migration will take effect until: 2023-11-22 16:54:08 +01:00
            Warning: Creating location constraint 'cli-ban-d1-on-r09-04-a.vm' with a score of -INFINITY for resource d1 on r09-04-a.vm.
                   This will prevent d1 from running on r09-04-a.vm until the constraint is removed
                   This will be the case even if r09-04-a.vm is the last node in the cluster
            
            [root@r09-04-a ~]# date
            Wed Nov 22 04:53:11 PM CET 2023
            
            [root@r09-04-a ~]# pcs constraint location
            Location Constraints:
             Started resource 'd1'
               Rules:
                 Rule: boolean-op=and score=-INFINITY
                   Expression: #uname eq string r09-04-a.vm
                   Expression: date lt 2023-11-22T16:54:08+01:00
            
            [root@r09-04-a ~]# pcs status | grep "WARNINGS" -A 3
            WARNINGS:
            Following resources have been moved and their move constraints are still in place: 'd1'
            Run 'pcs constraint location' or 'pcs resource clear <resource id>' to view or remove the constraints, respectively
            
            [root@r09-04-a ~]# date
            Wed Nov 22 04:54:14 PM CET 2023
            [root@r09-04-a ~]# pcs constraint location          
            
            [root@r09-04-a ~]# pcs constraint location --all
            Location Constraints:
             Started resource 'd1'
               Rules:
                 Rule (expired): boolean-op=and score=-INFINITY
                   Expression: #uname eq string r09-04-a.vm
                   Expression: date lt 2023-11-22T16:54:08+01:00
            
            [root@r09-04-a ~]# pcs status | grep "WARNINGS" -A 3 | wc -l
            0
            

            Michal Pospisil added a comment - DevTestResults: [root@r09-04-a ~]# rpm -q pcs pcs-0.11.6-6.el9.x86_64 [root@r09-04-a ~]# pcs resource move-with-constraint d1 lifetime=PT1M Migration will take effect until: 2023-11-22 16:54:08 +01:00 Warning: Creating location constraint 'cli-ban-d1-on-r09-04-a.vm' with a score of -INFINITY for resource d1 on r09-04-a.vm. This will prevent d1 from running on r09-04-a.vm until the constraint is removed This will be the case even if r09-04-a.vm is the last node in the cluster [root@r09-04-a ~]# date Wed Nov 22 04:53:11 PM CET 2023 [root@r09-04-a ~]# pcs constraint location Location Constraints: Started resource 'd1' Rules: Rule: boolean-op=and score=-INFINITY Expression: #uname eq string r09-04-a.vm Expression: date lt 2023-11-22T16:54:08+01:00 [root@r09-04-a ~]# pcs status | grep "WARNINGS" -A 3 WARNINGS: Following resources have been moved and their move constraints are still in place: 'd1' Run 'pcs constraint location' or 'pcs resource clear <resource id>' to view or remove the constraints, respectively [root@r09-04-a ~]# date Wed Nov 22 04:54:14 PM CET 2023 [root@r09-04-a ~]# pcs constraint location [root@r09-04-a ~]# pcs constraint location --all Location Constraints: Started resource 'd1' Rules: Rule (expired): boolean-op=and score=-INFINITY Expression: #uname eq string r09-04-a.vm Expression: date lt 2023-11-22T16:54:08+01:00 [root@r09-04-a ~]# pcs status | grep "WARNINGS" -A 3 | wc -l 0

            gitlab-bot added a comment -

            Michal Pospíšil mentioned this issue in a commit of Red Hat / centos-stream / rpms / pcs on branch c9s:

            pcs-0.11.6-6

            gitlab-bot added a comment - Michal Pospíšil mentioned this issue in a commit of Red Hat / centos-stream / rpms / pcs on branch c9s : pcs-0.11.6-6

            gitlab-bot added a comment -

            Michal Pospíšil mentioned this issue in a merge request of Red Hat / centos-stream / rpms / pcs on branch 9.4-pre3:

            pcs-0.11.6-6

            gitlab-bot added a comment - Michal Pospíšil mentioned this issue in a merge request of Red Hat / centos-stream / rpms / pcs on branch 9.4-pre3 : pcs-0.11.6-6

            pm-rhel added a comment -

            Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

            pm-rhel added a comment - Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

            Upstream commit: https://github.com/ClusterLabs/pcs/commit/6ee066ad288a86c0d9810bff46f10ba79bc2c4f6

            Environment: A running cluster with resource

            Test:

            1. pcs resource move-with-constraint dummy1 lifetime=PT1M
              Migration will take effect until: 2023-09-14 08:47:01 +02:00
              Warning: Creating location constraint 'cli-ban-dummy1-on-r92-2' with a score of -INFINITY for resource dummy1 on r92-2.
              This will prevent dummy1 from running on r92-2 until the constraint is removed
              This will be the case even if r92-2 is the last node in the cluster
            1. date
              Thu Sep 14 08:46:06 AM CEST 2023
            1. pcs constraint location
              Location Constraints:
              Started resource 'dummy1'
              Rules:
              Rule: boolean-op=and score=-INFINITY
              Expression: #uname eq string r92-2
              Expression: date lt 2023-09-14T08:47:01+02:00
            1. 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
            1. date
              Thu Sep 14 08:49:14 AM CEST 2023
            1. pcs constraint location
            1. pcs status | grep "WARNINGS" -A 3 | wc -l
              0

            Peter Romancik added a comment - Upstream commit: https://github.com/ClusterLabs/pcs/commit/6ee066ad288a86c0d9810bff46f10ba79bc2c4f6 Environment: A running cluster with resource Test: pcs resource move-with-constraint dummy1 lifetime=PT1M Migration will take effect until: 2023-09-14 08:47:01 +02:00 Warning: Creating location constraint 'cli-ban-dummy1-on-r92-2' with a score of -INFINITY for resource dummy1 on r92-2. This will prevent dummy1 from running on r92-2 until the constraint is removed This will be the case even if r92-2 is the last node in the cluster date Thu Sep 14 08:46:06 AM CEST 2023 pcs constraint location Location Constraints: Started resource 'dummy1' Rules: Rule: boolean-op=and score=-INFINITY Expression: #uname eq string r92-2 Expression: date lt 2023-09-14T08:47:01+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 Thu Sep 14 08:49:14 AM CEST 2023 pcs constraint location pcs status | grep "WARNINGS" -A 3 | wc -l 0

              cluster-qe Cluster QE
              rhn-support-nhostako Nina Hostakova
              Peter Romancik Peter Romancik
              Nina Hostakova Nina Hostakova
              Steven Levine Steven Levine
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: