-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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: check obc provisioner for bucket notification #11975
object: check obc provisioner for bucket notification #11975
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pkg/operator/ceph/object/notification/obc_label_controller_test.go
Outdated
Show resolved
Hide resolved
dc3b9e9
to
408feb4
Compare
@thotz maybe a simpler way is to use the error returned from the name parsing function as an indication that the bucket was provisioned by an external provisioner, and let the bucket notification controller ignore it without an error? |
408feb4
to
8765e37
Compare
@thotz The object integration tests are failing with this error:
|
Thanks for the good test updates in the PR. I think it looks good other than the small integration test bug Travis pointed out |
I thought the provisioner's name was the combination of Rook Operator Namespace and "ceph.rook.io/bucket". But the current code uses the ceph cluster namespace. I am confused about how to get that here. In the Bucketprovisioner the are finding the ceph cluster details using the following, cephCluster := &cephv1.CephCluster{}
err := r.client.Get(r.opManagerContext, request.NamespacedName, cephCluster)
if err != nil {
if kerrors.IsNotFound(err) {
logger.Infof("no ceph cluster found in %+v. not deploying the bucket provisioner", request.NamespacedName)
return reconcile.Result{}, nil
}
// Error reading the object - requeue the request.
return opcontroller.ImmediateRetryResult, errors.Wrap(err, "failed to get the ceph cluster")
}
if !cephCluster.DeletionTimestamp.IsZero() {
logger.Debug("ceph cluster is being deleted, no need to reconcile the bucket provisioner")
return reconcile.Result{}, nil
}
if !cephCluster.Spec.External.Enable && cephCluster.Spec.CleanupPolicy.HasDataDirCleanPolicy() {
logger.Debug("ceph cluster has cleanup policy, the cluster will soon go away, no need to reconcile the bucket provisioner")
return reconcile.Result{}, nil
} The |
The namespace of the cephcluster is the same as the namespace of the object store. Would this method help? |
That function was erroring out while handling OBC which were not provisioned by Rook. So I thought handling this check before fetching details about object store in the OBC |
08b9e75
to
76dd62d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just adding a comment that lots of CI are failing.
obc-label-controller needs to check only obc provisioned by Rook operator. Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
76dd62d
to
01a3dd0
Compare
object: check obc provisioner for bucket notification (backport #11975)
Description of your changes:
obc-label-controller needs to check only the obc provisioned by the Rook operator.
Check other OBCs result in errors from the controller and keep on reconcilling
Which issue is resolved by this Pull Request:
Resolves #
Checklist:
skip-ci
on the PR.