Sage Weil [Wed, 24 Feb 2021 21:20:18 +0000 (16:20 -0500)]
mon/KVMonitor: fix 'osd new' cross-service commit
When we converted ConfigKeyService to KVMonitor, we didn't correctly
change this to propose_pending(), which mean that the kv change wasn't
captured in the paxos transaction.
Fixes: bb7ebc41532aeb23cff2241ab07b3f01c2f57ddd Fixes: https://tracker.ceph.com/issues/49460 Signed-off-by: Sage Weil <sage@newdream.net>
Alfonso Martínez [Wed, 24 Feb 2021 07:20:53 +0000 (08:20 +0100)]
mgr/dashboard: select any object gateway on local cluster.
Dashboard backend settings:
- Refactoring: now accepting more than 1 type of value.
- RGW_API_ACCESS_KEY & RGW_API_SECRET_KEY accept string (backward compatibility: legacy behavior) as well as dictionary of strings for connecting multiple daemons.
- Ease of use: deprecated: mgr/dashboard/RGW_API_USER_ID: not useful anymore (kept for backward compatibility).
UI/UX:
- Created context component (to be shown only on rgw-related routes) for selecting operating daemon.
- Daemon selector only shown if there is more than 1 daemon running on a local cluster (to reduce cognitive load).
Fixes: https://tracker.ceph.com/issues/47375 Signed-off-by: Alfonso Martínez <almartin@redhat.com>
Zac Dover [Wed, 24 Feb 2021 03:41:50 +0000 (13:41 +1000)]
doc/dev: s/getting tests r.../getting test r...
s/getting tests results/getting test results/
This commit changes a title so that it is grammatically
correct. The adjective "test" now properly modifies the
noun "results". Another way of thinking of this is that
the complex noun "test results" has had a typo in it
corrected.
Jason Dillaman [Mon, 22 Feb 2021 15:23:01 +0000 (10:23 -0500)]
librbd: permit disabling QCOW migration format support
Downstream Red Hat products do not support the older QCOW format. This
will allow the support for the legacy QCOW format to be disabled for the
new RBD import-only migration support.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Lucian Petrut [Wed, 17 Feb 2021 13:27:11 +0000 (13:27 +0000)]
rbd: fix rbd-wnbd device status
The "rbd-wnbd show" command will always report the device status
as "inactive". This patch adds the missing check, similar to the
one used by the "list" command.
Lucian Petrut [Wed, 17 Feb 2021 12:49:02 +0000 (12:49 +0000)]
common: fix win32 event log source
The Windows "get_process_name" function uses the input buffer
to store the entire executable path, while the caller only
expects the filename.
The "get_process_name_cpp" function is using an insufficient
buffer, for which reason it will return "(unknown)" when the
executable path exceeds 32 characters.
Windows event log entries have the wrong source because of this.
We'll update "get_process_name" to use a separate buffer for the
full executable path and avoid requesting a larger buffer than
actually needed.
Josh Durgin [Tue, 23 Feb 2021 00:34:41 +0000 (00:34 +0000)]
qa: deprioritize master and upgrade runs
Keep pacific at high for now. Since teuthology-dispatcher locks nodes
before starting jobs, the upgrade jobs no longer need high priority to
run on more machines than average.
Patrick Donnelly [Mon, 22 Feb 2021 18:35:32 +0000 (10:35 -0800)]
Merge PR #39138 into master
* refs/pull/39138/head:
qa: valgrind test for cephfs-mirror daemon
cephfs-mirror: use preforker for daemonizing
test: adjust sleep time to account for valgrind runs
cephfs-mirror: gracefully shutdown threads, timers, etc..
cephfs-mirror: call ceph_release() to cleanup mount alloc
cephfs-mirror: shutdown filesystem/cluster connections on shutdown
cephfs-mirror: set init failed flag on FSMirror::init() failure
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Mykola Golub [Mon, 22 Feb 2021 16:22:54 +0000 (16:22 +0000)]
rbd-mirror: reset update_status_task pointer in timer thread
To avoid a time window when m_update_status_task is invalid. If
during this time the cancel_update_mirror_image_replay_status is
called, it may cancel some other's ImageReplayer task, if it
happened to add the task with the same address.
Mykola Golub [Mon, 22 Feb 2021 12:53:38 +0000 (12:53 +0000)]
test/librbd: extend TestLibRBD.RenameViaLockOwner
To cover the following case:
- Client A has image opened but does not owns the lock.
- Client B renames the image (client A is not aware of it).
- Client A becomes the lock owner.
- Client B requests rename, which is proxied to the client A.
Kefu Chai [Mon, 22 Feb 2021 04:38:13 +0000 (12:38 +0800)]
mgr: return the error if set_config() fails
in general, `ActivePyModules::set_config()` is called by mgr module when
serving user commands updating module, sometimes if the option is of the
wrong type or invalid value, monitor rejects this request sent by mgr,
but the error info is only logged in the logging message on mgr, but not
returned to user. in this change, `ceph_set_module_option()` and the
underlying methods are updated to return the error to the caller as an
python exception.
Ilya Dryomov [Fri, 19 Feb 2021 15:47:17 +0000 (16:47 +0100)]
krbd: make sure the device node is accessible after the mapping
We have always assumed this to be the case and users' scripts and
orchestration tools have grown to depend on this. Let's add some
enforcement, prompted by [1]:
"I am running my Kubernetes worker node inside of an LXC container
which doesn't benefit from the device node created by the kernel, so
I'm using udev to create the /dev/rbd* device nodes inside of the LXC
container."
which, through the unfortunate interaction with ceph-csi rbd plugin,
results in data loss for "volumeMode: Filesystem" PVs because it ends
up recreating the filesystem every time the PV is attached to the pod:
"When deleting the pod and re-creating it, I can see that the RBD
image is indeed being reformatted. This seems to be because when
blkid is being run to check if the image is formatted, the /dev/rbd*
device has not yet been created by udev. By the time the code gets
down to running mkfs, the device is there and the damage is done."
osd: Fix the OpSchedulerItem cost scaling calculation.
Calculate the scaled cost for an OpSchedulerItem in msec based on the
overall osd capacity (across all shards). Remove logic to cache the
cost of the previous op to re-use for the next transaction as it doesn't
seem to provide any benefit in terms of performance.
osd: Refine implementation that sets built-in profile parameters.
mclock clients are categorized into client, background_recovery and
background_best_effort. Each client category is required to specify
the mclock parameters like reservation, weight and limit. Therefore,
a simple structure (ClientAllocs) is introduced that encapsulates the
mclock parameters and is used to store those parameters for each client
category.
Other changes:
- The "high_client_ops" profile is now set as the default profile
instead of the "balanced" profile.
- Replace "Stringify" with std::to_string().
Sage Weil [Sun, 21 Feb 2021 16:51:54 +0000 (11:51 -0500)]
Merge PR #39328 into master
* refs/pull/39328/head:
tools/rados: replace omap_key_valid with std::optional.
tools/rados: replace omap_key_pretty with prettify().
tools/rados: add support for binary object names.
Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>