Project

General

Profile

Feature #23073

Allow set CEPH_OSD_REQUEST_TIMEOUT_DEFAULT on rbd map

Added by Timofey Titovets about 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:

Description

Hi, we have CEPH_OSD_REQUEST_TIMEOUT_DEFAULT in kernel to workaroung unmap problems with in-flight requests,
but for now to use it, users must patch kernel module.

https://elixir.bootlin.com/linux/v4.16-rc2/source/include/linux/ceph/libceph.h#L74

As rbd can't force unmap rbd with in-flight requests, that will be useful to allow set that on mount time.

Thansk!

History

#1 Updated by Greg Farnum about 6 years ago

  • Project changed from Ceph to rbd
  • Category deleted (librbd)

#2 Updated by Jason Dillaman about 6 years ago

  • Project changed from rbd to Linux kernel client

#3 Updated by Yang Dongsheng about 6 years ago

Timofey Titovets wrote:

Hi, we have CEPH_OSD_REQUEST_TIMEOUT_DEFAULT in kernel to workaroung unmap problems with in-flight requests,
but for now to use it, users must patch kernel module.

https://elixir.bootlin.com/linux/v4.16-rc2/source/include/linux/ceph/libceph.h#L74

As rbd can't force unmap rbd with in-flight requests, that will be useful to allow set that on mount time.

Thansk!

Hi Timofeu, if you want to set the mount_timeout of your rbd image in mapping, you can try this:

rbd map -o mount_timeout=xxx rbd/test

Yang

#4 Updated by Timofey Titovets about 6 years ago

Yang Dongsheng wrote:

Timofey Titovets wrote:

Hi, we have CEPH_OSD_REQUEST_TIMEOUT_DEFAULT in kernel to workaroung unmap problems with in-flight requests,
but for now to use it, users must patch kernel module.

https://elixir.bootlin.com/linux/v4.16-rc2/source/include/linux/ceph/libceph.h#L74

As rbd can't force unmap rbd with in-flight requests, that will be useful to allow set that on mount time.

Thansk!

Hi Timofeu, if you want to set the mount_timeout of your rbd image in mapping, you can try this:

rbd map -o mount_timeout=xxx rbd/test

Yang

Thanks, but that not what i ask.

CEPH_MOUNT_TIMEOUT_DEFAULT != CEPH_OSD_REQUEST_TIMEOUT_DEFAULT
That a completely different things.

Does mount_timeout allow me umount device, when it lose connection to ceph? I don't think so.
mount_timeout fully useless, when rbd already mapped and mounted.

I has describe very accurately, what i ask and for what.

Thanks.

#5 Updated by Yang Dongsheng about 6 years ago

Timofey Titovets wrote:

Yang Dongsheng wrote:

Timofey Titovets wrote:

Hi, we have CEPH_OSD_REQUEST_TIMEOUT_DEFAULT in kernel to workaroung unmap problems with in-flight requests,
but for now to use it, users must patch kernel module.

https://elixir.bootlin.com/linux/v4.16-rc2/source/include/linux/ceph/libceph.h#L74

As rbd can't force unmap rbd with in-flight requests, that will be useful to allow set that on mount time.

Thansk!

Hi Timofeu, if you want to set the mount_timeout of your rbd image in mapping, you can try this:

rbd map -o mount_timeout=xxx rbd/test

Yang

Thanks, but that not what i ask.

CEPH_MOUNT_TIMEOUT_DEFAULT != CEPH_OSD_REQUEST_TIMEOUT_DEFAULT
That a completely different things.

Does mount_timeout allow me umount device, when it lose connection to ceph? I don't think so.
mount_timeout fully useless, when rbd already mapped and mounted.

I has describe very accurately, what i ask and for what.

Thanks.

Oops, my bad. but, osd_request_timeout is also already supported in kernel.
that means we don't need to patch kernel module at all, what we need is just
making rbd command to pass this option to kernel as that:

[root@atest-guest ceph]# git diff src/tools/rbd/action/Kernel.cc
diff --git a/src/tools/rbd/action/Kernel.cc b/src/tools/rbd/action/Kernel.cc
index 4f58cc2..6bad4fd 100644
--- a/src/tools/rbd/action/Kernel.cc
++ b/src/tools/rbd/action/Kernel.cc
@ -120,6 +120,9 @ static int parse_map_options(char *options)
} else if (!strcmp(this_char, "mount_timeout")) {
if (put_map_option_value("mount_timeout", value_char, map_option_int_cb))
return -EINVAL;
} else if (!strcmp(this_char, "osd_request_timeout")) {
+ if (put_map_option_value("osd_request_timeout", value_char, map_option_int_cb))
+ return -EINVAL;
} else if (!strcmp(this_char, "osdkeepalive")) {
if (put_map_option_value("osdkeepalive", value_char, map_option_int_cb))
return -EINVAL;

I will consider to send a pr for rbd command for this.

Thanx

#6 Updated by Ilya Dryomov about 6 years ago

I've merged Yang's PR, but I want to reiterate that using osd_request_timeout to work around umount/unmap when the OSDs are inaccessible is dangerous.

#7 Updated by Timofey Titovets about 6 years ago

Thank you very much, i think that request can be closed.

#8 Updated by Ilya Dryomov almost 6 years ago

  • Status changed from New to Resolved
  • Assignee set to Ilya Dryomov

Also available in: Atom PDF