Commit Graph

4994 Commits (bdc3dd14c2644b56d2dbfd460290a0e47ad90c11)

Author SHA1 Message Date
Kyle Havlovitz 2ada0439d4
Add rpc_listener option to segment config
7 years ago
Kyle Havlovitz a30e7657af
Add segment config validation
7 years ago
James Phillips b1a15e0c3d
Adds open source side of network segments (feature is Enterprise-only).
7 years ago
Preetha Appan a231eea0e7 More cleanup from code review
7 years ago
Preetha Appan c6ee9bfa69 Remove copy pasted duplicate line, update documentation.
7 years ago
Preetha Appan 0f4e24f72c Consolidate server lookup into one place and replace usages of localConsuls.
7 years ago
Preetha Appan 0f418a1bcf Remove unused function
7 years ago
Preetha Appan e639154abd Remove stray commented line
7 years ago
Preetha Appan 00836a6aab Remove server address tracking logic from manager/router and maintain it as part of lan event listener instead. Used sync.Map to track this, and added unit tests
7 years ago
Preetha Appan 830aca958a ServerAddressProvider interface also returns an error now
7 years ago
Preetha Appan c68fce89b5 Use config struct to create NetworkTransport layer when setting up raft
7 years ago
Preetha Appan 393ce1581b Implement AddressProvider and wire that up to raft transport layer to support server nodes changing their IP addresses in containerized environments
7 years ago
Frank Schroeder 831d84c940 build: make tests independent of build tags
7 years ago
Frank Schroeder d8195b3a4d agent: drop status code comments
7 years ago
Frank Schroeder f09a8bb1b6 agent: use http.StatusRequestEntityTooLarge instead of 413
7 years ago
Frank Schroeder bc5dc32c1d agent: use http.StatusInternalServerError instead of 500
7 years ago
Frank Schroeder fa121be33f agent: use http.StatusMethodNotAllowed instead of 405
7 years ago
Frank Schroeder ad5c1d9e72 agent: use http.StatusNotFound instead of 404
7 years ago
Frank Schroeder 1a557ee9e9 agent: use http.StatusForbidden instead of 403
7 years ago
Frank Schroeder 7e2bc1b411 agent: use http.StatusUnauthorized instead of 401
7 years ago
Frank Schroeder 5d1546b052 agent: use http.StatusBadRequest instead of 400
7 years ago
Frank Schroeder 14ab5c7641 agent: support go-discover retry-join for wan
7 years ago
Frank Schröder a3934c263c acl: consolidate error handling (#3401)
7 years ago
Frank Schroeder 16c58da27d agent: drop unused code
7 years ago
Frank Schroeder bf96857b17 dns: replace nameserver lookup with consistent rpc call
7 years ago
Frank Schroeder 4052c6d2d2 dns: split node lookup from request handling
7 years ago
Frank Schroeder d4e3d4344a dns: refactor label by unrolling loop
7 years ago
Frank Schroeder 70be1ab635 dns: move ttl closer to usage
7 years ago
James Phillips f51d56c80c
Switches to using a read lock for the agent's RPC dispatcher.
7 years ago
Frank Schröder 4b642fed2f agent: honor deprecated flags for retry-join-{ec2,azure,gce} (#3384)
7 years ago
James Phillips e8a83bb463 Revert "Return 403 rather than a 404 when acls cause all results to be filter…"
7 years ago
James Phillips 02a87df044 Revert "Ensure that we return a permission denied only if the list of keys/en…"
7 years ago
Preetha Appan 42fb49c00b Added unit test case to kvs_endpointtest
7 years ago
Preetha Appan 3276891142 Ensure that we return a permission denied only if the list of keys/entries prior to filtering by ACL is non empty
7 years ago
Frank Schroeder 7cff50a4df
agent: move agent/consul/agent to agent/metadata
7 years ago
Frank Schroeder c395599cea
agent: move agent/consul/servers to agent/router
7 years ago
Frank Schroeder 1acff3533e
agent: move agent/consul/structs to agent/structs
7 years ago
James Phillips cb618918b3
Cleans up some go fmt issues.
7 years ago
James Phillips 7442039c2d
Fixes a vet error.
7 years ago
Kyle Havlovitz cf02e3bc22 Merge pull request #3369 from hashicorp/metrics-enhancements
7 years ago
Kyle Havlovitz c1c883f441
Add doc links for metrics endpoint
7 years ago
Kyle Havlovitz 0428e9fe9e
Update docs for metrics endpoint
7 years ago
Frank Schroeder 9fa237ddb6
dns: minor cleanups
7 years ago
Kyle Havlovitz d5634fe2a8
Add support for labels/filters from go-metrics
7 years ago
Preetha Appan 72ae8c8f33 Go back to using <nodename>.node.dc.consul as the name of the ns record being returned.
7 years ago
Frank Schroeder 8a9653bdf8
dns: keep NS names in consul domain
7 years ago
Frank Schroeder f17bf78bb1
dns: postmaster -> hostmaster
7 years ago
Frank Schroeder 60608b455d
dns: we do not support zone transfers
7 years ago
Frank Schroeder 76b2538915
dns: drop CNAME for primary name server
7 years ago
Preetha Appan 7f34dc08a5
Added test case with IPV6 bind address for NS records, rewrote tests to use verify library and other code review feedback
7 years ago
Preetha Appan 76319f751d
Added back glue records in NS response, expanded unit test. Also reused same function used in node lookup for adding A/AAAA records in the extra section of the NS response
7 years ago
Preetha Appan f01f17bda3
Don't add A records for NS requests, because the record being returned already resolves correctly. Also fixed all the unit tests, and ignored hostnames that don't meet valid dns hostname criteria
7 years ago
Frank Schroeder 7ea11c2f45
dns: provide correct SOA and NS responses
7 years ago
Preetha Appan 824fc4ee20
Unify regex used to identify invalid dns characters
7 years ago
Preetha Appan 37f75a393e
Use sanitized version of node name of server in NS record, and start with "server" rather than "ns"
7 years ago
Preetha Appan 794d1afe44
Removed a copy pasted irrelevant comment, and other code review feedback
7 years ago
Preetha Appan f9db387097
Add NS records and A records for each server. Constructs ns host names using the advertise address of the server.
7 years ago
James Phillips 4bee2e49f5 Adds secure introduction for the ACL replication token. (#3357)
7 years ago
Frank Schroeder 9ffeba18ee
agent: fix code for updated go-discover signature
7 years ago
James Phillips c0a5ad7903 Adds a new /v1/acl/bootstrap API (#3349)
7 years ago
Miguel Prokop 6852dec3f2 agent: Fix script quoting on windows (#1875)
7 years ago
Frank Schroeder 2fac427cd4 agent: use github.com/hashicorp/go-discover
7 years ago
Preetha Appan 4076c0d741 Return nil instead of empty list when returning a PermissionDenied error, updated unit test
7 years ago
Preetha Appan 6336014a86 Return 403 rather than a 404 when acls cause all results to be filtered out. This fixes #2637
7 years ago
preetapan 0f494d8b86 Merge pull request #3332 from hashicorp/issue_3322
7 years ago
Preetha Appan 2d84cd2330 Tweaked parsing error message to quote properly
7 years ago
James Phillips 10b660d77a Adds missing autopilot snapshot test and avoids snapshotting nil. (#3333)
7 years ago
Preetha Appan 5aeab1463b Validate unix sockets and ip addresses as needed, more test cases
7 years ago
Preetha Appan 4cec55e8db Modify ResolveTmplAddrs to parse advertise IPs, added test cases that fail to parse correctly
7 years ago
Preetha Appan 13c118ea51 Removed extra newlines
7 years ago
Preetha Appan 840749db7e Fix comments, and remove redundant TestConfig init from a couple of unit tests
7 years ago
Frank Schroeder b19b062194
add tests for go-sockaddr template parsing
7 years ago
Frank Schroeder ac9602e798
agent: unix sockets are not ip addrs
7 years ago
Frank Schroeder 2fcdb35cbb
config: refactor tmpl resolution fn
7 years ago
Preetha Appan aa98aeb4b1 Moved handling advertise address to readConfig and out of the agent's constructor, plus unit test fixes
7 years ago
Preetha Appan 25acd1534a Move go-socketaddr template parsing into config package to make it happen before creating a new agent. Also removed redundant parsetemplate calls from agent.go.
7 years ago
James Phillips 6250cd70f5 Adds option to prepared queries to remove empty tags. (#3330)
7 years ago
James Phillips 496b0bcf07 Adds support for agent-side ACL token management via API instead of config files. (#3324)
7 years ago
Preetha Appan b94617b281 Add extra test case for deleting entire tree with empty prefix
7 years ago
Preetha Appan 4498814843 Don't insert tombstone for empty prefix delete. Other minor unit test fixes
7 years ago
Preetha Appan fee418d378 Removed redundant comments and unit test
7 years ago
Preetha Appan b772c477c2 Removed redundant call to reap tombstone from unit test
7 years ago
Preetha Appan ae443e21d6 Improved unit test per code review
7 years ago
Preetha Appan 36acf8d6a4 Use new DeletePrefixMethod for implementing KVSDeleteTree operation. This makes deletes on sub trees larger than one million nodes about 100 times faster. Added unit tests.
7 years ago
James Phillips c413a9161e Removes an unnecessary close.
7 years ago
Preetha Appan f8b633c69e Removed redundant logging
7 years ago
Preetha Appan c26fd66edd Clean up temporary files on write errors, and ignore any temporary service files on load with a warning. This fixes #3207
7 years ago
James Phillips 1774fdc237
Tweaks the error when scripts are disabled.
7 years ago
Kyle Havlovitz d74390ef86 Fix UpgradeVersionTag field not being passed correctly (#3304)
7 years ago
Preetha Appan 1f35aa6ff2 Made unit test for AddCheck error check the actual error string
7 years ago
Preetha Appan c32e4ebe26 Unit test for failure case of AddCheck
7 years ago
Frank Schroeder 0047b7d3f0
fix spelling in filenames
7 years ago
Frank Schroeder 83577e0daa agent: make docker client work on windows
7 years ago
Frank Schroeder b97ab92d87
build: add missing build tags
7 years ago
preetapan fb43953894 Merge pull request #3296 from hashicorp/ensure_registration_race
7 years ago
Preetha Appan e50f0e6722 Clean up any watch monitors associated with a failed AddCheck
7 years ago
Preetha Appan 6a257f242e Removed unit test, added clarifying comment and returned a friendlier error message similar to the one in agent's AddService method
7 years ago
Preetha Appan 9f048afe29 Fix race condition between removing a service and adding a check for the same service, which was causing orphaned checks
7 years ago
Kyle Havlovitz 19eae3d14b
Add UpgradeVersionTag to autopilot config
7 years ago
Frank Schroeder 0d9b53730f agent: stop docker checks on shutdown
7 years ago
Frank Schroeder 60540c2417 agent: stop and remove docker checks
7 years ago
Frank Schroeder 2123700056
agent: replace docker check
7 years ago
James Phillips fff0f9698f Prevents disabling gossip keyring file from disabling gossip encryption. (#3278)
7 years ago
James Phillips 1791d99a10 Adds new config to make script checks opt-in, updates documentation. (#3284)
7 years ago
James Phillips 780e68a753 Changes remote exec KV read to call GetTokenForAgent(). (#3283)
7 years ago
James Phillips 1004d0ec0e Adds node read privileges to the acl_agent_master_token. (#3277)
7 years ago
Frank Schröder c001722848 azure: tag map can return nil (#3280)
7 years ago
James Phillips 218ac4cb1e Obfuscates ACL tokens appearing in /v1/acl/<verb>/<token> APIs. (#3276)
7 years ago
James Phillips 872cf9ff95 Changes ACL clone response to 403 if not authorized, or if token doesn't exist. (#3275)
7 years ago
Kyle Havlovitz 78c3a86405
Add TLS setting to router areas
7 years ago
James Phillips 0881e46111 Cleans up version 8 ACLs in the agent and the docs. (#3248)
7 years ago
Frank Schroeder 764dabfcf7
agent: fix go vet issue
7 years ago
James Phillips 66edec5dfd Adds the ability to blacklist specific HTTP endpoints. (#3252)
7 years ago
James Phillips 7200b8cda8 UI cleanup follow up from #3245. (#3251)
7 years ago
James Phillips aa11956d63 Changes the default ACL token type to "client" in web UI. (#3246)
7 years ago
James Phillips 86b1e64a33 Cleans up web UI and fixes ACL token "stuckness" issue. (#3245)
7 years ago
Frank Schroeder 1781fd311f address review comments
7 years ago
Frank Schroeder e4b40acc7e agent: remove unused code
7 years ago
Frank Schroeder 8c792ad57d agent: make TestClient_RPC_ConsulServerPing more robust
7 years ago
Frank Schroeder 4a4b91a2db agent: fix data races with registerEndpoint
7 years ago
Frank Schroeder 19b937ba80 agent: make Reap test timing less aggressive
7 years ago
James Phillips a855d31f84 Adds a comment about flood joining.
7 years ago
James Phillips 5b5217528a Simplifies Serf dynamic port selection code.
7 years ago
James Phillips d8db4bc086 test: Changes WAN/LAN join confirmer to use port number vs. address.
7 years ago
Frank Schroeder d92f70f313 test: make joinLAN/WAN reliable
7 years ago
Frank Schroeder 112bc19cd5 rpc: make TestServer_JoinSeparateLanAndWanAddresses more robust
7 years ago
Frank Schroeder ffd45f5da5 rpc: make TestClient_SnapshotRPC_TLS more robust
7 years ago
Frank Schroeder c218fdbc77 agent: make timing sensitive tests more robust
7 years ago
Frank Schroeder b12b914017 agent: fix TestCheckHTTP_TLSSkipVerify_true_pass
7 years ago
Frank Schroeder 7381a05d8d agent: do not modify agent config after NewAgent
7 years ago
Frank Schroeder cec9dcfee8 agent: fix pending data races between localState and agent
7 years ago
Frank Schroeder 00f6ba298e dns: fix data race in TestDNS_ServiceLookup_FilterACL
7 years ago
Frank Schroeder bcd2301b81 agent: fix data race in TestAgentAntiEntropy_EnableTagOverride
7 years ago
Frank Schroeder 7f7c0ad65e agent: clone partial consul config
7 years ago
Frank Schroeder 727b6444ad dns: fix data races in DNS compression tests
7 years ago
Frank Schroeder 0763788b82 agent: fix data race between consul server and local state
7 years ago
Frank Schroeder 119f6a1ed7 rpc: monkey patch fix for data races for localState
7 years ago
Frank Schroeder 2159d499e3 rpc: try shutting down leader first to avoid hang in TestLeader_LeftServer
7 years ago
Frank Schroeder f12fac278e rpc: fix logging and try quicker timing of TestServer_JoinSeparateLanAndWanAddresses
7 years ago
Frank Schroeder bae4b1d045 rpc: less agressive raft timeouts
7 years ago
Frank Schroeder 457b98a099 rpc: run agent/consul tests in parallel
7 years ago
Frank Schroeder 13eeeb720d rpc: refactor sessionTimers and fix racy tests
7 years ago
Frank Schroeder 05f756853e rpc: fix TestServer_Leave
7 years ago
Frank Schroeder 583959392b rpc: fix TestSession_Renew
7 years ago
Frank Schroeder ff2c29c0be rpc: fix TestReadyForConsistentRead
7 years ago
Frank Schroeder fcab525053 rpc: fix for 'no leader' in TLS tests
7 years ago
Frank Schroeder b2a71fd8b0 rpc: fix TestServer_JoinWAN_Flood
7 years ago
Frank Schroeder 8369b6cb9d rpc: provide unique node names for server and client
7 years ago
Frank Schroeder 534977239b rpc: prefix log output with test name
7 years ago
Frank Schroeder c8ef588d8d rpc: discover serf wan port before starting serf lan
7 years ago
Frank Schroeder 53eab7e970 rpc: bind rpc test server to port 0
7 years ago
Frank Schroeder e9e2c599db rpc: refactor: unify test server setup
7 years ago
Frank Schroeder c803146550 rpc: fix typos
7 years ago
Frank Schroeder a0368e3827 agent: refactor: log to stderr during tests
7 years ago
Frank Schroeder 2afafe6911 agent: refactor: use handler for test http tls server
7 years ago
Frank Schroeder 63447a0cf3 agent: refactor: make address translation part of the agent
7 years ago
Preetha Appan f549c06764 Rename to raftNotifyCh, fix typo
7 years ago
Preetha Appan f2171a6720 Fixes deadlock between barrier write and leader notify channel read . Fixes #3230
8 years ago
Grégoire Seux 940b1513a6 Correctly forward Host header in healthcheck (#3203)
8 years ago
Preetha Appan 07db760d53 Fix missing formatting directive causing go vet to fail
8 years ago
Frank Schroeder 6dd68f7ad7
Revert "agent: add allowStale option for HTTP API (#3142)"
8 years ago
Frank Schröder 4b51d00458 agent: fix DNS recursor tests (#3190)
8 years ago
James Phillips 4a3604a3ee
Removes some useless comments.
8 years ago
James Phillips 6977e40077 Fixes watch tracking during reloads and fixes address issue. (#3189)
8 years ago
James Phillips 380c8b957d Changes host-based node IDs from opt-out to opt-in. (#3187)
8 years ago
James Phillips 42f60b04bb Revert "discover: move instance discover code into separate package (#3144)" (#3180)
8 years ago
James Phillips e4b11682bc Fixes broken HTTP header and method for health checks. (#3178)
8 years ago
wojtkiewicz 1e0fd27a74
agent: add allowStale option for HTTP API (#3142)
8 years ago
wojtkiewicz 37785028be
agent: add "http_config"
8 years ago
James Phillips 0e695aef94 Fixes checked in web assets and associated build scripts. (#3173)
8 years ago
Frank Schröder 26bfb2d00a discover: move instance discover code into separate package (#3144)
8 years ago
Frank Schröder 31a310f551 agent: notify systemd after JoinLAN (#2121)
8 years ago
Frank Schroeder ea5b0f2c7c agent: fix 'consul leave' shutdown race (#2880)
8 years ago
Frank Schroeder 7abe308c66 agent: drop unused constant
8 years ago
Frank Schroeder c4fc581e07 agent: make registerEndpoint private
8 years ago
Frank Schroeder 2b41f2e3a3 agent: make the RPC endpoint overwrite mechanism more transparent
8 years ago
Frank Schroeder e15f9f9d90 agent: rename agent var
8 years ago
Frank Schroeder c49a15d0f3 agent: move structs into consul/structs pkg
8 years ago
Frank Schroeder 4273fb8444 agent: move NotifyGroup into the agent pkg
8 years ago
Frank Schroeder 82a132da60 agent: move conn pool for muxed connections into separate pkg
8 years ago
Frank Schroeder 80971c8a85 agent: move the SnapshotReplyFn out of the way
8 years ago
Frank Schroeder 04b9392b00 agent: use the delegate interface for local state
8 years ago
Frank Schroeder d77d2be13e agent: rename clientServer interface to delegate
8 years ago
preetapan 0c2a83e1ec Merge pull request #3154 from hashicorp/issue_2644_redux
8 years ago
Preetha Appan f658231ab9 Minor fixes per code review
8 years ago
Frank Schroeder b083ce17c7
Revert "agent: fix 'consul leave' shutdown race (#2880)"
8 years ago
Frank Schroeder 90c83a32b5 agent: fix 'consul leave' shutdown race (#2880)
8 years ago
Preetha Appan b3b2e9dcb4 Added unit test to verify consistentRead method behavior
8 years ago
Preetha Appan 44f5086873 Code review feedback, fixed major logic bug
8 years ago
Preetha Appan 72af7b9bc4 Redo bug fix for stale reads on server startup, leveraging RPCHOldtimeout instead of maxQueryTime, plus tests
8 years ago
Kyle Havlovitz 5d99ee80ca Add an option to disable keyring file (#3145)
8 years ago
Seth Vargo a8f1e7ebf9 Add EDNS0 support (#3131)
8 years ago
Preetha Appan cf5006c4f4 Fixed static asset build target and checked in new executable for assetfs
8 years ago
Frank Schroeder 1c75cf1af5 pkg refactor
8 years ago