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

fsfreeze hooks doesn't log error on system logs when running hook fails

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-9.6
    • rhel-9.4.z
    • qemu-kvm / Guest Agent
    • None
    • No
    • Low
    • rhel-sst-virtualization-windows
    • ssg_virtualization
    • 3
    • False
    • Hide

      None

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

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

      From a system logs perspective, this is a sucessful run of a hook
       

      Aug 01 14:03:51 rhel-94.virt.home.arpa qemu-ga[704]: info: guest-fsfreeze called
      Aug 01 14:03:51 rhel-94.virt.home.arpa qemu-ga[704]: info: executing fsfreeze hook with arg 'freeze'
      Aug 01 14:03:51 rhel-94.virt.home.arpa qemu-ga[704]: info: executing fsfreeze hook with arg 'thaw'
       

      While a failure, for example due to RHEL-52250, run looks like this:

      Aug  1 14:09:58 rhel-94 qemu-ga[704]: info: guest-fsfreeze called
      Aug  1 14:09:58 rhel-94 qemu-ga[704]: info: executing fsfreeze hook with arg 'freeze'
      Aug  1 14:09:58 rhel-94 systemd[1]: Starting SETroubleshoot daemon for processing new SELinux denial logs...
      Aug  1 14:09:58 rhel-94 qemu-ga[704]: info: executing fsfreeze hook with arg 'thaw'
      Aug  1 14:09:58 rhel-94 systemd[1]: Started SETroubleshoot daemon for processing new SELinux denial logs.
      Aug  1 14:09:58 rhel-94 setroubleshoot[1939]: failed to retrieve rpm info for path '/var/log/qga-fsfreeze-hook.log':
      Aug  1 14:09:59 rhel-94 setroubleshoot[1939]: SELinux is preventing /usr/bin/bash from open access on the file /var/log/qga-fsfreeze-hook.log. For complete SELinux messages run: sealert -l 9d24fc08-2a62-446e-b12a-31c5ce34907b
      

      Besides the SELinux messages, there is nothing indicating the hook did not run. Also, in the specific example of RHEL-52250 the qga hook logfile would also be empty.

      The customer is requesting more reliable and informative logging at system level when there are problems running hooks, as these can be critical for data integrity of backups.

      Please provide the package NVR for which bug is seen:

      qemu-guest-agent-8.2.0-11.el9_4.x86_64

      How reproducible:

      Always

      Steps to reproduce

      1. Create a sample hook
      2. Hit RHEL-5220 by running restorecon
      3. Check system logs for indications that the hook did not run at all

       

      Expected results

      If there are any problems running any hook or if the main script aborts before finishing, log to system logs, as script logs may not be available or complete if something happens.

      Actual results

      Logging for hook scripts is not very reliable nor informative

              mengdehan Meng Dehan
              rhn-support-gveitmic Germano Veit Michel
              Meng Dehan Meng Dehan
              Meng Dehan Meng Dehan
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: