diff mbox series

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

Message ID 20240813031115.129000-1-demeng@redhat.com (mailing list archive)
State New, archived
Headers show
Series qemu-guest-agent: Update the logfile path of qga-fsfreeze-hook.log | expand

Commit Message

Dehan Meng Aug. 13, 2024, 3:11 a.m. UTC
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
Signed-off-by: Dehan Meng <demeng@redhat.com>
---
 scripts/qemu-guest-agent/fsfreeze-hook | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Konstantin Kostiuk Aug. 14, 2024, 11:54 a.m. UTC | #1
This bug looks specific to the RedHat SELinux configuration.
Is this any reason to move LOGFILE except this?

Best Regards,
Konstantin Kostiuk.


On Tue, Aug 13, 2024 at 6:11 AM Dehan Meng <demeng@redhat.com> wrote:

> 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
> Signed-off-by: Dehan Meng <demeng@redhat.com>
> ---
>  scripts/qemu-guest-agent/fsfreeze-hook | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/qemu-guest-agent/fsfreeze-hook
> b/scripts/qemu-guest-agent/fsfreeze-hook
> index 13aafd4845..98aad5e18b 100755
> --- a/scripts/qemu-guest-agent/fsfreeze-hook
> +++ b/scripts/qemu-guest-agent/fsfreeze-hook
> @@ -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
>
>
Dehan Meng Aug. 19, 2024, 11:47 a.m. UTC | #2
'/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.

On Wed, Aug 14, 2024 at 7:54 PM Konstantin Kostiuk <kkostiuk@redhat.com>
wrote:

> This bug looks specific to the RedHat SELinux configuration.
> Is this any reason to move LOGFILE except this?
>
> Best Regards,
> Konstantin Kostiuk.
>
>
> On Tue, Aug 13, 2024 at 6:11 AM Dehan Meng <demeng@redhat.com> wrote:
>
>> 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
>> Signed-off-by: Dehan Meng <demeng@redhat.com>
>> ---
>>  scripts/qemu-guest-agent/fsfreeze-hook | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/qemu-guest-agent/fsfreeze-hook
>> b/scripts/qemu-guest-agent/fsfreeze-hook
>> index 13aafd4845..98aad5e18b 100755
>> --- a/scripts/qemu-guest-agent/fsfreeze-hook
>> +++ b/scripts/qemu-guest-agent/fsfreeze-hook
>> @@ -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
>>
>>
diff mbox series

Patch

diff --git a/scripts/qemu-guest-agent/fsfreeze-hook b/scripts/qemu-guest-agent/fsfreeze-hook
index 13aafd4845..98aad5e18b 100755
--- a/scripts/qemu-guest-agent/fsfreeze-hook
+++ b/scripts/qemu-guest-agent/fsfreeze-hook
@@ -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