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

Unexpected broken pipe when grep text from virt-install --help

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • rhel-9.3.0
    • virt-manager / Common
    • None
    • None
    • Moderate
    • rhel-sst-virtualization
    • ssg_virtualization
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • x86_64
    • None

      Package Versions:

      virt-install-4.1.0-4.el9.noarch

      Description of problem:

       
      A broken pipe error message when grep "-" from --help
       
      Steps to reproduce:

      #virt-install --help | grep "-r"
      

       
      expected result:
       
      Since I did not put an \ in front of -, I should get nothing for this command
       
      actual result:
       

      Usage: grep [OPTION]... PATTERNS [FILE]...
      Try 'grep --help' for more information.
        File "/usr/bin/virt-install", line 8, in <module>
          virtinstall.runcli()
        File "/usr/share/virt-manager/virtinst/virtinstall.py", line 1241, in runcli
          fail(main_e)
        File "/usr/share/virt-manager/virtinst/cli.py", line 256, in fail
          log.debug("".join(traceback.format_stack()))
      
      [Errno 32] Broken pipe
      
      Traceback (most recent call last):
        File "/usr/share/virt-manager/virtinst/virtinstall.py", line 1234, in runcli
          sys.exit(main())
        File "/usr/share/virt-manager/virtinst/virtinstall.py", line 1186, in main
          options = parse_args()
        File "/usr/share/virt-manager/virtinst/virtinstall.py", line 1144, in parse_args
          return parser.parse_args()
        File "/usr/lib64/python3.9/argparse.py", line 1825, in parse_args
          args, argv = self.parse_known_args(args, namespace)
        File "/usr/lib64/python3.9/argparse.py", line 1858, in parse_known_args
          namespace, args = self._parse_known_args(args, namespace)
        File "/usr/lib64/python3.9/argparse.py", line 2067, in _parse_known_args
          start_index = consume_optional(start_index)
        File "/usr/lib64/python3.9/argparse.py", line 2007, in consume_optional
          take_action(action, args, option_string)
        File "/usr/lib64/python3.9/argparse.py", line 1935, in take_action
          action(self, namespace, argument_values, option_string)
        File "/usr/lib64/python3.9/argparse.py", line 1099, in {_}{{_}}call{{_}}{_}
          parser.print_help()
        File "/usr/lib64/python3.9/argparse.py", line 2555, in print_help
          self._print_message(self.format_help(), file)
        File "/usr/lib64/python3.9/argparse.py", line 2561, in _print_message
          file.write(message)
      BrokenPipeError: [Errno 32] Broken pipe
      h3. 
      

      Additional info

      Latest fedora does not have this issue

              jjongsma@redhat.com Jonathon Jongsma
              hongzliu@redhat.com Hongzhou Liu
              Jonathon Jongsma Jonathon Jongsma
              virt-bugs virt-bugs
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: