-
Notifications
You must be signed in to change notification settings - Fork 547
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
rbd: use ioctx locks for key rotation #4734
Conversation
dc19aae
to
21ccbda
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.
This code looks very much like what is used in CephFS. Can you move it to a shared helper package under internal/util/lock/...
? You can have a
package lock
interface Lock {
LockExclusive(ctx) error
Unlock(ctx) error
}
type lock struct {
lockName, lockCookie, lockDesc string
ioctx *rados.Ioctx
}
func NewLock(ioctx, volumeID, duration) Lock {
return &lock{
ioctx: ioctx,
...
}
}
func (lck *Lock) LockExclusive(ctx context.Context, ioctx *rados.Ioctx, volumeID string) error {
return lck.ioctx.LockExclusive(...)
}
func (lck *Lock) Unlock(ctx) error {
...
}
66120a8
to
1c3de73
Compare
7ca683d
to
f1ea33a
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.
small nit
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.
Looks good! Just a small change needed for a little simpler lock API.
@Mergifyio queue |
🛑 The pull request has been removed from the queue
|
that abstracts rados Ioctx Lock/Unlocks Signed-off-by: Niraj Yadav <niryadav@redhat.com>
Signed-off-by: Niraj Yadav <niryadav@redhat.com>
Signed-off-by: Niraj Yadav <niryadav@redhat.com>
/test ci/centos/k8s-e2e-external-storage/1.29 |
/test ci/centos/k8s-e2e-external-storage/1.27 |
/test ci/centos/mini-e2e-helm/k8s-1.29 |
/test ci/centos/mini-e2e-helm/k8s-1.27 |
/test ci/centos/mini-e2e-helm/k8s-1.28 |
/test ci/centos/mini-e2e/k8s-1.28 |
@Mergifyio queue |
🛑 The pull request has been removed from the queue
|
@nixpanic CI is failing with above error, any idea about it? |
I think there was some certificate rotation on the OpenShift service that provides the routing. This gives a similar error for the Jenkins Pod:
The TLS certificate was updated today:
|
@Mergifyio requeue |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
@Mergifyio queue |
🛑 The pull request has been removed from the queue
|
/test ci/centos/upgrade-tests-cephfs |
/test ci/centos/upgrade-tests-rbd |
/test ci/centos/k8s-e2e-external-storage/1.27 |
/test ci/centos/mini-e2e-helm/k8s-1.27 |
/test ci/centos/k8s-e2e-external-storage/1.28 |
/test ci/centos/mini-e2e/k8s-1.27 |
/test ci/centos/mini-e2e-helm/k8s-1.28 |
/test ci/centos/k8s-e2e-external-storage/1.29 |
/test ci/centos/k8s-e2e-external-storage/1.30 |
/test ci/centos/mini-e2e/k8s-1.28 |
/test ci/centos/mini-e2e-helm/k8s-1.29 |
/test ci/centos/mini-e2e-helm/k8s-1.30 |
/test ci/centos/mini-e2e/k8s-1.29 |
/test ci/centos/mini-e2e/k8s-1.30 |
@Mergifyio requeue |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
Describe what this PR does
This PR introduces rados ioctx locks for key rotation operations which will help with synchronizing
operations when dealing with ROX/RWX volumes.