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
ceph: initialize rbd block pool after creation #8923
Conversation
pkg/daemon/ceph/client/pool.go
Outdated
@@ -357,6 +357,12 @@ func CreateECPoolForApp(context *clusterd.Context, clusterInfo *ClusterInfo, poo | |||
return errors.Wrapf(err, "failed to create EC pool %s. %s", poolName, string(output)) | |||
} | |||
|
|||
args = []string{"pool", "init", poolName} |
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.
Is pool init
idempotent?
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.
AFAIK and according to my tests, pool init
is idempotent.
I'll let @idryomov confirm this (and please review the pr too thanks).
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.
Yes, it is idempotent.
668d6b4
to
1724211
Compare
1724211
to
fca8365
Compare
Moved it to higher layer, Since adding check for @idryomov Shall i add a TODO to remove the cmd once we get the fix in cephcsi build or can it be considered a good practise to initialize the rbd blockpool after creation in rook? |
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.
It would be nice to add unit tests just like you did before.
It is good to have this. This initialization can't be skipped -- it happens one way or the other anyway. With an explicit |
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 from rbd perspective
fca8365
to
2090d91
Compare
Added them, PTAL. |
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.
One more thing, logging is important so let's go before and after the command has run, like initializing rbd pool %q
and successfully initialized rbd pool %q
. Thanks!
2090d91
to
f9a479b
Compare
f9a479b
to
4a183d0
Compare
This is done in order to prevent deadlock when parallel PVC create requests are issued on a new uninitialized rbd block pool due to https://tracker.ceph.com/issues/52537. Fixes: rook#8696 Signed-off-by: Rakshith R <rar@redhat.com>
4a183d0
to
ab87e1d
Compare
ceph: initialize rbd block pool after creation (backport #8923)
This is done in order to prevent deadlock when parallel
PVC create requests are issued on a new uninitialized
rbd block pool due to https://tracker.ceph.com/issues/52537.
Fixes: #8696
Signed-off-by: Rakshith R rar@redhat.com
verified by testing it locally
Checklist:
make codegen
) has been run to update object specifications, if necessary.