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

Merged
merged 1 commit into from Mar 3, 2017

Conversation

Projects
None yet
4 participants
@songbaisen

songbaisen commented Feb 7, 2017

rados: we need to get the latest osdmap when pool does not exists

 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

@songbaisen songbaisen changed the title from rbd: we need to get the latest osdmap when pool does not exists to rados: we need to get the latest osdmap when pool does not exists Feb 7, 2017

@liewegas

This comment has been minimized.

Member

liewegas commented Feb 10, 2017

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 liewegas added the common label Feb 10, 2017

@songbaisen

This comment has been minimized.

songbaisen commented Feb 13, 2017

@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.

@liewegas

This comment has been minimized.

Member

liewegas commented Feb 13, 2017

@@ -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()

This comment has been minimized.

@jdurgin

jdurgin Feb 13, 2017

Member

seems like we should handle this within librados itself, rather than the python bindings - in RadosClient::lookup_pool()

This comment has been minimized.

@songbaisen

songbaisen Feb 14, 2017

@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?

This comment has been minimized.

@jdurgin

jdurgin Feb 14, 2017

Member

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.

This comment has been minimized.

@songbaisen

songbaisen Feb 14, 2017

@jdurgin Oh,thank you.Got it.

@songbaisen

This comment has been minimized.

songbaisen commented Feb 14, 2017

jenkins test this please

@songbaisen

This comment has been minimized.

songbaisen commented Feb 14, 2017

@jdurgin Done.Have a look?

songbaisen
rados: we need to get the latest osdmap when pool does not exists
     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>
@songbaisen

This comment has been minimized.

songbaisen commented Feb 15, 2017

jenkins test this please

@yuriw yuriw merged commit 4657560 into ceph:master Mar 3, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment