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

Incorrect error message displayed #1838

Closed
nitinbodke opened this issue Mar 16, 2016 · 3 comments
Closed

Incorrect error message displayed #1838

nitinbodke opened this issue Mar 16, 2016 · 3 comments
Labels
type/bug Feature does not function as expected
Milestone

Comments

@nitinbodke
Copy link

My "/tmp" directory had "consul" binary, leftover from "consul" installation.
Executed following command from the path where I copied it:

[admin@localhost local]$ consul agent -server -bootstrap-expect 1 \
>     -data-dir /tmp/consul -node=agent-one -bind=10.0.2.15 \
>     -config-dir /etc/consul.d

Expected:
Consul should differentiate between "consul" binary and directory.
And should give proper error message.

Actual Result:

==> CRITICAL: Deprecated data folder found at "/tmp/consul/mdb"!
==> Consul will refuse to boot with this directory present.
==> See https://www.consul.io/docs/upgrade-specific.html for more information.
@slackpad slackpad added type/bug Feature does not function as expected easy labels Mar 21, 2016
@mckennajones
Copy link
Contributor

@slackpad What should the expected behavior be in this case? Should consul error out if the -data-dir points to a consul binary?

@slackpad
Copy link
Contributor

slackpad commented Nov 22, 2016

We should stat the -data-dir and give a "not a directory" message if IsDir() is false.

@slackpad slackpad added this to the 0.7.4 milestone Nov 22, 2016
@slackpad slackpad modified the milestones: 0.7.2, 0.7.4 Dec 15, 2016
@slackpad
Copy link
Contributor

slackpad commented Dec 15, 2016

Despite what I said in #2529 (comment), during some testing with this change merge I realized I think we were auto-creating the directory before, so this might be a regression. @kyhavlov will take a look; pulling into the 0.7.2 release milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Feature does not function as expected
Projects
None yet
Development

No branches or pull requests

4 participants