Commit Graph

6027 Commits

Author SHA1 Message Date
Preetha Appan cf5006c4f4 Fixed static asset build target and checked in new executable for assetfs 2017-06-12 12:57:02 -05:00
Scott Woods 7696a9f8be Fix bad copy/paste (#3139)
Description was probably originally copied from the "delete" request.
2017-06-10 14:46:25 -07:00
Frank Schroeder b3aee2fc56 simplify main.go 2017-06-10 18:52:45 +02:00
Frank Schroeder 1c75cf1af5 pkg refactor
command/agent/*                  -> agent/*
    command/consul/*                 -> agent/consul/*
    command/agent/command{,_test}.go -> command/agent{,_test}.go
    command/base/command.go          -> command/base.go
    command/base/*                   -> command/*
    commands.go                      -> command/commands.go

The script which did the refactor is:

(
	cd $GOPATH/src/github.com/hashicorp/consul
	git mv command/agent/command.go command/agent.go
	git mv command/agent/command_test.go command/agent_test.go
	git mv command/agent/flag_slice_value{,_test}.go command/
	git mv command/agent .
	git mv command/base/command.go command/base.go
	git mv command/base/config_util{,_test}.go command/
	git mv commands.go command/
	git mv consul agent
	rmdir command/base/

	gsed -i -e 's|package agent|package command|' command/agent{,_test}.go
	gsed -i -e 's|package agent|package command|' command/flag_slice_value{,_test}.go
	gsed -i -e 's|package base|package command|' command/base.go command/config_util{,_test}.go
	gsed -i -e 's|package main|package command|' command/commands.go

	gsed -i -e 's|base.Command|BaseCommand|' command/commands.go
	gsed -i -e 's|agent.Command|AgentCommand|' command/commands.go
	gsed -i -e 's|\tCommand:|\tBaseCommand:|' command/commands.go
	gsed -i -e 's|base\.||' command/commands.go
	gsed -i -e 's|command\.||' command/commands.go

	gsed -i -e 's|command|c|' main.go
	gsed -i -e 's|range Commands|range command.Commands|' main.go
	gsed -i -e 's|Commands: Commands|Commands: command.Commands|' main.go

	gsed -i -e 's|base\.BoolValue|BoolValue|' command/operator_autopilot_set.go
	gsed -i -e 's|base\.DurationValue|DurationValue|' command/operator_autopilot_set.go
	gsed -i -e 's|base\.StringValue|StringValue|' command/operator_autopilot_set.go
	gsed -i -e 's|base\.UintValue|UintValue|' command/operator_autopilot_set.go

	gsed -i -e 's|\bCommand\b|BaseCommand|' command/base.go
	gsed -i -e 's|BaseCommand Options|Command Options|' command/base.go
	gsed -i -e 's|base.Command|BaseCommand|' command/*.go
	gsed -i -e 's|c\.Command|c.BaseCommand|g' command/*.go
	gsed -i -e 's|\tCommand:|\tBaseCommand:|' command/*_test.go
	gsed -i -e 's|base\.||' command/*_test.go

	gsed -i -e 's|\bCommand\b|AgentCommand|' command/agent{,_test}.go
	gsed -i -e 's|cmd.AgentCommand|cmd.BaseCommand|' command/agent.go

	gsed -i -e 's|cli.AgentCommand = new(Command)|cli.Command = new(AgentCommand)|' command/agent_test.go
	gsed -i -e 's|exec.AgentCommand|exec.Command|' command/agent_test.go
	gsed -i -e 's|exec.BaseCommand|exec.Command|' command/agent_test.go
	gsed -i -e 's|NewTestAgent|agent.NewTestAgent|' command/agent_test.go
	gsed -i -e 's|= TestConfig|= agent.TestConfig|' command/agent_test.go
	gsed -i -e 's|: RetryJoin|: agent.RetryJoin|' command/agent_test.go

	gsed -i -e 's|\.\./\.\./|../|' command/config_util_test.go

	gsed -i -e 's|\bverifyUniqueListeners|VerifyUniqueListeners|' agent/config{,_test}.go command/agent.go
	gsed -i -e 's|\bserfLANKeyring\b|SerfLANKeyring|g' agent/{agent,keyring,testagent}.go command/agent.go
	gsed -i -e 's|\bserfWANKeyring\b|SerfWANKeyring|g' agent/{agent,keyring,testagent}.go command/agent.go
	gsed -i -e 's|\bNewAgent\b|agent.New|g' command/agent{,_test}.go
	gsed -i -e 's|\bNewAgent|New|' agent/{acl_test,agent,testagent}.go

	gsed -i -e 's|\bAgent\b|agent.&|g' command/agent{,_test}.go
	gsed -i -e 's|\bBool\b|agent.&|g' command/agent{,_test}.go
	gsed -i -e 's|\bConfig\b|agent.&|g' command/agent{,_test}.go
	gsed -i -e 's|\bDefaultConfig\b|agent.&|g' command/agent{,_test}.go
	gsed -i -e 's|\bDevConfig\b|agent.&|g' command/agent{,_test}.go
	gsed -i -e 's|\bMergeConfig\b|agent.&|g' command/agent{,_test}.go
	gsed -i -e 's|\bReadConfigPaths\b|agent.&|g' command/agent{,_test}.go
	gsed -i -e 's|\bParseMetaPair\b|agent.&|g' command/agent{,_test}.go
	gsed -i -e 's|\bSerfLANKeyring\b|agent.&|g' command/agent{,_test}.go
	gsed -i -e 's|\bSerfWANKeyring\b|agent.&|g' command/agent{,_test}.go

	gsed -i -e 's|circonus\.agent|circonus|g' command/agent{,_test}.go
	gsed -i -e 's|logger\.agent|logger|g' command/agent{,_test}.go
	gsed -i -e 's|metrics\.agent|metrics|g' command/agent{,_test}.go
	gsed -i -e 's|// agent.Agent|// agent|' command/agent{,_test}.go
	gsed -i -e 's|a\.agent\.Config|a.Config|' command/agent{,_test}.go

	gsed -i -e 's|agent\.AppendSliceValue|AppendSliceValue|' command/{configtest,validate}.go

	gsed -i -e 's|consul/consul|agent/consul|' GNUmakefile

	gsed -i -e 's|\.\./test|../../test|' agent/consul/server_test.go

	# fix imports
	f=$(grep -rl 'github.com/hashicorp/consul/command/agent' * | grep '\.go')
	gsed -i -e 's|github.com/hashicorp/consul/command/agent|github.com/hashicorp/consul/agent|' $f
	goimports -w $f

	f=$(grep -rl 'github.com/hashicorp/consul/consul' * | grep '\.go')
	gsed -i -e 's|github.com/hashicorp/consul/consul|github.com/hashicorp/consul/agent/consul|' $f
	goimports -w $f

	goimports -w command/*.go main.go
)
2017-06-10 18:52:45 +02:00
Frank Schroeder 9ceef2b32e test: move discover tests 2017-06-10 18:52:45 +02:00
Frank Schroeder d2ee591fbf use 'c' as command receiver for simple commands 2017-06-10 18:52:45 +02:00
Frank Schroeder 902f4caff2 agent: move watch plans into agent 2017-06-10 18:52:45 +02:00
James Phillips 3835788d6a Update CHANGELOG.md 2017-06-09 21:11:16 -07:00
James Phillips 1f040b6a7a Create CHANGELOG.md 2017-06-09 15:51:50 -07:00
preetapan 2de032125b Fixed regression with dns server start condition (#3137) 2017-06-09 15:50:06 -07:00
Seth Vargo 401380ae41
Update CHANGELOG 2017-06-09 15:13:28 -04:00
Seth Vargo 864358caf0 Merge pull request #3136 from hashicorp/sethvargo/api-ux
Parse values given to ?passing in the API
2017-06-09 15:10:23 -04:00
Seth Vargo 89f16984f9
Simplify 2017-06-09 14:55:04 -04:00
Seth Vargo ee1b5d5024
Update comment 2017-06-09 14:51:34 -04:00
Seth Vargo 532f8d1435
Parse values given to ?passing in the API
This PR fixes GH-2212 in the most backwards-compatible way I can think
of. If the user does not pass a value for `?passing`, it's assumed to be
true, which mirrors the current behavior. However, if the user passes
any value for passing, that value is parsed as a bool using strconv.

It's important to note that this is technically a breaking change.
Previously using `?passing=false` would return only passing nodes. While
this behavior is obviously incorrect, it was the previous behavior. We
should call this out very clearly in the CHANGELOG.
2017-06-09 14:36:00 -04:00
James Phillips 7e4406e5b9
Puts the tree into 0.9.0 dev mode. 2017-06-09 08:27:15 -07:00
James Phillips c5596e3574
Bumps the website version to 0.8.4. 2017-06-09 08:03:24 -07:00
James Phillips f4360770d8
Release v0.8.4 2017-06-09 07:44:26 -07:00
James Phillips d968d8b648
Puts the tree into 0.8.4. release mode. 2017-06-09 07:34:00 -07:00
James Phillips 076417064f
Removes obsolete Windows build scripts. 2017-06-09 01:13:28 -07:00
James Phillips de74e430f3
Removes obsolete Windows batch file and instructions.
We officially just cross-compile to Windows, and soon will have the normal
Go build working. Since we no longer have any cgo dependencies, none of this
complexity is really needed.
2017-06-09 01:11:38 -07:00
James Phillips 34704c7080 Merge pull request #3133 from hashicorp/less-parallel
Makes tests less parallel and relaxes timing.
2017-06-09 00:02:35 -07:00
James Phillips 86713c1b8a
Opens up timing bound on flaky test. 2017-06-08 21:37:52 -07:00
James Phillips a87c9b528e
Removes t.Parallel() on any consul package tests that use a test server. 2017-06-08 21:34:07 -07:00
James Phillips 2039ae903b Merge pull request #3128 from hashicorp/broken-tests
Fixes HTTP header compare by including standard headers.
2017-06-08 14:11:15 -07:00
James Phillips 66ec9c7a7d
Fixes HTTP header compare by including standard headers. 2017-06-08 14:10:46 -07:00
Frank Schroeder b5f8d6f9fd agent: fix time.Duration parsing
The duration can be passed as a string, a float64 or a time.Duration
and this patch handles this properly.
2017-06-08 22:42:49 +02:00
James Phillips 76e8ed07b0 Create CHANGELOG.md 2017-06-08 13:16:32 -07:00
Preetha Appan 51b0f991c3 Updated changelog 2017-06-08 13:04:53 -07:00
preetapan 06edd1eb4f Merge pull request #3127 from hashicorp/s3_encrypt_doc
Added documentation for new s3 server side encryption
2017-06-08 12:44:53 -07:00
Preetha Appan ec0cfae5ab Added documentation for new s3 server side encryption 2017-06-08 11:39:10 -07:00
James Phillips 22e89abd80 Merge pull request #3126 from hashicorp/doc-eureka
website: Add a vs Eureka. Fixes #1295
2017-06-08 11:04:28 -07:00
Armon Dadgar df55d9fbb0 website: Add a vs Eureka. Fixes #1295 2017-06-08 11:00:30 -07:00
James Phillips 967a7a400b Create CHANGELOG.md 2017-06-08 07:25:19 -07:00
James Phillips 0a3bcf0f41 Create CHANGELOG.md 2017-06-08 07:24:42 -07:00
James Phillips 08f60eb64f Create CHANGELOG.md 2017-06-08 07:22:29 -07:00
James Phillips 4a6b7f6c61 Merge pull request #3124 from hashicorp/log-signal-events
agent: log events and exit code to the log file
2017-06-08 07:21:24 -07:00
Seth Vargo 138f1c12d9
Update middleman 2017-06-08 08:49:43 -04:00
Frank Schroeder 01bc7dd3c4
test: log exit code in cluster.bash 2017-06-08 14:06:10 +02:00
Frank Schroeder 39d33c2fdc
agent: log events and exit code to the log file
This patch logs the signals, events, errors and the exit
code to the log file instead of printing it on the console.
This should provide a more complete picture for debugging.
2017-06-08 10:07:55 +02:00
Frank Schroeder 4a223111d2
log: use prefix [ERR] instead of [ERROR] 2017-06-08 09:50:47 +02:00
James Phillips bc3b68ba80 Fixes version reference in encryption docs. 2017-06-07 21:31:48 -07:00
James Phillips fa8a26ad54
Updates static assets to latest. 2017-06-07 21:16:59 -07:00
James Phillips 73b8d6d3b1 Merge pull request #3123 from hashicorp/upgrade-warn
Changes FSM catalog info messages into warnings.
2017-06-07 20:47:06 -07:00
James Phillips f7ec641c96
Changes FSM catalog info messages into warnings. 2017-06-07 20:46:39 -07:00
James Phillips e7cf67b31b Update CHANGELOG.md 2017-06-07 10:42:55 -07:00
James Phillips a09eed585e Merge pull request #3121 from hashicorp/increase-graceful-timeout
agent: increase graceful shutdown timeout
2017-06-07 10:42:19 -07:00
James Phillips 8ffa0e730f Merge pull request #3118 from katiebayes/master
Add enterprise badges and update middleman version
2017-06-07 10:41:57 -07:00
James Phillips 24ebe5cc30 Merge pull request #3120 from hashicorp/better-shutdown-logs
agent: log different shutdown stages
2017-06-07 10:41:37 -07:00
James Phillips 98423f3def Merge pull request #3119 from hashicorp/contrib-cluster-test-script
test: add script for starting a multi-node cluster
2017-06-07 10:41:02 -07:00