Ilya Dryomov [Wed, 20 Jan 2021 15:00:18 +0000 (16:00 +0100)]
qa/suites/krbd: add msgr2 modes to most subsuites
basic, rbd and rbd-nomount subsuites are expanded to run with each
of ms_mode=legacy, ms_mode=crc and ms_mode=secure. This increases
the total number of jobs in the suite from 100 to 220.
fsx, singleton and thrash subsuites choose ms_mode at random (from
the above plus ms_mode=prefer-crc).
Conflicts:
qa/suites/krbd/fsx/conf.yaml [ commit cff2e49ff09e
("qa/suites/krbd: fsx with object-map and fast-diff") and
read_from_replica map option not in nautilus ]
qa/suites/krbd/fsx/ms_mode$/*.yaml [ read_from_replica map option
not in nautilus ]
Ilya Dryomov [Mon, 18 Jan 2021 12:49:49 +0000 (13:49 +0100)]
krbd: add support for msgr2
Recognize ms_mode map option and filter initial monitor addresses
accordingly: if ms_mode is not given or ms_mode=legacy, discard v2
addresses, otherwise discard v1 addresses.
Note that nothing was discarded (i.e. v2 addresses were passed to
the kernel) previously. The intent was to preserve that behaviour
in case ms_mode is not given, allowing to change the kernel default
in the future. However, it turns out that mount.ceph helper has
been misguidedly discarding v2 addresses since commit eae01275134e
("mount.ceph: fork a child to get info from local configuration"),
so that ship has sailed.
Conflicts:
doc/man/8/rbd.rst [ crush_location, read_from_replica and
compression_hint map options not in nautilus ]
src/krbd.cc [ commit a1aecba6f44d ("krbd: make wait_for_udev_add()
clearer and a bit more efficient") not in nautilus ]
src/tools/rbd/action/Kernel.cc [ commit 34f539d8af33 ("rbd:
delay parsing of default kernel map options") not in nautilus ]
Jason Dillaman [Fri, 18 Dec 2020 15:14:13 +0000 (10:14 -0500)]
librbd: drop explicit masking of implicit feature bits
Now that the create image state machine is handling the masking
of implicit features, all callers to the state machine can skip
the need to perform the masking themselves.
Jason Dillaman [Fri, 18 Dec 2020 14:55:30 +0000 (09:55 -0500)]
librbd/image: mask out all implicit features when creating an image
This will ensure that all paths to the create image state machine
properly handle this condition. Previously, it was up to the callers
of the state machine to clear the implicit feature bits.
Fixes: https://tracker.ceph.com/issues/48647 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit f52f78caca6f9743e75c8289771375f5f582300a)
Xiubo Li [Mon, 23 Nov 2020 12:55:01 +0000 (20:55 +0800)]
common: do not dup the options when reexpanding
The old code will store all the options, which has `$pid` in them,
in may_reexpand_meta map. And when reexpanding later, the reexpand
code will dup them with a higher priority(CONF_OVERRIDE).
This will be a problem, if the default value has `$pid` and be
stored in the may_reexpand_meta map, and then the code set a new
different value, which may have no `$pid`, from CLI or config file.
The reexpand will override it with the default value always.
This will do not duplicate the options with CONF_OVERRIDE priority
when reexpanding, just refresh them and call the observers. And the
finalize_reexpand_meta() will always be called after the fork() is
done in child processes.
Xiubo Li [Fri, 13 Nov 2020 08:08:31 +0000 (16:08 +0800)]
global: reexpand the conf meta in all the child processes
Especially for the tools or the daemons whose config options need
to expand the '$pid', they will be always expanded with the parent
processes. We need to reexpand them in child processes just after
the fork is done.
David Turner [Tue, 10 Nov 2020 19:31:35 +0000 (14:31 -0500)]
rpm,deb: change sudoers file mode to 440
change sudoers file mode to 440 to match recommended defaults.
From the sudoers man page.
> the default file mode is 0440 (read‐able by owner and group, writable
by none).
> The default mode may be changed via the “sudoers_mode” option to the
sudoers
> Plugin line in the sudo.conf(5) file.
Fixes: https://tracker.ceph.com/issues/48169 Signed-off-by: David Turner <drakonstein@gmail.com>
(cherry picked from commit 1de14c7f9bcaf94152c62b50c37f4a44b6445f58)
Conflicts:
debian/rules
- ignored extra lines introduced post-nautilus
Kefu Chai [Sat, 16 Jan 2021 06:33:17 +0000 (14:33 +0800)]
mgr: update mon metadata when monmap is updated
there is chance that some monitor(s) is updated / upgraded in a single
monmap update without being removed from cluster state's metata first,
so, without this change, we will not update the metadata associated with
that monitor, hence the mgr modules which consumes the metadata is not
updated accordingly and keep reporting the stale information.
in this change, we always update the metadata associated with all monitor
included by the latest monmap. multiple "mon metadata" commands are sent
to monitor for retrieving their updated metadata, instead of sending a
single one, so that we can reuse "MetadataUpdate" to update the metadata
of a given daemon. as the number of monitors in a typical cluster is
relatively small, and the frequency of monmap update is low, so this
overhead should be fine.
unlike other places where we ask mon for metadata in Mgr class, the code
sending the mon command for updated monitor metata is located outside of
`cluster_state.with_monmap()` block, the reason is that `with_monmap()`
is guraded by the monc_lock under the hood, while `start_mon_command()`
also need to acquire the monc_lock, which is not a recursive lock. so we
have to do this out of the `with_monmap()` block.
Jason Dillaman [Fri, 22 Jan 2021 15:29:29 +0000 (10:29 -0500)]
ocf: add support for mapping images within an RBD namespace
Support for RBD namespaces was not added to the OCF resource agent.
This commit fixes this oversight and also fixes a bug in handling
of the "rbd device list" output.
Fixes: https://tracker.ceph.com/issues/48964 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 2a23a92aaf122627151874c56848667169fac064)
Tatjana Dehler [Tue, 12 Jan 2021 09:28:35 +0000 (10:28 +0100)]
mgr/dashboard: add `--ssl` to `ng serve`
Add the `--ssl` option to the `ng serve` command in order to
reflect the changes to the cookies (https://tracker.ceph.com/issues/44591)
and be able to log into the dashboard by using the development server.
Fixes: https://tracker.ceph.com/issues/48847 Signed-off-by: Tatjana Dehler <tdehler@suse.com>
(cherry picked from commit 3971cdb0a64c077c9d136135b745778d875e0dae)
Conflicts:
src/pybind/mgr/dashboard/frontend/package.json
- Adopted the master branch changes.
sys_siglist is deprecated with glibc 2.32. A new thread-safe and
async-signal safe sigdescr_np() function is provided, so use it if
available.
Fixes: https://tracker.ceph.com/issues/47187 Signed-off-by: David Disseldorp <ddiss@suse.de>
(cherry picked from commit b9b6faf66ae67648626470cb4fc3f0850ac4d842)
Conflicts:
CMakeLists.txt
cmake/modules/CephChecks.cmake
- CephChecks.cmake file does not exist in nautilus; manually cherry-picked the
change in that file to top-level CMakeLists.txt
Jeff Layton [Fri, 20 Nov 2020 23:43:31 +0000 (18:43 -0500)]
client: when STATX_NLINK is requested request FsLs caps
We currently determine the getattr request mask prior to doing the
lookup, so we don't necessarily know whether the terminal entry is
a directory or something else.
Directory nlink count is governed by the dirstats, and those are
under Fs caps. Request both Fs and Ls if the request mask includes
STATX_NLINK.
Fixes: https://tracker.ceph.com/issues/48313 Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit e2ea2214cbb1ff4bd7332bb28db4f3477efb37df)
Jeff Layton [Fri, 20 Nov 2020 15:39:58 +0000 (10:39 -0500)]
client: ensure we take Fs caps when querying dirstat vxattrs
Dirstats values are only updated when Fs caps are held, so ensure that
we request those caps in the _getattr call when querying for them.
Drop the old XATTR_NAME_CEPH helper and rename XATTR_NAME_CEPH2 to
XATTR_NAME_CEPH. Add a new VXATTR_DIRSTAT field and add that to all of
the dirstats vxattrs.
Fixes: https://tracker.ceph.com/issues/48313 Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 3db582b1416dc170a0e25c957166d7bdc58e4c67)
Conflicts:
src/client/Client.cc
- keep hidden because we still need it in nautilus
- drop some code because we did not introduce the
following features: ceph.mirror.info and rsnaps
Nizamudeen A [Fri, 8 Jan 2021 07:37:27 +0000 (13:07 +0530)]
mgr/dashboard: Fix for datatable item not showing details after getting selected
**Regression in nautilus**
Datatable items are not showing the details even if an item in the list is selected. This is happening because of this backport (https://github.com/ceph/ceph/pull/37756/files) which backports the line this.selection.selected = $event['selected']; but this feature was not implemented in the nautilus branch originally.
Fixes: https://tracker.ceph.com/issues/48796 Signed-off-by: Nizamudeen A <nia@redhat.com>
Jason Dillaman [Thu, 19 Nov 2020 20:59:34 +0000 (15:59 -0500)]
pybind/mgr/rbd_support: delay creation of progress event
Create the progress module event upon receipt of the first
progress callback from the librbd API. This will help to ensure
that all prereqs have been validated for retryable errors like
scheduling an image to be removed while it still has attached
cloned children.
Fixes: https://tracker.ceph.com/issues/48296 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit c0069b00e4748974d4bf5cfa1bdab68d6f043abb)
Conflicts:
src/pybind/mgr/rbd_support/task.py
- file does not exist in nautilus: applied the changes manually
Ilya Dryomov [Thu, 3 Dec 2020 10:24:32 +0000 (11:24 +0100)]
qa: krbd_stable_pages_required.sh: move to stable_writes attribute
bdi/stable_pages_required attribute was deprecated in 5.10 and now
always returns 0. The replacement is queue/stable_writes. (It is
also writeable, so we can simplify these test cases somewhat in the
future.)
Alfonso Martínez [Tue, 15 Dec 2020 08:28:46 +0000 (09:28 +0100)]
mgr/dashboard: CLI commands: read passwords from file
Fixes: https://tracker.ceph.com/issues/48355 Signed-off-by: Alfonso Martínez <almartin@redhat.com> Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
(cherry picked from commit 5d7ee7c1f0ad971fd0079f917e2b44cdef1d6f9f)
- Remove cephadm files and related code (does not apply to nautilus).
- Remove code related to non-existing functionality in nautilus.
- Adapt code to be py2 compatible.
- Resolve conflicts related to code divergence.
Matt Benjamin [Fri, 8 Jan 2021 18:23:56 +0000 (13:23 -0500)]
rgw_file: return common_prefixes in lexical order
Since inception RGWReaddirRequest has sent all leaf objects first
(in lexical order), then common_prefixes (in lexical order). In
hindsight, an overall listing could trivially be returned out of
lexical order, which can cause continued listing of large, mixed
directories to fail.
RCA by Dan Gryniewicz.
Fixes: https://tracker.ceph.com/issues/48410 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit e561e98e5cca2678854e01c990f95e474022b7ed)
Conflicts:
src/rgw/services/svc_notify.cc
- robust_notify() call has different argument list in nautilus
src/rgw/services/svc_sys_obj_cache.cc
- distribute_cache() call has different argument list in nautilus
Paul Emmerich [Tue, 11 Jun 2019 12:10:55 +0000 (14:10 +0200)]
rgw: fix bucket limit check fill_status warnings
all variables in the calculation where ints, so the warning would
only ever trigger if objects_per_shard == limit_objects and the
percentage for > 100% used a granularity of 100%
Fixes: http://tracker.ceph.com/issues/40255 Signed-off-by: Paul Emmerich <paul.emmerich@croit.io>
(cherry picked from commit 694076419e6f20d1ed6c95b4b1ff94f134a10d4d)