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

[Qemu] qemu-trace-stap should handle lack of stap more gracefully

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.5
    • qemu-kvm
    • None
    • Low
    • Upstream
    • sst_virtualization
    • ssg_virtualization
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • All
    • None

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

      Run qemu-trace-stap with `qemu-tools` installed, but without manually installing any other packages.

      Please provide the package NVR for which bug is seen:

      qemu-kvm-9.0.0-6.el9

      How reproducible:

      100%

      Steps to reproduce

      1. after installing qemu-tools, but not manually adding any extra dependencies, try the following (as of this bug report, that means systemtap-client and systemtap-devel are not installed by default):
      2. qemu-trace-stap run `which qemu-io` 'nbd_send*'
      3.  

      Expected results

      No python stack trace when systemtap-client is not installed.

      We don't want to necessarily have qemu-tools drag in the entire systemtap ecosystem on every system, so our options are to split qemu-tools into two RPMs (with a new RPM for qemu-trace-stap and the proper dependency on /usr/bin/stap), or to keep the current packaging scheme where systemtap is not a dependency, but where the qemu-trace-stap script itself gives a graceful error message about needing to install stap rather than dumping a stack trace.

      Actual results

      Traceback (most recent call last):
      File "/usr/bin/qemu-trace-stap", line 169, in <module>
      main()
      File "/usr/bin/qemu-trace-stap", line 165, in main
      args.func(args)
      File "/usr/bin/qemu-trace-stap", line 83, in cmd_run
      subprocess.call(stapargs)
      File "/usr/lib64/python3.12/subprocess.py", line 389, in call
      with Popen(*popenargs, **kwargs) as p:
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib64/python3.12/subprocess.py", line 1026, in {}init{}
      self._execute_child(args, executable, preexec_fn, close_fds,
      File "/usr/lib64/python3.12/subprocess.py", line 1955, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: 'stap'

              rhn-engineering-berrange Daniel Berrangé
              eblake_redhat Eric Blake
              virt-maint virt-maint
              Tingting Mao Tingting Mao
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: