Ken Dreyer [Wed, 10 Feb 2021 15:08:51 +0000 (08:08 -0700)]
cephadm: make /sys/fs/selinux empty
When the following conditions are true:
1) A host has selinux-policy-targeted,
2) We mount the host's /sys into a privileged container,
3) The container has SELINUXTYPE=targeted in /etc/selinux/config,
4) The container does not have an selinux-policy-targeted package,
then SELinux-enabled applications like restorecon or DNF do not work inside
the container.
Resolve this by making /sys/fs/selinux an empty directory.
Fixes: https://tracker.ceph.com/issues/49239 Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Sheng Mao [Wed, 10 Feb 2021 03:14:58 +0000 (20:14 -0700)]
cmake: don't pass ccache argument to RocksDB build
RocksDB's cmake has a similar logic to turn on ccache as the main cmake.
Currently BuildRocksDB.cmake explicitly passes ccache to RocksDB cmake
arguments as CMAKE_CXX_COMPILER_LAUNCHER. This causes a compilation error
on ccache 4.0, especially in make -j mode.
ccache: error: Recursive invocation (the name of the ccache binary must
be "ccache")
This commit lets cmake from RocksDB decide RULE_LAUNCH_COMPILE by itself.
Casey Bodley [Mon, 18 Jan 2021 21:59:05 +0000 (16:59 -0500)]
qa/rgw: test_rgw_reshard.py just tries common ports
the 'sudo netstat | grep radosgw' command is causing failures:
File "qa/workunits/rgw/test_rgw_reshard.py", line 53, in get_radosgw_port
x = out.decode('utf8').split(" ")
AttributeError: 'bool' object has no attribute 'decode'
because when valgrind is enabled, the process name is 'valgrind' instead
of 'radosgw'
Nizamudeen A [Tue, 19 Jan 2021 12:35:43 +0000 (18:05 +0530)]
mgr/dashboard: Automatically refresh the crush map metadata table
If we make any change to the osd crush map like do an osd crush reweight from cli, for that change to be reflected on metadata table we need to reload the entire page. Instead this PR takes care of auto refreshing the tree view.
Fixes: https://tracker.ceph.com/issues/48922 Signed-off-by: Nizamudeen A <nia@redhat.com> Signed-off-by: Avan Thakkar <athakkar@redhat.com>
Ilya Dryomov [Mon, 8 Feb 2021 16:01:47 +0000 (17:01 +0100)]
librbd: don't hold owner_lock for validate_image_removal()
handle_exclusive_lock() and handle_shut_down_exclusive_lock() call
validate_image_removal() without owner_lock held, so holding it in
shut_down_exclusive_lock() appears to be redundant.
Ilya Dryomov [Sun, 7 Feb 2021 14:09:24 +0000 (15:09 +0100)]
librbd: treat EROFS as expected in handle_acquire_lock()
If the peer refuses to release exclusive lock (e.g. in case automatic
exclusive lock transitions are disabled), EROFS is retured. Suppress
a rather confusing "Read-only file system" error message -- this case
is no different from EBUSY or EAGAIN.
Ilya Dryomov [Sun, 7 Feb 2021 12:46:15 +0000 (13:46 +0100)]
librbd: refuse to release exclusive lock when removing
Commit 25c2ffe145be ("librbd: acquire exclusive lock from peer when
removing") changed PreRemoveRequest to request exclusive lock from the
peer instead of giving up and proceeding without exclusive lock. This
caused one of the test cases that sometimes runs concurrent "rbd rm"
against the same image to fail intermittently, most often on assert
because exclusive lock is now automatically transitioned to another
"rbd rm" on its request.
The root cause is older and probably goes back to when synchronous
librbd::remove() which held owner_lock across all operations including
trim_image() was converted to a set of state machines. Since then, any
peer that requests exclusive lock (instead of trying once and backing
off) is able to mess with image removal.
Install StandardPolicy to disable automatic exclusive lock transitions
during image removal.
This patch adds generic ETW logging on top of syslog calls.
The events are described in the message compiler file `event_logging.mc`.
Using the cross platform utility `windmc`, we will generate the header file,
`event_logging.h`, needed by the ETW implementation, and the resource file
`event_logging.rc`.
Over the generated resource file we will run another utility called `windres`.
this tool is used to compile the binary objects needed by the OS utilities
(i.e. `Event Viewer`) to view the logged events.
On usage, a registry key needs to be added/removed on the target computer.
The registry looks like the following:
[HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\<get_process_name>]
"EventMessageFile"="<Folder_location_to>\\event_logging.dll"
Kefu Chai [Mon, 8 Feb 2021 05:11:37 +0000 (13:11 +0800)]
crimson/osd: refactor ClientRequest::do_process()
instead of using a local lambda which tries to have a single point
for handling both the happy path and failure path, it'd be simpler
to just early return if we fail to handle a request,
Kefu Chai [Sun, 7 Feb 2021 15:12:14 +0000 (23:12 +0800)]
crimson/osd: do not pass ops to submit_transaction() separately
the order of evaluation of function arguments is unspecified with some
exceptions. but in this case, the reason why ops is still valid is that
the parameter type of `osd_op_p` is `const osd_op_params_t&`. so a copy
is passed to it.
to enable us to actually move `osd_op_p`, in this change, the
osd_op_p.req->ops is used instead.
Kefu Chai [Sun, 7 Feb 2021 04:24:21 +0000 (12:24 +0800)]
crimson/osd: rename PG::rep_repair_primary_object() to repair_object()
as we should expose the internals using the name of interface, and there
is no need to differentiate rep_repair_primary_object() from another
repair method.
Jason Dillaman [Mon, 8 Feb 2021 16:53:28 +0000 (11:53 -0500)]
rbd-mirror: don't prune older mirror snapshots when pruning incomplete snapshot
Since we normally prune in order, we need to ensure that we don't prune older
snapshots when we need to delete an incomplete mirror snapshot since the
older snapshot might be the only remaining mirror snapshot.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Fri, 29 Jan 2021 15:44:38 +0000 (10:44 -0500)]
librbd/deep_copy: skip snap list if object is known to be clean
If the fast-diff indicates that the destination object should exist
and that it hasn't changed, there shouldn't be a need to issue the
snap list operation. Instead, just update the destination object map
to indicate the existence of the object.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Kefu Chai [Mon, 8 Feb 2021 13:43:09 +0000 (21:43 +0800)]
crimson/common: mark ExitBarrier final
to silence warnings like:
crimson/common/operation.h:394:20: warning: class with destructor marked
'final' cannot be inherited from [-Wfinal-dtor-non-final-class]
~ExitBarrier() final {
^
Merge pull request #38695 from pcuzner/orch-status-changes
mgr/orchestrator: minor improvements to orch status
Reviewed-by: Alfonso Martínez <almartin@redhat.com> Reviewed-by: Ernesto Puerta <epuertat@redhat.com> Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com> Reviewed-by: Michael Fritch <mfritch@suse.com> Reviewed-by: Nizamudeen A <nia@redhat.com> Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>