Commit Graph

69 Commits

Author SHA1 Message Date
highlyunavailable 536db1fb9f Remove unused DefaultSemaphoreRetryTime
Fixes #932

DefaultSemaphoreRetryTime is actually unused, unlike DefaultLockRetryTime.
2015-05-15 08:25:02 -07:00
Armon Dadgar d18d82885f api: improve test reliability 2015-05-12 12:10:25 -07:00
Ryan Uber 3ce3c663ad Fix tests after merge 2015-05-11 18:53:09 -07:00
Armon Dadgar f797130228 Fixing merge conflict 2015-05-11 16:48:10 -07:00
Armon Dadgar eda7c1fdfc Merge pull request #912 from rojojo23/renew-periodic
modify RenewPeriodic to retry failed Renew until TTL elapses
2015-05-08 11:38:51 -07:00
Ryan Uber 234466b412 api: run tests in parallel 2015-05-08 10:27:24 -07:00
Robert Johnson d934906905 modify RenewPeriodic to retry failed Renews until TTL elapses 2015-05-06 16:40:45 -07:00
Armon Dadgar 9ca81565a5 api: Fixing test compilation issue 2015-05-04 15:27:22 -07:00
Armon Dadgar 63bd33ff0b Merge pull request #861 from fraenkel/reclaim_lock
Reclaim locks
2015-05-04 15:23:29 -07:00
Michael Fraenkel 093b23d0c3 Reclaim locks
- When attempting to lock with the same session that already owns the lock,
  Lock() will re-acquire the lock.
2015-04-29 10:10:24 -07:00
Ryan Mills 370853d7ff Allow specifying a status field in the agent/service/register and agent/check/register endpoints.
This status must be one of the valid check statuses: 'passing', 'warning', 'critical', 'unknown'.
If the status field is not present or the empty string, the default of 'critical' is used.
2015-04-12 02:00:31 +00:00
Ryan Uber 73a2799b0d testutil: Use HTTPAddr 2015-03-19 17:03:07 -07:00
Ryan Uber 64c1b1b446 testutil: exposing the API address from the test server 2015-03-19 17:03:06 -07:00
Ryan Uber 0af4bd8b23 testutil: initial pass at moving test server harness into testutil 2015-03-19 17:03:06 -07:00
Seth Vargo 51a6ecd826 Read select environment variables when generating the default configuration 2015-03-18 11:12:10 -04:00
Chris Grieger bd0c864495 Add 'ServiceAddress' field to 'CatalogService's truct 2015-03-04 10:29:57 +01:00
Ryan Uber 73eae757cf api: remove unneeded static config 2015-02-24 09:50:35 -08:00
Armon Dadgar 6f48e58014 api: Refactoring into shared write logic 2015-02-18 15:15:02 -08:00
Armon Dadgar 69d8b46fa5 api: Refactoring into shared query logic 2015-02-18 15:15:02 -08:00
Ryan Uber c248d5badd api: allow timeout field to be specified for checks 2015-02-05 23:34:30 -08:00
Nicholas Capo 25d2faf43b api/agent: Support HTTP service checks in client api 2015-02-03 20:13:55 +00:00
Armon Dadgar f4543ffc78 CHANGELOG update, gofmt 2015-01-22 13:42:22 -08:00
Armon Dadgar e5e519df4b Merge pull request #625 from hashicorp/f-maintcmd
New "maint" command
2015-01-22 11:56:49 -08:00
Dr. Stefan Schimanski b46d20727b Add test case for service Address field 2015-01-22 11:50:20 +01:00
Dr. Stefan Schimanski 1ef12ae24b Add agent service Address field to the api
The Address field was introduced in #570. This patch extends this to the api.
2015-01-22 10:26:27 +01:00
Ryan Uber d10529c233 api: support reason flag for maintenance mode 2015-01-21 13:02:47 -08:00
Ryan Uber 420d4d0ba4 api: finish up maintenance tests 2015-01-21 11:08:57 -08:00
Ryan Uber 98d47d2b9a api: add node/service maintenance mode functions 2015-01-21 10:51:43 -08:00
Ryan Uber a9069b5993 api: support multiple checks during service/check registration 2015-01-20 21:48:45 -08:00
Armon Dadgar a9819e71a8 Fixing merge conflict 2015-01-20 13:01:13 -08:00
Armon Dadgar de199d1fd6 api: Fixing some comments 2015-01-20 12:58:09 -08:00
Armon Dadgar 707b232274 api: Refactor to share session renew code 2015-01-19 16:53:47 -10:00
Armon Dadgar bed066dda9 api: Detect conflicting existing values for lock/semaphore 2015-01-19 15:32:19 -10:00
Armon Dadgar 1a6b160641 api: Make channels receive only 2015-01-19 14:37:36 -10:00
Ryan Uber 5137388d43 Merge pull request #608 from imkira/fixBodyLeak
fixed: body not closed for non HTTP 200 responses
2015-01-19 09:33:06 -08:00
Mário Freitas 90b74ee4e2 fixed: requireOK should close Body on error 2015-01-19 11:53:21 +09:00
Mário Freitas 2db0a65a74 Revert "fixed: body not closed for non HTTP 200 responses"
This reverts commit dafa61ad10d67d1992201f8499ef681e01de8a09.
2015-01-19 11:51:51 +09:00
Ryan Uber 7c6455e1ba api: simple test for unix socket connectivity 2015-01-16 10:56:47 -08:00
Ryan Uber 705801ccca agent: fixing up tests 2015-01-16 09:58:37 -08:00
Mário Freitas 18c4d6ea9e fixed: body not closed for non HTTP 200 responses 2015-01-16 18:54:55 +09:00
Ryan Uber ad19c0afc2 agent: beginning refactor 2015-01-16 00:45:03 -08:00
Jeff Mitchell 9bd66c70e5 Ensure a socket is created for permissions adjustment tests and fix some
items pointed out in the code review

This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
2015-01-15 14:33:44 +00:00
Jeff Mitchell 5cd607b89a Unix socket-based HTTP API test functionality. As a consequence this
also required making some hardcoded values into more generic
functionality, which is generally a good thing. I verified that each
test function that I modified still passed.:

This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
2015-01-14 19:49:37 +00:00
Jeff Mitchell 400eadd671 RPC and HTTP interfaces fully generically-sockified so Unix is supported.
Client works for RPC; will honor CONSUL_RPC_ADDR. HTTP works via consul/api;
honors CONSUL_HTTP_ADDR.

The format of a Unix socket in configuration data is:
"unix://[/path/to/socket];[username or uid];[gid];[mode]"

Obviously, the user must have appropriate permissions to create the socket
file in the given path and assign the requested uid/gid. Also note that Go does
not support gid lookups from group name, so gid must be numeric. See
https://codereview.appspot.com/101310044

When connecting from the client, the format is just the first part of the
above line:
"unix://[/path/to/socket]"

This code is copyright 2014 Akamai Technologies, Inc. <opensource@akamai.com>
2015-01-14 19:31:21 +00:00
Armon Dadgar af186ac54a api: Adding Destroy to cleanup a semaphore 2015-01-13 14:18:28 -08:00
Armon Dadgar a12883a5be api: Adding Destroy to cleanup a lock 2015-01-13 14:01:50 -08:00
Armon Dadgar 18ebb1a8e9 api: Add support for DeleteCAS 2015-01-13 13:57:48 -08:00
Armon Dadgar 6da4761221 Merge pull request #600 from hashicorp/f-api-semaphore
Adding Semaphore support to API
2015-01-13 11:59:22 -08:00
Armon Dadgar 2baa97dde5 api: Changing default semaphore key 2015-01-13 11:51:12 -08:00
Armon Dadgar 229ee483cb api: More reliable session check 2015-01-13 11:50:57 -08:00