Jason Dillaman [Thu, 11 Feb 2021 20:54:01 +0000 (15:54 -0500)]
librbd/mirror: leave non-primary snapshot images in creating state
The creating state is a special case in rbd-mirror where it will
automatically delete the image since it assumes it's malformed.
A non-primary, snapshot-based mirror image needs to have at least
one non-primary snapshot and the first one is not created until
after replay has started. Now rbd-mirror will update the mirror
image state to the enabled state after creating the first
non-primary snapshot but before attempting the sync.
Fixes: https://tracker.ceph.com/issues/49238 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Thu, 11 Feb 2021 20:45:01 +0000 (15:45 -0500)]
rbd-mirror: ensure that the last non-primary snapshot cannot be pruned
Tweak the normal pruning behavior to ensure that an incomplete initial
non-primary snapshot is not included in the prune set since we know
it will be complete since otherwise the image would have been deleted
due to not updating the mirror-image-state to enabled. Also ensure
we cannot prune a non-primary mirror snapshot if we don't have a
predecessor.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman [Thu, 11 Feb 2021 20:23:56 +0000 (15:23 -0500)]
rbd-mirror: update snapshot mirror image state after snapshot creation
The non-primary mirror snapshot is what is used to link the non-primary
to the primary image. If there is an interruption between creating the
non-primary image and the creation of the first non-primary snapshot,
the images will be considerered unlinked.
A future commit will modify librbd to avoid setting the mirror image
state to enabled for non-primary snapshot-based mirroring images.
rbd-mirror will already automatically delete images in the CREATING
state during the bootstrap phase.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
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>
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>