diff options
author | Lingxian Kong <anlin.kong@gmail.com> | 2021-09-30 22:27:53 +1300 |
---|---|---|
committer | Lingxian Kong <anlin.kong@gmail.com> | 2021-09-30 20:47:33 +0000 |
commit | 5165a170c09331643b57e08ecbca85e96bad4ce3 (patch) | |
tree | 1c22dcf739fefee4a39d50e90f75505465e61f8b | |
parent | 1c38b4c9bc1d2b8dfa4e1100f79da7354e344d26 (diff) | |
download | trove-stable/victoria.tar.gz |
Fix trove guest agent logrotatevictoria-em14.1.0stable/victoria
* The logrotate file owner should be root
* Log file path is /var/log/trove/trove-guestagent.log
Change-Id: I669fedc76aa79d7bfc1e4e64684adc4a89a3a15d
2 files changed, 3 insertions, 7 deletions
diff --git a/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install b/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install index 0cd63059..cfb6b61e 100755 --- a/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install +++ b/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/31-guest-agent-install @@ -16,7 +16,8 @@ for folder in "/var/lib/trove" "/etc/trove" "/etc/trove/certs" "/etc/trove/conf. chown -R ${GUEST_USERNAME}:root ${folder} done -install -D -g root -o ${GUEST_USERNAME} -m 0644 ${SCRIPTDIR}/guest-agent.logrotate /etc/logrotate.d/guest-agent +# The logrotate file owner should be root or user with uid 0. +install -D -g root -o root -m 0644 ${SCRIPTDIR}/guest-agent.logrotate /etc/logrotate.d/guest-agent # Create a virtual environment (with dependencies installed) for guest agent service /usr/bin/python3 -m venv ${GUEST_VENV} diff --git a/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/guest-agent.logrotate b/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/guest-agent.logrotate index 2a42143a..235b4c48 100644 --- a/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/guest-agent.logrotate +++ b/integration/scripts/files/elements/guest-agent/install.d/guest-agent-source-install/guest-agent.logrotate @@ -1,4 +1,4 @@ -/var/log/guest-agent.log { +/var/log/trove/trove-guestagent.log { daily rotate 10 missingok @@ -6,9 +6,4 @@ compress delaycompress sharedscripts - postrotate - # Signal name shall not have the SIG prefix in kill command - # http://pubs.opengroup.org/onlinepubs/9699919799/utilities/kill.html - kill -s USR1 $(cat /var/run/guest-agent.pid) - endscript } |