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

pcs commands should not wrap output when piped to grep [rhel-9]

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Major Major
    • rhel-9.5
    • rhel-9.0.0
    • pcs
    • pcs-0.11.7-3.el9
    • None
    • Moderate
    • Customer Facing, Customer Reported
    • rhel-sst-high-availability
    • ssg_filesystems_storage_and_HA
    • 17
    • 23
    • 3
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • Bug Fix
    • Hide
      .`pcs` output no longer wrapped when piped to the `grep` utility

      Previously, when the `pcs` output was piped to another process, the output width always defaulted to 80 characters. This made it difficult to use the `grep` utility to look for specific lines in the output. With this change, `pcs` does not wrap its output when piped to `grep`.

      Show
      .`pcs` output no longer wrapped when piped to the `grep` utility Previously, when the `pcs` output was piped to another process, the output width always defaulted to 80 characters. This made it difficult to use the `grep` utility to look for specific lines in the output. With this change, `pcs` does not wrap its output when piped to `grep`.
    • Done
    • None

      What were you trying to do that didn't work?

      'pcs resource config | grep something' wraps output to 80 columns, which makes it difficult to grep for specified values

      Please provide the package NVR for which bug is seen:

      pcs-0.11.7-2

      How reproducible:

      always, easily

      Steps to reproduce

      1. pcs resource create test ocf:pacemaker:Dummy 'fake=this is a very long instance attribute value of the dummy resource demonstrating the issue'
      2. pcs resource config test | cat

      Expected results

      pcs output is not wrapped:

       Resource: test (class=ocf provider=pacemaker type=Dummy)
        Attributes: test-instance_attributes
          fake="this is a very long instance attribute value of the dummy resource demonstrating the issue"
        Operations:
        ...
      

      Actual results

      pcs output is wrapped:

      Resource: test (class=ocf provider=pacemaker type=Dummy)
        Attributes: test-instance_attributes
          fake="this is a very long instance attribute value of the dummy resource
              demonstrating the issue"
        Operations:
        ...
      

      Workaround

      'pcs resource config test 2>/dev/null | cat' or 'pcs resource config test 2>&1 | cat'

              mmazoure Michal Mazourek
              tojeline@redhat.com Tomas Jelinek
              Tomas Jelinek Tomas Jelinek
              Michal Mazourek Michal Mazourek
              Steven Levine Steven Levine
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: