Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etcd: add more info in migration error message #4345

Merged
merged 1 commit into from
Sep 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/backend/etcdbk/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ func (b *EtcdBackend) syncLegacyPrefix(ctx context.Context) error {
return nil
}

b.Infof("Migrating Teleport etcd data from legacy prefix %q to configured prefix %q", legacyDefaultPrefix, b.cfg.Key)
b.Infof("Migrating Teleport etcd data from legacy prefix %q to configured prefix %q, see https://github.com/gravitational/teleport/issues/2883 for context", legacyDefaultPrefix, b.cfg.Key)
defer b.Infof("Teleport etcd data migration complete")

// Now we know that legacy prefix has some data newer than the configured
Expand All @@ -704,7 +704,7 @@ func (b *EtcdBackend) syncLegacyPrefix(ctx context.Context) error {
key := backupPrefix + strings.TrimPrefix(string(kv.Key), b.cfg.Key)
b.Debugf("Copying %q -> %q", kv.Key, key)
if _, err := b.client.Put(ctx, key, string(kv.Value)); err != nil {
return trace.WrapWithMessage(err, "failed backing up %q to %q: %v", kv.Key, key, err)
return trace.WrapWithMessage(err, "failed backing up %q to %q: %v; the problem could be with your etcd credentials or etcd cluster itself (e.g. running out of disk space); this backup is a safety precaution for migrating the data from etcd prefix %q (old default) to %q (from your teleport.yaml config), see https://github.com/gravitational/teleport/issues/2883 for context", kv.Key, key, err, legacyDefaultPrefix, b.cfg.Key)
}
}

Expand Down