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

object: set default zone/zonegroup/realm values for external rgw #9751

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions pkg/operator/ceph/object/objectstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,15 @@ func deleteSingleSiteRealmAndPools(objContext *Context, spec cephv1.ObjectStoreS
// This is used for quickly getting the name of the realm, zone group, and zone for an object-store to pass into a Context
func getMultisiteForObjectStore(clusterdContext *clusterd.Context, spec *cephv1.ObjectStoreSpec, namespace, name string) (string, string, string, error) {
ctx := context.TODO()

if spec.IsExternal() {
// Currently external cluster with zones/zonegroup/realm are not supported, will be
// fixed by https://github.com/rook/rook/issues/6342. So if user does not create
// zone/zonegroup, RGW internally creates zone/zonegroup named as `default`, hence
// Rook can set this value in the object context fields.
return "", "default", "default", nil
thotz marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this affect pre-existing CephObjectStores that were created with zone/zonegroup having the name of the store?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BlaineEXE : The change is applicable only for external ceph clusters with rgw servers running on them, not with the internal cluster in which zone/zonegroup/realm created with name of cephobjectstore. IMO most of the users either create zone/zonegroup/realm with a different name than the name of the ceph object store(since the zone is a kinda collection of cephobject stores make sense to use a different name) or go with none. It is very rare to have users have the same name as cephobjectstore. If the are multiple zone/zonegroup/realm exists the plan is to fix them cleanly by supporting #6342.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you say the breaking case is rare, it seems unlikely that we will have any users experience breakage on upgrade to v1.9. In the case of any breakages, we will rely on you to debug those issues at such time.

}

if spec.IsMultisite() {
zone, err := clusterdContext.RookClientset.CephV1().CephObjectZones(namespace).Get(ctx, spec.Zone.Name, metav1.GetOptions{})
if err != nil {
Expand Down