Venky Shankar [Mon, 9 Oct 2023 05:06:49 +0000 (10:36 +0530)]
Revert "mds: disable delegating inode ranges to clients"
This isn't necessary -- the MDS handles delegating inode ranges
to clients from its preallocated inode set properly - the suspected
bug involving not persisting the sessionmap and causing asserts
during replay isn't an issue. The preallocated set is persisted
with the log event and the MDS correctly rebuild the set from
this information during replay.
Ramana Raja [Mon, 2 Oct 2023 16:39:26 +0000 (12:39 -0400)]
librbd/ManagedLock: kickstart ExclusiveLock state machine
... that is stalled waiting for lock. Do this when trying to reacquire
lock in the ImageWatcher's rewatch mechanism. This would enable the
ExclusiveLock state machine to propagate the blocklist error to the
caller trying to perform an image operation requiring an exclusive
lock.
Previous attempt, e66db763, to fix the hang due to exclusive lock
acquisiton (stuck waiting for lock) racing with client blocklisting
did not always work. e66db763 kickstarted the ExclusiveLock state
machine when the ImageWatcher tried to schedule a exclusive lock
request and the blocklisting was detected. However, there is a short
window between a watch getting deregistered and client blocklisting
getting detected as part of rewatching. If hit when trying to schedule
a lock request, the ExclusiveLock state machine wasn't kickstarted,
blocklist error wasn't propagated, and the hang resurfaced.
A more robust approach is taken to resume the ExclusiveLock state
machine stuck waiting for lock during client blocklisting. Whenever
a client's ImageWatcher loses connection to the cluster, as it happens
during blocklising, the ImageWatcher initiates a mechanism to rewatch
the image and tries to reacquire the lock. Piggyback on this rewatch
mechanism that gets triggered during client blocklisting. And when
trying to reacquire the lock, kickstart the ExclusiveLock state
machine stalled waiting for lock (STATE_WAITING_FOR_LOCK).
Fixes: https://tracker.ceph.com/issues/63009 Signed-off-by: Ramana Raja <rraja@redhat.com>
Zac Dover [Sat, 7 Oct 2023 21:43:43 +0000 (07:43 +1000)]
doc/architecture: repair RBD sentence
Improve an ambiguous sentence in doc/architecture.rst.
The problem presented by the original sentence is that the phrasal verb
"to provide with" is implicated in one of its possible readings.
Interpreted in that way, the sentence seems to express the incorrect
idea that RBD furnishes block devices with snapshotting and cloning, as
though snapshotting and cloning are being delivered to the block
devices. In fact, snapshotting and cloning are just features of RBD, and
are features that are described on this page:
https://docs.ceph.com/en/quincy/rbd/rbd-snapshot/.
Adam King [Fri, 6 Oct 2023 15:20:57 +0000 (11:20 -0400)]
mgr/cephadm: fix upgrades with nvmeof
Currently, nvmeof was being treated as if it used
a ceph image during upgrades. This would cause logging
of messages like (I've removed the nvmeof daemon id)
log [WRN] : Upgrade daemon: nvmeof.<id>: Cannot redeploy
nvmeof.<id> with a new image: Supported types are: mgr, mon,
crash, osd, mds, rgw, rbd-mirror, cephfs-mirror, ceph-exporter,
iscsi, nfs
and if you had set a custom image for the
mgr/cephadm/container_image_nvmeof setting, this would
be undone as part of the upgrade process.
Fixes: https://tracker.ceph.com/issues/63127 Signed-off-by: Adam King <adking@redhat.com>
rgw/lua/doc: support reloading lua packages on all RGWs
without requiring a restart of the RGWs
test instructions:
https://gist.github.com/yuvalif/95b8ed9ea73ab4591c59644a050e01e2
also use capitalized "Lua" in logs/doc
Rishabh Dave [Thu, 28 Sep 2023 17:34:51 +0000 (23:04 +0530)]
mon/AuthMonitor: check if entity is absent before creating it
Although this code path is not used for creating entities yet, it is
better to fix the bug sooner than later. Method
AuthMonitor::_update_or_create_entity() must exit (with appropriate
error code) when entity to be created on the Ceph cluster is already
present.
Casey Bodley [Thu, 5 Oct 2023 15:59:52 +0000 (11:59 -0400)]
rgw: fix http error checks in keystone/barbican/vault clients
when RGWHTTPManager encounters an http error, it uses
rgw_http_error_to_errno() to map that to a negative posix error code.
RGWHTTPClient::process() returns that mapped error code, and exposes the
original http error via get_http_status()
the http client code for keystone, barbican, and vault were returning
early on the errors from process(), so weren't getting to the http error
checks
these clients now check for specific http errors before testing the
result of process()
Dhairya Parmar [Thu, 5 Oct 2023 08:12:31 +0000 (13:42 +0530)]
doc: remove egg fragment from dev/developer_guide/running-tests-locally
DEPRECATION: git+https://github.com/ceph/teuthology#egg=teuthology
[test] contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce
this behaviour change. A possible replacement is to use the req @ url syntax,
and remove the egg fragment. Discussion can be found at
https://github.com/pypa/pip/issues/11617
Rishabh Dave [Wed, 4 Oct 2023 18:52:51 +0000 (00:22 +0530)]
src/MDSMonitor: make use of imported namespace symbols
Symbols imported into current namespace should be used directly; there
is no need to mention their parent namespace while using them. IOW, to use
"std::string" after it has been imported, just write "string" instead of
"std::string".
Rishabh Dave [Wed, 4 Oct 2023 18:16:32 +0000 (23:46 +0530)]
mon/FSCommands: make use of imported namespace symbols
There's no need to mention the "home" namespace of a symbol while using
it after it has been imported into the current namespace. IOW, no need to
write, for example, "std::string" after it has been imported from its
namespace; instead simply writing "string" will suffice.
Rishabh Dave [Wed, 4 Oct 2023 18:22:27 +0000 (23:52 +0530)]
mon/AuthMonitor: make use of imported namespace symbols
Once a symbol has been imported into the current namespace, no need to
mention the original namespace while using it. IOW, no need to write
"std::string" after it has been imported from the namespace "std" into the
current namespace.
vstart: exclude default route during cluster setup
"ip route list" may list default route, and that needs to be excluded
while doing cluster setup
Typical o/p of ip route list:
$ ip route list
default via 10.8.159.254 dev eno1 proto dhcp src 10.8.152.13 metric 100
10.8.152.0/21 dev eno1 proto kernel scope link src 10.8.152.13 metric 100
John Mulligan [Wed, 4 Oct 2023 17:43:47 +0000 (13:43 -0400)]
cephadm: convert cephadm agent to a daemon form
The cephadm agent is a bit special in that it will not be converted
to a ContainerDaemonForm (it is not containerized) but we still want
to have it registered as a DeamonForm so that the deamon_type can be
passed to create and have it resolve correctly.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Sat, 23 Sep 2023 19:26:03 +0000 (15:26 -0400)]
cephadm: add func to deploy any generic ContainerDaemonForm
While there are no ContainerDaemonForms implemented yet, add a function
that uses the ContainerDaemonForm methods to construct a deployment
for the container based daemons.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Sat, 23 Sep 2023 19:23:42 +0000 (15:23 -0400)]
cephadm: add ContainerDaemonForm
Add a supplemental DaemonForm subclass that helps deploy container
based daemons in a standard fashion. Most of these methods are
optional and should have sensible defaults.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 21 Sep 2023 21:57:43 +0000 (17:57 -0400)]
cephadm: remove direct daemon-type deps from sysctl
Using the appropriate daemon form we can break the direct dependency
that the sysctl setup function has on particular classes and use
a generic interface.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Wed, 20 Sep 2023 14:17:29 +0000 (10:17 -0400)]
cephadm: introduce daemon forms to cephadm.py
Introduce the DeamonForm base class to cephadm.py and make various
daemon-type classes into fully fleged deamon form classes.
Some classes already had a semi-standard `init` classmethod for
instantiation. In these cases the new `create` classmethod is a thin
wrapper over the existing method. In cases where the class was not
already being instantiated a minimal set of methods are added.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Thu, 21 Sep 2023 20:21:00 +0000 (16:21 -0400)]
cephadm: add daemon_form.py: bases and funcs for daemon forms
Create daemon_form.py containing the DaemonForm class and a few
subclasses and utility functions for working with DaemonForms.
In a future commit, DaemonForm will become the base class for
the current assortment of classes named after the daemon or
family of daemon they help manage.
A daemon form, think "form" as in "template" or "mold", assists
in setting up, creating, and managing daemons controlled with
cephadm. Because cephadm supports a variety of services the
DaemonForm is an abstract base class and the module also supports
additional ABCs that may be used by DaemonForms to implement
optional features.
The daemon forms that are expected to be used directly must be
registered using the provided decorator. This is an explicit extra
step so that common bases that inherit from DaemonForm can be
implemented. Plus explicit is better than implicit. :-)
All DeamonForm subclasses are expected to provide a small set
of standard methods so that the types can be chosen, instantiated,
and used a common manner.
Signed-off-by: John Mulligan <jmulligan@redhat.com>