k3s/cluster/saltbase
Aditya Kali 09b2c27a92 fix logrotate config (again)
we need to add the dateformat option so that the logrotate
can create unique logfiles for each rotation. Without this,
we logrotation is skipped with message like (generated in
verbose mode of logrotate):

rotating log /var/log/rotate-test.log, log->rotateCount is 5
dateext suffix '-20160718'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
destination /var/log/rotate-test2.log-20160718.gz already exists, skipping rotation

Tested as follows:

  # config in '/etc/logrotate.d/rotate-test':
  /var/log/rotate-test.log {
    rotate 5
    copytruncate
    missingok
    notifempty
    compress
    maxsize 100M
    daily
    dateext
    dateformat -%Y%m%d-%s
    create 0644 root root
  }

  # create 150Mb of /var/log/rotate-test.log
  $ dd if=/dev/zero of=/var/log/rotate-test.log bs=1048576 count=150 conv=notrunc oflag=append

  # run logrotate
  $ /usr/sbin/logrotate -v /etc/logrotate.conf
  ...
  rotating pattern: /var/log/rotate-test.log  after 1 days (5 rotations)
  empty log files are not rotated, log files >= 104857600 are rotated earlier, old logs are removed
  considering log /var/log/rotate-test.log
    log needs rotating
  rotating log /var/log/rotate-test.log, log->rotateCount is 5
  Converted ' -%Y%m%d-%s' -> '-%Y%m%d-%s'
  dateext suffix '-20160718-1468875268'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  copying /var/log/rotate-test.log to /var/log/rotate-test.log-20160718-1468875268
  truncating /var/log/rotate-test.log
  compressing log with: /bin/gzip

  Repeating 'dd' and 'logrotate' commands now generate logfiles correctly.
2016-07-18 15:37:00 -07:00
..
pillar AWS kube-up: Add support for wily 2016-02-17 10:45:21 -05:00
reactor Add ga-beacon analytics to gendocs scripts 2015-05-15 18:56:38 -07:00
salt fix logrotate config (again) 2016-07-18 15:37:00 -07:00
README.md Implement Azure cloud provider scripts 2016-06-17 23:46:03 -07:00
install.sh Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00

README.md

SaltStack configuration

This is the root of the SaltStack configuration for Kubernetes. A high level overview for the Kubernetes SaltStack configuration can be found in the docs tree.

This SaltStack configuration currently applies to default configurations for Debian-on-GCE, Fedora-on-Vagrant, Ubuntu-on-AWS and Ubuntu-on-Azure. (That doesn't mean it can't be made to apply to an arbitrary configuration, but those are only the in-tree OS/IaaS combinations supported today.) As you peruse the configuration, these are shorthanded as gce, vagrant, aws, azure-legacy in grains.cloud; the documentation in this tree uses this same shorthand for convenience.

See more:

Analytics