Commit Graph

790 Commits

Author SHA1 Message Date
Ying Li 3c58f3cffc Simplify server health check to only check only the key management client.
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-16 15:11:19 -07:00
Ying Li 6db76a873e Small cleanup as per review comments
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-16 14:48:05 -07:00
Ying Li bdcd70eca7 Remove -debug from signer/server Dockerfiles
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-16 14:40:33 -07:00
Mary Anthony 497bbb2410 Retooling for Hugo 15 patch
Signed-off-by: Mary Anthony <mary@docker.com>
2015-10-16 13:17:58 -07:00
Ying Li 81380e0862 Even simpler - cancel the GRPC call using the context object passed
to the GRPC clients - thanks @endophage!

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-16 09:46:08 -07:00
David Lawrence 089d8450d8 Merge pull request #218 from endophage/update_gotuf
updating gotuf in godeps
2015-10-15 15:30:19 -07:00
David Lawrence 15b07101c0 updating gotuf dependency
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-10-15 14:52:18 -07:00
Ying Li faff328d62 Simplify by using a single buffered channel, instead of having a done
channel and a regular channel - thanks @aaronlehmann!

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-15 11:43:17 -07:00
Ying Li 23a5d42bf6 Use a done channel to clean up and prevent the goroutine from writing
to a closed channel.

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-15 11:15:07 -07:00
Ying Li 5f65d86411 Update circle-ci to use go 1.5.1
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-15 10:49:26 -07:00
Ying Li a49406de42 Log an error if the notary server cannot reach the signer or otherwise
if the signer is in trouble, but do not fail the health check, since
the server can operate for a while without the signer (the server will
have degraded performance, but is not down)

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-15 10:48:10 -07:00
Ying Li a1edc02b82 Use a function interface instead of declaring an anonymous interface in
the function arguments.

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-15 10:34:11 -07:00
Ying Li b94915628b Changing docstring to re-trigger CI
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-15 09:13:24 -07:00
Ying Li 33e031444e Better line wrapping and more comments
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 18:10:21 -07:00
Ying Li bca919c65f Making an RPC call would hang forever if the connection to the GRPC server dies
(it just retries to connect, and the RPC call would just block until it does), so change up
how this works by timing out the health check.

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 18:03:19 -07:00
Ying Li cd5015592a Fix the key names for the server health checks
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 14:52:31 -07:00
Ying Li 37d7ee84ea Add -debug to the notary-server Dockerfile so that the debug server
starts up and we can check 8080.

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 14:50:43 -07:00
Ying Li 60271f3014 Enable the signer RPC health check calls to return the last checked health
status from the health package.

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 14:49:39 -07:00
Ying Li 30330f43e2 Register trust health checks and DB health check with the notary server.
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 13:23:38 -07:00
Ying Li 4028941b3f Add health checks functions to the trust service client API.
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 13:23:21 -07:00
Ying Li 6b98278282 Merge pull request #215 from cyli/server-uses-gorm
Use gorm for storing notary-server information
2015-10-14 13:09:37 -07:00
Ying Li 272f442fee Use an anonymous interface instead, thanks @endophage
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 11:33:45 -07:00
Ying Li 79066c3403 Just drop the test tables when they should not exist
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 11:30:34 -07:00
Ying Li 7f0078d513 Define interface for iterating through gorm models by table name
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 11:30:04 -07:00
Ying Li b5690cfc51 Undo accidental downgrade of Go version
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 11:09:46 -07:00
Ying Li f49b74675d Update Gotuf to the latest version (sqlite3 dependency changed) and clean up some old
Godep dependencies that are no longer needed.

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-14 10:53:07 -07:00
Ying Li e786d62f0f Check for duplicate key errors in both mysql and sqlite3 in server/db
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-13 17:04:24 -07:00
Ying Li ba4e596457 Move the testing.T module to be the first argument to helper functions.
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-13 16:19:17 -07:00
Ying Li 09a041be14 Use more idiomatic go in if conditions.
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-13 16:18:59 -07:00
Ying Li 9290507a1f In server/storage/database, do not panic, and also return the right error.
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-13 15:56:45 -07:00
Diogo Mónica bf783ff65f Merge pull request #217 from mtrmac/circleci-make
Use Makefile targets for test/pre to avoid duplication
2015-10-13 13:34:19 -07:00
Miloslav Trmač f677dcc1be Use Makefile targets for test/pre to avoid duplication
Thus, we will actually test that the Makefile works.

Doesn’t yet convert test/override because the two already differ and
it’s not immediately obvious to me which one to use.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2015-10-13 22:21:41 +02:00
Ying Li 517dd4bbd0 Rename MySQL to SQL in server DB tests
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-13 11:28:57 -07:00
Ying Li df95dc4564 Add a DB health check to the server storage DB
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-13 11:28:14 -07:00
David Lawrence a16bd17b97 Merge pull request #216 from mtrmac/circleci-imports
Use canonical import paths instead of forked repo name
2015-10-13 10:20:57 -07:00
Miloslav Trmač 18da3f6537 Use canonical import paths instead of forked repo name
The code referes to canonical import paths, so the code needs to be
available there even if CircleCI is building from a forked repository.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2015-10-13 16:12:59 +02:00
Ying Li d545cdd3fd Merge pull request #210 from docker/client-side-config
Adding client-side root-ca server and server config
2015-10-12 18:46:40 -07:00
Ying Li 27e3d7e06c Update README with docker-machine instructions
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-12 18:41:31 -07:00
Diogo Monica b18e890e1c Changing the default config to point to notary-server
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-10-12 18:21:39 -07:00
Diogo Monica 70fe89f69c Adding check for relative VS full path
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-10-12 18:15:38 -07:00
Diogo Monica 11f823cf2a Changed README to reflect the new defaults
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-10-12 17:14:26 -07:00
Diogo Monica 8299e01b0a Fixed comments, changed default config
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-10-12 17:14:23 -07:00
Diogo Monica c5e3580189 Added base signer Dockerfile, and changed base to be go 1.5.1
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-10-12 17:13:39 -07:00
Diogo Monica aeb96f27a2 Adding client-side root-ca server and config
Signed-off-by: Diogo Monica <diogo@docker.com>
2015-10-12 17:13:39 -07:00
Ying Li 85a447f701 Clean up SQLStorage docstring to refer to the model
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-12 17:10:33 -07:00
Ying Li 4eaf6dc15c Add migrate to the sample mysql container
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-12 16:50:25 -07:00
Ying Li 7fa991c3ff Gormizes the server database and make it SQL-DB agnostic.
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-12 16:45:41 -07:00
Ying Li 75893ffed3 Merge pull request #211 from cyli/gormize-server-db-tests
Convert the server DB tests to use GORM with SQLite3 instead of sqlmock
2015-10-12 16:27:37 -07:00
Ying Li 87ec8a25bf Use NULL DEFAULT NULL instead of NULL for timestamps
Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-12 16:03:56 -07:00
Ying Li e8528ec391 Attempt to match the model exactly up with the initial sql + the
migrate sql.

Signed-off-by: Ying Li <ying.li@docker.com>
2015-10-12 15:44:00 -07:00