Skip to content

[Follow-up] TakeSnapshot: EnsureBucket + Core client wiring for snapshot upload #66

Description

@coderabbitai

Background

This issue tracks the follow-up implementation deferred from PR #65 (discussion: #65 (comment)).

service/external_snap.goTakeSnapshot 함수는 현재 Core 하위호환성 문제로 의도적으로 미완성 상태입니다.

Tasks

1. Idempotent EnsureBucket helper (in client/rustfs.go)

  • Add an EnsureBucket(ctx, bucket) method on RustFSClient that calls CreateBucket and silently swallows BucketAlreadyOwnedByYou / BucketAlreadyExists errors.
  • This prevents NoSuchBucket errors when Core later PUTs to the presigned URL.

2. Call EnsureBucket in TakeSnapshot (in service/external_snap.go)

  • Before calling PresignPutObject, call rustfs.EnsureBucket(ctx, string(uuid)).

3. Wire up Core client call

  • Pass the generated presignedURL to the Core API when CreateVM is updated to include presigned URL support (Story 2+).
  • Replace the current // TODO comment with the actual Core client call.

When to implement

이 작업은 CreateVM에 presigned URL 지원이 추가되는 시점에 함께 개발되어야 합니다.

References

/cc @kwonkwonn

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions