cephadm: still set container_image when --no-assimilate-config is provided in bootstrap
Reviewed-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Michael Fritch <mfritch@suse.com>
Otherwise, without this change, this can only be used for mgr,
mon and crash (daemons without their own service spec class)
Fixes: https://tracker.ceph.com/issues/54390
Signed-off-by: Adam King <adking@redhat.com>
While collecting LevelSpec using class method from_name make sure to cast
pool_id from int to string. This is necessary to match the internal
representation of LevelSpec where pool_id is maintained as str.
Fixes: https://tracker.ceph.com/issues/53915
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Limit the amount of scrubber code that directly calls the
PG-Backend services - in this case, the logical-size to
on-disk-size translation.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
Target: improving Scrubber BE testability by reducing the number and
complexity of the external APIs it uses.
(note - first step of many)
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
If osd_pg_max_concurrent_snap_trims is zero, we mistakenly clear
the snaptrim queue. Require it to be > 0.
Fixes: https://tracker.ceph.com/issues/54396
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
When start_dedup() is called while the base pool is not set the dedup_tier,
it is not possible to know the target pool of the chunk object.
1. User set the dedup_tier on a base pool by mon_command().
2. User issues tier_flush on the object which has a manifest (base pool)
before the dedup_tier is applied on the base pool.
3. OSD calls start_dedup() to flush the chunk objects to chunk pool.
4. OSD calls get_dedup_tier() to get the chunk pool of the base pool,
but it is not possible to know the chunk pool.
5. get_dedup_tier() returns 0 because it is not applied on the base pool yet.
6. This makes refcount_manifest() lost it's way to chunk pool.
To prevent this issue, start_dedup() has to be called after dedup_tier is set
on the base pool. To do so, this commit prohibits getting chunk pool id if
dedup_tier is not set.
Fixes: http://tracker.ceph.com/issues/53855
Signed-off-by: Sungmin Lee <sung_min.lee@samsung.com>
A recent change in the mgr/nfs module should enable the functioning
of export management commands/API calls as long as the rados namespaces
and objects have been already established. Document this fact, noting
that now only the `ceph nfs cluster ...` calls *require* an
orchestration module.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This change allows the `ceph nfs export ...` commands to function
without the entire mgr/nfs subsystem requiring orchestration to be
enabled. When there's no orchestration available, the code falls back
to examining the namespaces in the ".nfs" rados pool to determine what
cluster_id values are valid.
This change does not add support for creating the rados objects and
namespace needed to manage a nfs cluster. As discussed with the
orchestration group on 2022-01-22, rook does not need the mgr module to
establish the namespace. So, for now, we'll defer the work needed to
create the namespace/objects when orchestration is disabled.
Fixes: https://tracker.ceph.com/issues/54043
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This function was not using self and thus has no need to be a method.
While we're at it, rename it to normalize_path because that's what
it is doing.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The naming of rados objects used to store the nfs config was spread
all over the code, including inline f-strings, not-static methods,
etc.
This change unifies the naming by putting constant string prefixes
and name generating functions into the utils.py file.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This was previously a staticmethod. This static method was only used by
NFSRados object. Staticmethods are nearly always better implemented as
functions, which is done so here.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Previously, the NFSRados object accepted the "Module" as the
first argument but only used the rados attribute (type rados.Rados).
It's better to limit the scope of types when reasonably possible
so we can see what the true dependencies are. So we restrict
NFSRados to accepting a rados.Rados as the argument.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
mon/OSDMonitor: Restrict pool names beggining with a dot
Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
ceph-volume doesn't prevent from using db and/or wal devices
with existing partitions on them.
This can lead to a data loss situation.
Fixes: https://tracker.ceph.com/issues/54376
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Some devices have null pages in their ata_device_statistics struct; skip
those pages in order to avoid an AttributeError when extracting device's
wear level.
Fixes: https://tracker.ceph.com/issues/51554
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>