Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #4446: Fixing logrotate config file. #4447

Merged
merged 1 commit into from
Oct 16, 2015

Conversation

linsomniac
Copy link
Contributor

This issue switches from "cp" to "install" for the logrotate file,
with the option to specify the mode. Also uses the name "influxdb"
instead of "influxd".

This issue switches from "cp" to "install" for the logrotate file,
with the option to specify the mode.  Also uses the name "influxdb"
instead of "influxd".
@beckettsean
Copy link
Contributor

@rossmcdonald

@otoolep
Copy link
Contributor

otoolep commented Oct 14, 2015

If we are going to do this, we need to tweak the post-install script to remove any existing file named influxd.conf.

Running logrotate -d I don't see any indication that the existing permissions are a problem, but I have no objection to change them as it just removes the group write bit.

@linsomniac
Copy link
Contributor Author

Sample session on Ubuntu 14.04 system:

root@graphs:/etc/logrotate.d# ls -l influxd 
-rw-rw-r-- 1 root root 113 Sep 14 16:12 influxd
root@graphs:/etc/logrotate.d# logrotate -d -f /etc/logrotate.conf 2>&1 | grep influx
Ignoring influxd because of bad file mode.
root@graphs:/etc/logrotate.d# chmod 644 influxd 
root@graphs:/etc/logrotate.d# logrotate -d -f /etc/logrotate.conf 2>&1 | grep influx
reading config file influxd
rotating pattern: /var/log/influxdb/influxd.log  forced from command line (7 rotations)
considering log /var/log/influxdb/influxd.log
rotating log /var/log/influxdb/influxd.log, log->rotateCount is 7
destination /var/log/influxdb/influxd.log-20151015.gz already exists, skipping rotation
root@graphs:/etc/logrotate.d# dpkg -l logrotate
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-==================================
ii  logrotate      3.8.7-1ubunt amd64        Log rotation utility

@otoolep
Copy link
Contributor

otoolep commented Oct 15, 2015

I think this is good to merge, but I need to add more changes to this to remove any pre-existing rotate file.

@otoolep otoolep self-assigned this Oct 15, 2015
@otoolep otoolep added this to the 0.9.5 milestone Oct 15, 2015
@otoolep
Copy link
Contributor

otoolep commented Oct 15, 2015

@linsomniac -- have you signed the CLA?

@linsomniac
Copy link
Contributor Author

Shouldn't be a problem, I need to have someone review it first. Probably can sign it tomorrow.

@linsomniac
Copy link
Contributor Author

Signed both by me and the company CTO.

@otoolep
Copy link
Contributor

otoolep commented Oct 16, 2015

Thanks @linsomniac

otoolep added a commit that referenced this pull request Oct 16, 2015
Issue #4446: Fixing logrotate config file.
@otoolep otoolep merged commit 6b377d9 into influxdata:master Oct 16, 2015
jsteenb2 added a commit that referenced this pull request Oct 21, 2019
the flags have to match the flags with the exception of beign lower case and
all `_` be changed to `-` in the flag. This is a result of using the cobra
flag to env var mapping with the `-` replaced to `_`.

issue: #4447
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants