From 04a6de1dce657d65724cc1dd0f288b6388ba0085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Carr=C3=A8re?= Date: Wed, 3 Apr 2019 15:08:06 +0100 Subject: [PATCH] Azure blob storage: use correct list prefix --- CHANGELOG.md | 1 + pkg/backup/writer/abs_writer.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b370d044..948409c37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Fixed - Don't expose unready nodes via client service. [#2063](https://github.com/coreos/etcd-operator/pull/2063) +- Azure blob storage: use correct list prefix [#2071](https://github.com/coreos/etcd-operator/pull/2071) ### Deprecated diff --git a/pkg/backup/writer/abs_writer.go b/pkg/backup/writer/abs_writer.go index 743e5b758..eac27e7ed 100644 --- a/pkg/backup/writer/abs_writer.go +++ b/pkg/backup/writer/abs_writer.go @@ -103,7 +103,7 @@ func (absw *absWriter) Write(ctx context.Context, path string, r io.Reader) (int func (absw *absWriter) List(ctx context.Context, basePath string) ([]string, error) { // TODO: support context. - container, _, err := util.ParseBucketAndKey(basePath) + container, key, err := util.ParseBucketAndKey(basePath) if err != nil { return nil, err } @@ -118,7 +118,7 @@ func (absw *absWriter) List(ctx context.Context, basePath string) ([]string, err } blobs, err := containerRef.ListBlobs( - storage.ListBlobsParameters{Prefix: basePath}) + storage.ListBlobsParameters{Prefix: key}) if err != nil { return nil, err }