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

Logfile is write only in V1.4 #5346

Closed
varnson opened this issue Feb 14, 2019 · 2 comments
Closed

Logfile is write only in V1.4 #5346

varnson opened this issue Feb 14, 2019 · 2 comments
Labels
good first issue A well-defined bug or improvement with sufficient context which should be approachable for new contr type/bug Feature does not function as expected

Comments

@varnson
Copy link

varnson commented Feb 14, 2019

logfile is write only in Redhat Linux

OS: Redhat Enterprise Linux Server release 6.9 (Santiago)
Consul: Ver1.4

Reproduction Steps

Steps to reproduce this issue, eg:

  1. Create a cluster with 1 client nodes and 3 server nodes.
  2. use -log-file=log/server.log in server command line.

then you can find that all log files are write only. (0200)

Reason:
In file consul/logger/logfile.go, Line57:
os.OpenFile(newfilePath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 640)
I find that the last number is 640.
But in golang doc, the sample is 0640.
So I think that it should be fixed.
Golang doc: https://golang.org/pkg/os/#OpenFile

@hanshasselberg hanshasselberg added the type/bug Feature does not function as expected label Feb 14, 2019
@mkeeler mkeeler added the good first issue A well-defined bug or improvement with sufficient context which should be approachable for new contr label Feb 14, 2019
simodima added a commit to simodima/consul that referenced this issue Feb 15, 2019
@simodima
Copy link
Contributor

Just opened a PR to fix that #5354

mkeeler pushed a commit that referenced this issue Feb 15, 2019
@mkeeler
Copy link
Member

mkeeler commented Feb 15, 2019

@toretto460 Thanks again for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A well-defined bug or improvement with sufficient context which should be approachable for new contr type/bug Feature does not function as expected
Projects
None yet
Development

No branches or pull requests

4 participants