This change will allow mapping rbd images on Windows, leveraging the
WNBD[1] Virtual Storport Miniport driver [2].
The behavior and CLI is similar to the Linux rbd-nbd, with a few
notable differences:
* device paths cannot be requested. The disk number and path will
be picked by Windows. If a device path is provided by the user
when mapping an image, it will be used as an identifier, which
can also be used when unmapping the image.
* the "show" command was added, which describes a specific mapping.
This can be used for retrieving the disk path.
* the "service" command was added, allowing rbd-wnbd to run as a
Windows service. All mappings are currently perisistent, being
recreated when the service stops, unless explicitly unmapped.
The service disconnects the mappings when being stopped.
* the "list" command also includes a "status" column.
The purpose of the "service" mode is to ensure that mappings survive
reboots and that the Windows service start order can be adjusted so
that rbd images can be mapped before starting services that may depend
on it, such as VMMS.
The mapped images can either be consumed by the host directly or exposed
to Hyper-V VMs.
While at it, we'll skip building rbd-mirror as it's quite unlikely that
this daemon is going to be used on Windows for now.
[1] https://github.com/cloudbase/wnbd
[2] https://docs.microsoft.com/en-us/windows-hardware/drivers/storage/overview-of-storage-virtual-miniport-drivers
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
At the moment, a few methods will be stubbed if
BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR is undefined.
The issue is that FileStream::get_size is undefined, so we're
getting link issues on Windows.
In the future, we might consider using asio::windows::stream_handle
on Windows.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Passing "-fstack-protector-strong" doesn't seem to work with Mingw,
complaining about undefied "__stack_chk_fail". For this reason,
we'll disable it for now.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
When importing an image, the rbd command uses only the file name
and expects "/" to be used as a separator. On Windows, it will
use the entire path as image name since the path separator is not
the same.
This change updates it so that the "\\" path separator can be
properly handled as well.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
We ended up with quite a few files having the "_win32" suffix.
It's probably better if we move them to a separate folder and drop
the suffix.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
We'll add a class that implements Windows service hooks. Subclasses
must overide the start, stop and shutdown hooks.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
dlfcn_win32.cc provides a function converting Windows error codes
to string error messages. We'll move it to the common errno modules
so that it can easily be reused.
Add the same time, we're adding a function that's converting
errno values to NTSTATUS codes.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
* refs/pull/37942/head:
ceph-volume: fix lvm help test
ceph-volume: add a unit tests to lvm batch
ceph-volume: fix lvm batch auto with full SSDs
Reviewed-by: Guillaume Abrioux <gabrioux@redhat.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
An object may take more than one push op to recover, those later push ops also need to
set their version accordingly
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
PGRecovery::start_recovery_ops() should wait for all inflight recovery ops, whether they are
started by BackgroundRecovery or not, otherwise there may be circumstances in which BackgroundRecovery
keep recursively invoking its do_recovery when start_recovery_ops returns recovery done while there are
still missing objects.
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
Add test case for permitted hours to make sure scrub doesn't start
Remove permitted hours in extended sleep test
Fixes: https://tracker.ceph.com/issues/48077
Signed-off-by: David Zafman <dzafman@redhat.com>
This commit updates the "ceph df" output
so that it is current as of October 2020.
-Add correctly formatted `ceph df` output.
-Add explanation of "DIRTY" column.
-(DATA) remains to be defined (1 instance)
-(OMAP) remains to be defined (1 instance)
-USED remains to be defined (1 instance)
-Update prompts in "Checking OSD Status"
Fixes: https://tracker.ceph.com/issues/47523
Signed-off-by: Zac Dover <zac.dover@gmail.com>
This commit adds unit tests in order to cover `_sort_rotational_disks()`
call when deploying with full hdd/ssd or mixed hdd/sdd scenarios.
Fixes: https://tracker.ceph.com/issues/48150
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Co-authored-by: Dimitri Savineau <dsavinea@redhat.com>
The ceph-volume lvm batch --auto introduced by [1] breaks the backward
compatibility when using non rotational devices only (SSD and/or NVMe).
Those devices are reaffected as bluestore db or filestore journal
devices while we want them as data devices.
Fixes: https://tracker.ceph.com/issues/48106
[1] https://github.com/ceph/ceph/pull/34740
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
* refs/pull/37741/head:
ceph-volume: remove mention of dmcache from docs and help text
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
* refs/pull/37896/head:
ceph-volume: implement the --log-level flag
Reviewed-by: Rishabh Dave <ridave@redhat.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
in liburing,
75cad68b95
partially reverts
4e360f7113,
which builds liburing.a with -fPIC.
so we need to pass -fPIC by ourselves. otherwise we'd have
/usr/bin/ld: ../../liburing/src/liburing.a(setup.ol): relocation R_X86_64_PC32 against symbol `io_uring_queue_mmap' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
src/test/fio/CMakeFiles/fio_ceph_objectstore.dir/build.make:154: recipe for target 'lib/libfio_ceph_objectstore.so' failed
Signed-off-by: Kefu Chai <kchai@redhat.com>
we cannot assume that user uses "make" as the generator of cmake, if,
for instance, ninja is used, `$(MAKE)` is not a valid variable in the
generated `build.ninja`. so we should use "make" explicitly.
Signed-off-by: Kefu Chai <kchai@redhat.com>
4cd2b00d2a allows us to colocate seastar
allocator used by seastar reactors and libc allocator used by alien threads,
there is no need to configure seastar allocator for alien thread
anymore.
this change partially reverts
- f7715b86ef
- b55919071f
Signed-off-by: Kefu Chai <kchai@redhat.com>