sensu / sensu-chef

Sensu Chef cookbook.
https://supermarket.chef.io/cookbooks/sensu
Apache License 2.0
222 stars 280 forks source link

Add support for log rotate on Windows & Version bump to 1.0.2 #581

Closed evandervecht closed 6 years ago

evandervecht commented 6 years ago

Description

Windows: default["sensu"]["msi_repo_url"] = "http://repositories.sensuapp.org/msi/2016" default["sensu"]["version"] = "1.0.2-1-x64" default['sensu']['windows_package_version'] = '1.0.2.1'

Linux: default["sensu"]["version"] = "1.0.2-1"

Motivation and Context

Log file on Windows was not being rotated. This caused disk to fill up. https://github.com/sensu/sensu-chef/issues/580

How Has This Been Tested?

Tested this on Windows 2016 & CentOS 7, Chef client 12.19.36 Run Chef-client, see if it installs the newer version, check if the client.xml is being changed. See if the log file is being rotated (tested with 10kb else I would have to wait for a much longer time)

Screenshots (if appropriate):

afbeelding Please note that the rotate was set to 10kb but after running Chef it was changed to 10 MB, therefor the sensu-client.out is larger than the rotated files.

Types of changes

Checklist:

eheydrick commented 6 years ago

The log changes look reasonable to me. If we're updating versions I'd suggest going to the latest release, 1.1.1. @cwjohnston @amdprophet @majormoses can you take a look too.

evandervecht commented 6 years ago

@majormoses Awaiting your comments based on my comments. If I need to change the version to 0.29.5 (the minimum release to support logrotate) I will do so.

majormoses commented 6 years ago

uggh this is messy. I am ok with these changes mostly. I'd like to hear from @cwjohnston first on some of the comments before merging and releasing.

majormoses commented 6 years ago

ping @cwjohnston

cwjohnston commented 6 years ago

Sorry for my tardiness in replying here. I've added to individual code comments above.

Unfortunately our lack of familiarity with building Windows installers has lead to a confusing situation around Windows MSIs. I think the way to address this going forward is to figure out how we can use the installer to detect the available version of .NET instead of building different installers for each combination of CPU architecture and .NET Framework version. We're tracking this need in https://github.com/sensu/sensu-omnibus/issues/234

majormoses commented 6 years ago

closing per https://github.com/sensu/sensu-chef/pull/607#issue-181825797