
use rsync to synchronize guest logs to the controller node so that we can find the logs even after the instance is deleted Add a guest-log-collection timer, this timer triggers guest-log-collection service every 10 seconds Change-Id: I264235ce7b7df585358654c46bdac4dcd743fb3d
13 lines
470 B
Desktop File
13 lines
470 B
Desktop File
[Unit]
|
|
Description=OpenStack Trove Guest Log Collection Service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=ubuntu
|
|
Group=ubuntu
|
|
|
|
EnvironmentFile=/etc/trove/controller.conf
|
|
|
|
EnvironmentFile=/etc/trove/conf.d/guest_info.conf
|
|
|
|
ExecStart=/bin/bash -c "sudo rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /home/GUEST_USERNAME/.ssh/id_rsa' -az --exclude='.*' /var/log /var/lib/docker/containers HOST_SCP_USERNAME@$CONTROLLER:/var/log/guest-agent-logs/$guest_id" |