Commit graph

17 commits

Author SHA1 Message Date
Andrej Tokarčík 539ba24550 Fix support for insecure etcd mode 2021-03-02 13:20:43 -08:00
Andrej Tokarčík 976d8517cb
Remove support for migrating from legacy etcd prefix (#5798)
This code should have been removed in 4.4.
2021-03-02 20:49:11 +01:00
Steven Martin 26ca81bfde
Update etcd image to 3.4.X version for example (#4473) 2020-10-07 14:47:21 -04:00
Gus Luxton 434775692a
Revert "Fix shellcheck quotation warnings" (#4477)
This reverts commit f06e9204d1.
2020-10-07 14:00:02 -03:00
Andrew Lytvynov 5b93ebb800 Disable quotation shellcheck warning in some cases
`dirname` will always output a single item.
2020-10-06 17:32:38 +00:00
Andrew Lytvynov 4b6cf2b2c9 Apply suggestions from code review
Co-authored-by: Gus Luxton <gus@gravitational.com>
2020-10-06 17:32:38 +00:00
Andrew Lytvynov f06e9204d1 Fix shellcheck quotation warnings
And enable all shellcheck checks in CI.
2020-10-06 17:32:38 +00:00
Andrew Lytvynov 8d7a217089 Run shellcheck during "make lint"
Shellcheck is a linter for shell scripts. Since we have quite a few of
those for release packaging and examples, we'll benefit from an extra
set of (robot) eyes.

Note: I disabled https://github.com/koalaman/shellcheck/wiki/Sc2086 to
make this PR smaller. That specific check is for the most frequent
mistake in our scripts - not quoting env var expansions. I'll do a
separate PR cleaning those up.

`build.assets/pkg` is no longer used and was removed.
2020-09-29 20:40:16 +00:00
Andrew Lytvynov 03064cfa96 etcd: don't confuse prefixes during migration
The prefix fetching logic has a bug: it treats everything starting with
`/teleport` as the legacy prefix data, even if it's `/teleport-foo/bar`.
This is an issue if user specifies `/teleport-foo` as their custom
prefix. Each restart will copy the data from `/teleport-foo/...` to
`/teleport-foo-foo/...`.

Set the legacy prefix const to `/teleport/` instead. This avoids
excessive copying during startup.

Prefixes can still be confused later on, with `Watch` and `GetRange`,
but this is harder to migrate with backwards-compatibility.
2020-09-14 21:26:36 +00:00
Andrew Lytvynov a5e0720107 etcd: propagate the prefix from config
Prefix-handling code was using a hardcoded prefix (`/teleport`) instead
of the prefix specified in config. Use the correct config prefix and add
a test.
2020-07-02 23:24:49 +00:00
Alexander Klizhentas 7f494f7c10
Updating dependencies for etcd v3.3.15 (#2965)
Fixes #2762

This commit updates go etcd client that fixes
issue of the first etcd peer going down briging down
the whole cluster.
2019-09-08 10:50:56 -07:00
Russell Jones 0e3e4a1e62 Do not emit events in mirror mode.
Update mirror mode (for both the memory and SQLite backends) to no
longer emit events when an element expires. This allows caches to handle
update/delete logic themselves.

This fixes an issue where services.ProxyWatcher was not getting updates
to the list of proxies.
2019-05-21 09:58:43 -07:00
Sasha Klizhentas f40df845db Events and GRPC API
This commit introduces several key changes to
Teleport backend and API infrastructure
in order to achieve scalability improvements
on 10K+ node deployments.

Events and plain keyspace
--------------------------

New backend interface supports events,
pagination and range queries
and moves away from buckets to
plain keyspace, what better aligns
with DynamoDB and Etcd featuring similar
interfaces.

All backend implementations are
exposing Events API, allowing
multiple subscribers to consume the same
event stream and avoid polling database.

Replacing BoltDB, Dir with SQLite
-------------------------------

BoltDB backend does not support
having two processes access the database at the
same time. This prevented Teleport
using BoltDB backend to be live reloaded.

SQLite supports reads/writes by multiple
processes and makes Dir backend obsolete
as SQLite is more efficient on larger collections,
supports transactions and can detect data
corruption.

Teleport automatically migrates data from
Bolt and Dir backends into SQLite.

GRPC API and protobuf resources
-------------------------------

GRPC API has been introduced for
the auth server. The auth server now serves both GRPC
and JSON-HTTP API on the same TLS socket and uses
the same client certificate authentication.

All future API methods should use GRPC and HTTP-JSON
API is considered obsolete.

In addition to that some resources like
Server and CertificateAuthority are now
generated from protobuf service specifications in
a way that is fully backward compatible with
original JSON spec and schema, so the same resource
can be encoded and decoded from JSON, YAML
and protobuf.

All models should be refactored
into new proto specification over time.

Streaming presence service
--------------------------

In order to cut bandwidth, nodes
are sending full updates only when changes
to labels or spec have occured, otherwise
new light-weight GRPC keep alive updates are sent
over to the presence service, reducing
bandwidth usage on multi-node deployments.

In addition to that nodes are no longer polling
auth server for certificate authority rotation
updates, instead they subscribe to event updates
to detect updates as soon as they happen.

This is a new API, so the errors are inevitable,
that's why polling is still done, but
on a way slower rate.
2018-12-10 17:20:24 -08:00
Sasha Klizhentas 410c33b7d9 Add clustered etcd docker-compose example 2018-08-27 13:54:41 -07:00
Ev Kontsevoy ab6857a573 Added 'insecure' flag to etcd config
Fixes #694
2017-01-16 11:15:04 -08:00
Ev Kontsevoy 5e952e2cf2 Merge branch 'master' into ev/688 2017-01-16 00:59:28 -08:00
Ev Kontsevoy ac205ad530 Finished cleaning up storage back-ends
I hope this closes #688
2017-01-15 23:23:37 -08:00