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

dev_mode attribute causes error in startup #367

Closed
isuftin opened this issue Nov 4, 2016 · 5 comments · Fixed by #400
Closed

dev_mode attribute causes error in startup #367

isuftin opened this issue Nov 4, 2016 · 5 comments · Fixed by #400

Comments

@isuftin
Copy link
Contributor

isuftin commented Nov 4, 2016

In my Test Kitchen, I've added the dev_mode attribute to be true.

When converging Consul, I get the following issue:

==> Reloading configuration...
==> Error decoding '/etc/consul/consul.json': Config has invalid keys: dev_mode
==> Failed to reload configs

Consul is running version 0.7.0

@gdavison
Copy link
Contributor

gdavison commented Nov 4, 2016

Looks like dev mode is a command line parameter -dev, rather than going in the config file. https://www.consul.io/docs/agent/options.html#_dev

@isuftin
Copy link
Contributor Author

isuftin commented Nov 4, 2016

I concur. From reading the documents, I'm not sure there actually is a config file version of that commandline flag.

Perhaps setting this attribute in the cookbook could cause the service startup to throw in the -dev flag instead

@johnbellone
Copy link
Contributor

I am pretty sure this is a relic from an older version of Consul. We are open to accepting PR here.

@legal90
Copy link
Contributor

legal90 commented Dec 16, 2016

Hi there,
-dev CLI option was designed for an interactive shell session, especially for evaluation or dev purposes. That's why there is no such option available for config files.
Sorry, but I don't think that we should try to implement any tricks in this cookbook to make a consul daemon running in dev mode.

If you want to bootstrap a single consul server for dev purposes using this Chef cookbook, then you can do that by setting some attributes. This is my real working example:

# my_test_recipe.rb
node.default['firewall']['allow_consul'] = false # Just to skip firewall configuration
node.default['consul']['config'] = {
  'bootstrap_expect' => 1,
  'server' => true,
  'ui' => true
}

include_recipe 'consul'

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants