-
Notifications
You must be signed in to change notification settings - Fork 26
Build: create and set working directory #56
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
Build: create and set working directory #56
Conversation
src/main.c
Outdated
| if (chdir(BOOTH_CORE_DIR) < 0) { | ||
| log_error("cannot change working directory to %s", BOOTH_CORE_DIR); | ||
| } else { | ||
| log_info("booth working directory set to %s", BOOTH_CORE_DIR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can drop this message, or the trace level should be sufficient ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the message will be removed, as requested ;)
booth.spec
Outdated
| %dir /usr/lib/ocf/lib/booth | ||
| %dir %{_sysconfdir}/booth | ||
| %dir %{_var}/lib/booth | ||
| %dir %{_var}/lib/booth/cores |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to add %attr defining the exact expected permissions like:
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/booth
%dir %attr (750, %{uname}, %{gname}) %{_var}/lib/booth/cores
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I will change this
|
Hello @dmuhamedagic, did you have a chance to look at this pull request? Booth works quite unpredictable without these changes.. ? |
|
Yes, I did look at it and, since Yan had no further objections, we can merge it.
|
|
Thanks! |
|
Thank you, Dejan and Chris! |
|
Thank you as well! :) |
At present, booth doesn't set the working directory itself. If it is linked with cluster-glue, the working directory is changed by cluster-glue. Otherwise, if we use libqb, nothing takes care of that. As a result, we have problems with creating temporary files and core dumps.
The changes in this pull request are about creating the active directory /var/lib/booth/cores during installation and setting it during startup, if the application is not linked with cluster-glue.