Skip to contentSkip to conversation

qemu-guest-agent: Update the logfile path of qga-fsfreeze-hook.log

PATCH In review Dehan Meng 2 participants 3 messages Aug 13, 2024 – Aug 19, 2024

lore
Share & tools
lore

Dehan Meng

author
#0 lore raw

PATCH 1/1 qemu-guest-agent: Update the logfile path of qga-fsfreeze-hook.log

Since '/var/log/qga-fsfreeze-hook.log' is not included to proper selinux context 'system_u:object_r:virt_qemu_ga_log_t:s0', it should be changed to '/var/log/qemu-ga/qga-fsfreeze-hook.log'

Jira: https://issues.redhat.com/browse/RHEL-52250

---
 scripts/qemu-guest-agent/fsfreeze-hook | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/qemu-guest-agent/fsfreeze-hook +1 -1
index 13aafd4845..98aad5e18b 100755
@@ -7,7 +7,7 @@
 # "freeze" argument before the filesystem is frozen. And for fsfreeze-thaw
 # request, it is issued with "thaw" argument after filesystem is thawed.
 
-LOGFILE=/var/log/qga-fsfreeze-hook.log
+LOGFILE=/var/log/qemu-ga/qga-fsfreeze-hook.log
 FSFREEZE_D=$(dirname -- "$0")/fsfreeze-hook.d
 
 # Check whether file $1 is a backup or rpm-generated file and should be ignored
Signature · 1 line
2.40.1
#1 lore raw

This bug looks specific to the RedHat SELinux configuration. Is this any reason to move LOGFILE except this?

Best Regards,
Konstantin Kostiuk.

Quoted 29 lines · Dehan Meng

Since '/var/log/qga-fsfreeze-hook.log' is not included to proper selinux context 'system_u:object_r:virt_qemu_ga_log_t:s0', it should be changed to '/var/log/qemu-ga/qga-fsfreeze-hook.log'

Jira: https://issues.redhat.com/browse/RHEL-52250

---
 scripts/qemu-guest-agent/fsfreeze-hook | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/qemu-guest-agent/fsfreeze-hook +1 -1
index 13aafd4845..98aad5e18b 100755
@@ -7,7 +7,7 @@
 # "freeze" argument before the filesystem is frozen. And for fsfreeze-thaw
 # request, it is issued with "thaw" argument after filesystem is thawed.
 
-LOGFILE=/var/log/qga-fsfreeze-hook.log
+LOGFILE=/var/log/qemu-ga/qga-fsfreeze-hook.log
 FSFREEZE_D=$(dirname -- "$0")/fsfreeze-hook.d
 
 # Check whether file $1 is a backup or rpm-generated file and should be

ignored
--
2.40.1

author
#2 lore raw

'/var/log/qemu-ga' is more reasonable and forward-looking to facilitate future log management. All qga-related logs would be better placed in a dedicated and unified log directory.

Quoted 39 lines · Konstantin Kostiuk

This bug looks specific to the RedHat SELinux configuration. Is this any reason to move LOGFILE except this?

Best Regards,
Konstantin Kostiuk.

Quoted 30 lines · Dehan Meng

Since '/var/log/qga-fsfreeze-hook.log' is not included to proper selinux context 'system_u:object_r:virt_qemu_ga_log_t:s0', it should be changed to '/var/log/qemu-ga/qga-fsfreeze-hook.log'

Jira: https://issues.redhat.com/browse/RHEL-52250

---
 scripts/qemu-guest-agent/fsfreeze-hook | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/qemu-guest-agent/fsfreeze-hook +0 -0
index 13aafd4845..98aad5e18b 100755
@@ -7,7 +7,7 @@
 # "freeze" argument before the filesystem is frozen. And for

fsfreeze-thaw
# request, it is issued with "thaw" argument after filesystem is thawed.

scripts/qemu-guest-agent/fsfreeze-hook +1 -1
-LOGFILE=/var/log/qga-fsfreeze-hook.log
+LOGFILE=/var/log/qemu-ga/qga-fsfreeze-hook.log
 FSFREEZE_D=$(dirname -- "$0")/fsfreeze-hook.d
 
 # Check whether file $1 is a backup or rpm-generated file and should be

ignored
--
2.40.1