Add an example logrotate snippet, along with the relevant documentation.
Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
/doc/examples/bash_completion-debug
/doc/examples/ganeti.cron
/doc/examples/ganeti.initd
+/doc/examples/ganeti.logrotate
/doc/examples/ganeti-kvm-poweroff.initd
/doc/examples/ganeti-master-role.ocf
/doc/examples/ganeti-node-role.ocf
doc/examples/ganeti-kvm-poweroff.initd \
doc/examples/ganeti.cron \
doc/examples/ganeti.initd \
+ doc/examples/ganeti.logrotate \
doc/examples/ganeti-master-role.ocf \
doc/examples/ganeti-node-role.ocf \
doc/examples/gnt-config-backup \
install -D --mode=0755 doc/examples/ganeti.initd \
"$TXD/$SYSCONFDIR/init.d/ganeti"
+[ -f doc/examples/ganeti.logrotate ] && \
+install -D --mode=0755 doc/examples/ganeti.logrotate \
+ "$TXD/$SYSCONFDIR/logrotate.d/ganeti"
+
[ -f doc/examples/ganeti-master-role.ocf ] && \
install -D --mode=0755 doc/examples/ganeti-master-role.ocf \
"$TXD/$LIBDIR/ocf/resource.d/ganeti/ganeti-master-role"
--- /dev/null
+/var/log/ganeti/*.log {
+ weekly
+ missingok
+ rotate 52
+ notifempty
+ compress
+ delaycompress
+ create 640 root root
+ sharedscripts
+ postrotate
+ @PKGLIBDIR@/daemon-util rotate-all-logs
+ endscript
+}
In order to automatically restart failed instances, you need to setup a
cron job run the *ganeti-watcher* command. A sample cron file is
provided in the source at ``doc/examples/ganeti.cron`` and you can copy
-that (eventually altering the path) to ``/etc/cron.d/ganeti``.
+that (eventually altering the path) to ``/etc/cron.d/ganeti``. Finally,
+a sample logrotate snippet is provided in the source at
+``doc/examples/ganeti.logrotate`` and you can copy it to
+``/etc/logrotate.d/ganeti`` to have Ganeti's logs rotated automatically.
What gets installed
~~~~~~~~~~~~~~~~~~~