Skip to content

Agents log rotation is unstable #10180

@akrasnov-drv

Description

@akrasnov-drv
ISSUE TYPE
  • Other
COMPONENT NAME

KVM agent logs

CLOUDSTACK VERSION
4.20.0.0
CONFIGURATION

default /etc/logrotate.d/cloudstack-agent and /etc/cloudstack/agent/log4j-cloud.xml

OS / ENVIRONMENT

Ubuntu 22.04.5 LTS

SUMMARY

Regularly agent log is rotated but cloudstack agent keeps writing to old file.

STEPS TO REPRODUCE

just added kvm hosts to cloudstack cluster and used it to run several VMs
I believe at rotation time (0:17) there were several VMs running but no new tasks were executed

EXPECTED RESULTS

I'd expect that agent writes to the new agent.log after rotation

ACTUAL RESULTS

But it keeps writing to the old file

-rw-r--r-- 1 root root       0 Jan 13 00:17 agent.log
-rw-r--r-- 1 root root  319990 Jan 13 09:28 agent.log.1

Please advise.
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions