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

Check "-c" argument before use #21

Open
phmarek opened this issue Feb 18, 2016 · 6 comments
Open

Check "-c" argument before use #21

phmarek opened this issue Feb 18, 2016 · 6 comments

Comments

@phmarek
Copy link

phmarek commented Feb 18, 2016

$ booth list -c .
Feb 18 15:54:12 cacao booth: [3208]: WARN: Odd number of nodes is strongly recommended!
heartbeat: inline-fn.h:83: init_header_bare: Assertion `local && local->site_id' failed.
Aborted
@dmuhamedagic
Copy link

On Thu, Feb 18, 2016 at 06:55:08AM -0800, Philipp Marek wrote:

$ booth list -c .
Feb 18 15:54:12 cacao booth: [3208]: WARN: Odd number of nodes is strongly recommended!
heartbeat: inline-fn.h:83: init_header_bare: Assertion `local && local->site_id' failed.
Aborted

I'm a bit confused here. From init_header_bare():

86 h->from = htonl(local->site_id);

But does a client really need "local" set?

@phmarek
Copy link
Author

phmarek commented Feb 23, 2016

Sorry for being so terse.

I just meant that any filename that is not a file should be rejected ... or, at least, a directory shouldn't simply be opened as if it were a file.

@dmuhamedagic
Copy link

On Tue, Feb 23, 2016 at 01:45:01AM -0800, Philipp Marek wrote:

Sorry for being so terse.

I just meant that any filename that is not a file should be rejected ... or, at least, a directory shouldn't simply be opened as if it were a file.

Yes, got that :)

What I wrote about, however, is something that can happen
with a regular configuration file too.

@phmarek
Copy link
Author

phmarek commented Feb 23, 2016

Sorry for being dense, then ;)

But does a client really need "local" set?
Well, not sure because quite a lot changed... but in my times it was necessary so that the client knew which IP to use for the connect() call, ie. to reach the (cluster-)"local" booth daemon instance.

@dmuhamedagic
Copy link

On Tue, Feb 23, 2016 at 03:20:08AM -0800, Philipp Marek wrote:

Sorry for being dense, then ;)

But does a client really need "local" set?
Well, not sure because quite a lot changed... but in my times it was necessary so that the client knew which IP to use for the connect() call, ie. to reach the (cluster-)"local" booth daemon instance.

Right. What got me is the comment (src/main.c):

355 /* Set "local" pointer, ignoring errors. */

And then not checking the outcome of find_myself():

364 find_myself(NULL, type == CLIENT || type == GEOSTORE);

The code around changed a bit, but this part is effectively the
same. I suppose that we need to check the return code here and
exit in case local couldn't be set.

@dmuhamedagic dmuhamedagic added Bug and removed Bug labels Mar 21, 2021
@dmuhamedagic
Copy link

This is a minor thing, but should be fixed.

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

No branches or pull requests

2 participants