GitHub user akrasnov-drv closed a discussion: Agents log rotation is unstable

<!--
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release and main branch are affected too.
Always add information AFTER of these HTML comments, but no need to delete the 
comments.
-->

##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
 * Other

##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
KVM agent logs

##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main 
branch.
-->
~~~
4.20.0.0
~~~

##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network, advanced 
networking, etc.  N/A otherwise
-->
default /etc/logrotate.d/cloudstack-agent and 
/etc/cloudstack/agent/log4j-cloud.xml

##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
Ubuntu 22.04.5 LTS

##### SUMMARY
<!-- Explain the problem/feature briefly -->
Regularly agent log is rotated but cloudstack agent keeps writing to old file. 


##### STEPS TO REPRODUCE
<!--
For bugs, show exactly how to reproduce the problem, using a minimal test-case. 
Use Screenshots if accurate.

For new features, show how the feature would be used.
-->
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

<!-- Paste example playbooks or commands between quotes below -->


<!-- You can also paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->
I'd expect that agent writes to the new agent.log after rotation


##### ACTUAL RESULTS
<!-- What actually happened? -->
But it keeps writing to the old file
<!-- Paste verbatim command output between quotes below -->
~~~
-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.

GitHub link: https://github.com/apache/cloudstack/discussions/10181

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscr...@cloudstack.apache.org

Reply via email to