Skip to content

Conversation

@ChrisKowalczyk
Copy link

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.

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);
Copy link
Member

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 ;-)

Copy link
Author

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
Copy link
Member

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

?

Copy link
Author

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

@ChrisKowalczyk
Copy link
Author

Hello @dmuhamedagic, did you have a chance to look at this pull request? Booth works quite unpredictable without these changes.. ?

@dmuhamedagic
Copy link

dmuhamedagic commented Jun 19, 2017 via email

@dmuhamedagic
Copy link

Thanks!

@dmuhamedagic dmuhamedagic merged commit 766d618 into ClusterLabs:master Jun 19, 2017
@gao-yan
Copy link
Member

gao-yan commented Jun 19, 2017

Thank you, Dejan and Chris!

@ChrisKowalczyk
Copy link
Author

Thank you as well! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants