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

Try to create the log directory when not present yet #34632

Merged
merged 1 commit into from
Jul 22, 2016

Conversation

eliasp
Copy link
Contributor

@eliasp eliasp commented Jul 13, 2016

What does this PR do?

When the log directory does not exist yet, Salt will attempt to create it now.

What issues does this PR fix or reference?

None I know of

Previous Behavior

When the log directory (default: /var/log/salt) didn't exist, Salt simply failed:

[WARNING ] Failed to open log file, do you have permission to write to /var/log/salt/minion?

New Behavior

Salt will now attempt to create the required directory in this case:

[INFO    ] Log directory not found, trying to create it: /var/log/salt

Tests written?

No

@s0undt3ch
Copy link
Collaborator

I believe that if you set verify_env: true on the configuration file, that directory, with a buch o other directories, are checked for existence. If they don't exist, they are created with proper ownership and permissions....

@lorengordon
Copy link
Contributor

@s0undt3ch did that actually start working again? I reported this issue back in 2015.8.0 and it's still open. I tried verify_env: True then and it didn't work...

#27063 (comment)

@s0undt3ch
Copy link
Collaborator

Then i guess its not fixed yet :(

@cachedout
Copy link
Contributor

I suppose the question then is whether we should just try to fix verify_env or abandon it and just force that behavior. I don't want to end up merging this and then having verify_env fixed down the line and end up with divergent code paths...

@cachedout cachedout added the Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged label Jul 13, 2016
@s0undt3ch
Copy link
Collaborator

Agreed.

@thatch45
Copy link
Contributor

I am going to merge this in, given the fact that the logging facility can be changed I think that keeping log directory management local to the backend makes the most sense

@thatch45 thatch45 merged commit eba34f7 into saltstack:2016.3 Jul 22, 2016
@eliasp eliasp deleted the 2016.3-create-logdir-when-needed branch July 25, 2016 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants