Commit Graph

153 Commits

Author SHA1 Message Date
Chavez f201b4b565 command: Data directory permission error message
* Check for invalid data directory permissions
* Display appropriate permissions error message
* Add command test for bad data directory permissions
2016-04-01 19:17:38 -07:00
Sean Chittenden 45bd128f12 Rely exclusively on error to signal failure
Pointed out by: slackpad
2016-04-01 10:34:45 -07:00
Sean Chittenden 7a814fce63 Print a helpful message re: duplicate addresses
IP sockets provide nice endpoints where the kernel will fail to bind and will error out saying socket already in use.  UNIX sockets, however, don't enjoy this nice property when cleaning up stale sockets on listen.  Given the number of addresses in Consul, provide operators with a helpful message that indicates the source of the reused address.

Before this fix, it was possible for the HTTP socket to unlink the RPC socket, leading to confusing blocked behavior when running commands like `consul info`.

```
% cat tmp.config.json
{
    "addresses": {
	"http": "unix:///tmp/.consul.sock",
	"rpc": "unix:///tmp/.consul.sock"
    },
    "unix_sockets": {
	"mode": "0700"
    }
}
% consul agent -config-file tmp.config.json -advertise=127.0.0.1 -data-dir=/tmp/
==> All listening endpoints must be unique: HTTP address already configured for RPC
Exit 1
```
2016-04-01 10:20:45 -07:00
Sean Chittenden 5994c9efbf skip_leave_on_int's default changes based on agent mode
`skip_leave_on_int`'s behavior now changes based on whether or not the agent is acting as a client or server.

Fixes: 1687
2016-03-31 17:45:14 -07:00
Sean Chittenden ec9b9be736 Guard against a node name containing pure whitespace for real 2016-03-31 15:10:19 -07:00
Sean Chittenden ff529ffa40 Guard against a node name containing pure whitespace 2016-03-31 15:02:58 -07:00
Sean Chittenden 583abab552 Node names are not allowed to be empty 2016-03-31 14:47:55 -07:00
Sean Chittenden 9fb64ab114 Allow adjusting the number of DNS records in a response...
Based on work done by @fusiondog in #1583, extend the concept to use an integer instead of a boolean.

Fixes: #1583 && #1481
2016-03-29 19:23:56 -07:00
Hrishikesh Barua 9f9aa5084b Added help text for -dev option #1804 2016-03-21 17:27:57 +05:30
James Phillips d60be51f01 Merge pull request #1284 from nbrownus/telemetry
Option to disable hostnames from telemetry
2016-02-06 22:00:14 -08:00
Sean Chittenden 7af6a94edb Factor out duplicate functions into a lib package
Consolidate code duplication and tests into a single lib package.  Most of these functions were from various **/util.go functions that couldn't be imported due to cyclic imports.  The consul/lib package is intended to be a terminal node in an import DAG and a place to stash various consul-only helper functions.  Pulled in hashicorp/go-uuid instead of consolidating UUID access.
2016-01-29 16:57:45 -08:00
Nate Brown 43a4f3fe02 Option to disable hostnames from telemetry 2016-01-29 13:44:48 -08:00
Seth Vargo cae0ff354a Use HTTPS + www. where appropriate 2016-01-13 17:44:01 -05:00
James Phillips 71e3901a65 Merge pull request #1592 from hashicorp/b-reap
Adds support for the reap lock.
2016-01-13 09:37:54 -08:00
James Phillips 343838f12b Adds support for the reap lock. 2016-01-12 21:10:25 -08:00
Matt McCoy 9cbed7f89e Add consul agent help for advertise-wan 2016-01-11 14:27:54 -05:00
Ryan Uber afafae53fd consul: dev mode works 2015-12-26 20:19:36 -05:00
Ryan Uber 3cf6a173a5 agent: static UI is configurable 2015-12-24 22:21:34 -05:00
James Phillips e80d1a58fb Moves logger down where it's used for reaping. 2015-12-22 10:29:55 -08:00
James Phillips 0b1c346990 Changes sense of option to "reap" and uses nil for "not set". 2015-12-22 10:28:10 -08:00
James Phillips 2b257c922e Adds child process reaping when Consul is running as PID 1. 2015-12-21 21:47:35 -08:00
James Phillips a61d89d0e6 Removes the GOMAXPROCS warnings which are obsolete for Go 1.5+. 2015-11-25 17:59:16 -08:00
talwai f6f2e19c6c Kill unused import in command.go 2015-11-13 11:14:15 -05:00
talwai bc12c5e711 Add DogStatsd configuration 2015-11-11 14:30:36 -05:00
Ryan Uber de287e3efb agent: consolidates data dir checker 2015-10-15 14:21:35 -07:00
Ryan Uber d901fa6389 agent: remove migrator, refuse to start if mdb dir found 2015-10-15 14:15:08 -07:00
Ryan Breen 80d26f9156 Merge pull request #1167 from railsguru/master
Add -http-port option to change the HTTP API port
2015-09-02 01:15:55 -04:00
Ryan Uber 11e4cfd72b agent: reload SCADA client if endpoint changes 2015-08-27 13:29:07 -07:00
Ryan Uber c468acf222 command: atlas endpoint can be passed 2015-08-27 11:11:05 -07:00
Ryan Uber 5ad8bfbd41 agent: log a message when making a new scada connection 2015-08-25 21:03:16 -07:00
Ryan Uber 4b715a7d2c agent: don't reload scada client if there is no config change 2015-08-25 20:43:57 -07:00
Ryan Uber eb8974160f agent: clean up scada connection manager 2015-08-25 18:27:07 -07:00
Ryan Uber 2e6ccded2c agent: scada client and HTTP server are tracked separately 2015-08-25 16:59:53 -07:00
Andy Lo-A-Foe 3e046d3efc Use Ports.HTTP directly 2015-08-20 20:27:20 +02:00
Andy Lo-A-Foe 4e2c3373bc Add documentation for http-port option 2015-08-20 20:19:35 +02:00
Andy Lo-A-Foe 7b5da2a240 Add -http-port option to change the HTTP API port
This is useful when pushing consul to PaaS like
Cloud Foundry making the HTTP API easily routable.
2015-08-11 14:14:21 +02:00
Ryan Uber 5226e29a69 agent: don't replace config on SIGHUP if parsing fails 2015-05-30 22:50:24 -07:00
Ryan Uber 78a80f3a57 agent: flush progress info to console during migrations 2015-05-19 18:47:44 -07:00
Ryan Uber 2b98ebca78 agent: log a message when data migrations start 2015-05-12 12:58:44 -07:00
Cameron Ruatta 9271d94532 Adding documentation about specifying multiple configuration directories 2015-05-11 10:19:04 -07:00
Armon Dadgar ea577fbf70 command/agent: Lowercase DC. Fixes #761 2015-05-05 13:56:37 -07:00
Armon Dadgar a86f31517b Merge pull request #816 from pepov/master
Support different advertise address for WAN gossip
2015-05-04 15:40:25 -07:00
Ryan Uber 72524e911d agent: allow configuring the stats prefix 2015-05-03 16:46:20 -07:00
Ryan Uber 9c85ea0c47 agent: Don't attempt migration on new server 2015-04-10 19:41:09 -07:00
Ryan Uber 6cc0eefa76 Merge pull request #857 from hashicorp/f-boltdb
Raft uses BoltDB
2015-04-10 18:30:07 -07:00
Ryan Uber ac0f66a91e command: automatically migrate raft data on start 2015-04-09 23:00:20 -07:00
pepov ebaee31874 add and test -advertise-wan cli flag 2015-03-28 16:08:19 +01:00
Johannes 'fish' Ziemke f935a8a506 Add -domain command line flag to agent
This makes it possible to configure the domain on the command line
additionally to the config file.
2015-03-20 16:05:41 +01:00
Ryan Uber 84f04ff4c9 command: clarify -recursor agent arg 2015-02-23 09:33:45 -08:00
Mohammad Zolfaghari f067ad873b Support multiple recursor flag 2015-02-21 10:15:52 +03:30