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
rados: we need to get the latest osdmap when pool does not exists #13289
Conversation
We have similar logic in librados itself, but I'm a bit worried about having the inherent delay of an osdmap check on every pool lookup. I wonder if it's better to have a different function that does a blocking lookup, or simply having the caller do the wait + recheck. |
@liewegas Yes , it may be waste time for some scenes. How about add a para for this function that default it false , if the para set true then if the pool is not exists in current osdmap, we will try get the latest osdmap to check if the pool is in. |
that seems reasonable to me.. @jdurgin?
|
src/pybind/rados/rados.pyx
Outdated
@@ -889,6 +889,13 @@ Rados object in state %s." % self.state) | |||
if ret >= 0: | |||
return int(ret) | |||
elif ret == -errno.ENOENT: | |||
rev = self.wait_for_latest_osdmap() |
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.
seems like we should handle this within librados itself, rather than the python bindings - in RadosClient::lookup_pool()
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.
@jdurgin Oh,thank you I understand it, also does it need a para when we do not find the pool.Then we get the latest osdmap to check. The para default is false. when user set it to true then we check the pool in the latest osdmap. how about it?
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.
no need for a parameter imo - we can always check for the latest map if we get ENOENT. The internal user RadosClient::create_ioctx() already does this manually, so the retry can be removed from that function at the same time.
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.
@jdurgin Oh,thank you.Got it.
jenkins test this please |
8aa4ea3
to
7e5669b
Compare
@jdurgin Done.Have a look? |
sometimes when we rename a pool use the rados api,but the osdmap does not update when we use pool_exists api.so we need to get the latest osdmap when the pool does not exists, it may exists in the newer osdmap. Signed-off-by:song baisen <song.baisen@zte.com.cn>
jenkins test this please |
RADOS http://pulpito.ceph.com/yuriw-2017-03-02_01:20:35-rados-wip-yuri-testing_2017_3_2---basic-smithi/ and reproduce http://pulpito.ceph.com/yuriw-2017-03-02_01:56:48-rados-wip-yuri-testing_2017_3_2---basic-ovh/ same job passed on manual rerun ! and confirmed pass TestLibRBD.FlattenNoEmptyObjects failures unrelated, also on master per @jasondillaman |
rados: we need to get the latest osdmap when pool does not exists
Signed-off-by: song baisen song.baisen@zte.com.cn