Commit Graph
828 Commits
Author SHA1 Message Date
Travis Nielsen e068e156ce osd: enable osd ok-to-stop checks on single node for three osds
If there are at least three OSDs on a single node, we should
treat it as a potential production cluster and perform
the ok-to-stop checks during reconcile. Otherwise,
it may cause instability during upgrades on
single-node clusters.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-02-05 12:08:48 -07:00
Travis Nielsen 16daa7dc44 Merge pull request #15184 from OdedViner/err_msg_ok_to_stop
operator: improve operator error logging for ok-to-stop failures
2025-01-24 08:13:20 -07:00
Eng Zer Jun e68a7ea561 build: replace golang.org/x/exp/slices with stdlib slices
The experimental functions in `golang.org/x/exp/slices` are now
available in the standard library in Go 1.21.

Reference: https://go.dev/doc/go1.21#slices
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2025-01-21 15:02:35 +08:00
Oded Viner 3d7f5cff65 operator: improve operator error logging for ok-to-stop failures
this PR improves the error logging when ok-to-stop requests fail
in the Rook operator. Instead of only showing a generic exit status

Signed-off-by: Oded Viner <oviner@redhat.com>
2025-01-19 14:46:57 +02:00
Michael Adam 26b4fb06d5 core: add function roundupSizeMiB
This change  refactors inline roundup code to a function
roundup_size_MiB that takes a size(in bytes) as argument and returns
the smallest number of Mibibytes larger than or equal to the given size.

Signed-off-by: Michael Adam <obnox@samba.org>
2024-12-16 15:30:47 +01:00
df511fb58f ci: update golangci-lint to the latest version (v1.62)
The ci was using a pretty old version og golangci-lint.
This updates to the latest version.

Additionally, it  silences some
gosec integer conversion overflow false positves
and fixes some real errors of this category
 and string format errors found by golangci-lint, while at it.

Co-authored-by: Blaine Gardner <b.blaine.gardner@gmail.com>
Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
Signed-off-by: Michael Adam <obnox@samba.org>
2024-12-14 14:47:30 +01:00
Santosh Pillai 85c81946ce osd: enable encryption as day-2 operation
Migrate OSDs to enable encryption as day-2 operation.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2024-12-06 09:33:03 +05:30
Travis Nielsen 324df99be8 Merge pull request #15066 from parth-gr/fix-osd-deviceclass
osd: fix device class label on osd pod
2024-12-05 16:20:47 -07:00
parth-gr 01456e8683 osd: add a new devicetype label for osds
currently device class and device type
labels were clubbed with eachother
create a seperate label, as these two labels
can be seperate

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-12-05 16:56:04 +05:30
parth-gr 7413b49a86 osd: fix device class label on osd pod
we were adding the device class as the
disk rotational type, but device class
can be user defined, so if user has
added the device class, use that value

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-12-04 18:08:00 +05:30
parth-gr 996a88f902 rbdmirror: rbd import cmd stuck forever
if the import from the peer cluster doesnt
work, because of some reasons like
cluster health, network, etc

the import cmd stuck forever and which
forever stucks the blockppol reconcile

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-11-25 17:04:11 +05:30
parth-gr ed5013e9c6 rbdmirror: add disable check for status check
enable and disable the status of rados namespace
mirroring by looking at statusCheck spec of blockpool

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-11-06 22:42:46 +05:30
Travis Nielsen 7692cae359 Merge pull request #14896 from parth-gr/rbd-mirror-rados-monitor
rbd: enable periodic monitoring for rados namespace mirroring
2024-11-05 09:15:32 -07:00
parth-gr 9785ef5c8d rbdmirror: enable periodic monitoring for rados namespace
enable monitoring for rados namespace

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-11-05 13:45:02 +05:30
Travis Nielsen 99d60c5bba mds: wait for mds standby upgrade for same fs
The upgrade of the mds daemons pauses to wait for the
stopping of standby daemons before the filesystem upgrade
is completed. If there are multiple filesystems, there
could be standbys for other filesystems that will not be
stopped at the time of the upgrade of another filesystem.
Thus, the standbys may not upgrade and be stuck on the
previous version. Now, the standby upgrade will only wait
for standbys for the same filesystem.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-11-01 14:03:13 -06:00
Travis Nielsen 3b94c50d8b Merge pull request #14818 from iPraveenParihar/kms/vault-keyrotation
kms: key rotation support for vault kms
2024-10-24 11:38:33 -06:00
Madhu Rajanna 4e29717317 core: cleanup blockpool with annotation
This is similar to #14052 we did for radosnamespace
and this is an extension to support cleanup
at the blockpool level to cleanup the images
and the snapshots in a pool.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-10-23 12:20:31 +02:00
Praveen M d8c0242c29 security: key rotation support for vault kms
Signed-off-by: Praveen M <m.praveen@ibm.com>
2024-10-23 11:43:49 +05:30
Travis Nielsen 0fa21969df Merge pull request #14701 from parth-gr/rbd-mirror-rados
rbdmirror: enable rbd rados namespace mirroring
2024-10-10 09:35:22 -06:00
parth-gr 2cef47a9b7 rbdmirror: enable rbd rados namespace mirroring
Modify the CR to allow mirroring of an rados namespace
to a differently named namespace on the remote cluster

1) enable rados namesapce mirroring only
if the blockpool mirrroing is enabled

2) disable blockpool mirroing only if
all the namesapce mirroing is disabled

if the rbd mirroring fails and ceph version is not supported
provide a error message with supported version details
and reason of failing

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-10-10 14:23:11 +05:30
Blaine Gardner 936fe60a76 multus: do not force delete in validation cleanup
Do not force delete resources in validation cleanup. Force deletion can
result in CNI IP address management (IPAM) addresses not being released
cleanly, exhausting them. This can then lead to Rook cluster deploy
failure if the CNI IPAM isn't able to garbage collect the IPs quickly.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-10-08 12:50:37 -06:00
Travis Nielsen b665d7a7b7 core: remove support for ceph quincy
Given that Ceph Quincy (v17) is past end of life,
remove Quincy from the supported Ceph versions,
examples, and documentation.

Supported versions now include only Reef and Squid.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-10-03 11:12:55 -06:00
Santosh Pillai 1a95d6f533 core: preserve pool application name change
default application name is updated inside the `CreatePool` method. Send
pool spec as address in order to preserve this change.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2024-09-25 12:12:01 +05:30
Travis Nielsen b9188c793a pool: allow negative step num in crush rule
The crush rules may have a negative step num.
Rook had assumed negative values were not possible,
but just had not been encountered previously in
a custom crush rule.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-09-09 13:27:54 -06:00
Mathias Chapelain 52ca68d46e osd: discover metadata and wal devices for raw device cleanup
When doing the clean-up of raw device OSDs, it was not taking metadata
and wal devices into account. This commit discover them via the output
of `ceph-volume raw list`, which is returning `device_db` and/or
`device_wal` if they are present.

After discovering the metadata and wal device it also clean them and
close the encrypted device if any.

Signed-off-by: Mathias Chapelain <mathias.chapelain@proton.ch>
2024-08-29 08:47:32 +02:00
Blaine Gardner afdfffac67 Merge pull request #14435 from parth-gr/osd-resize
osd: reweight osd while resizing
2024-08-20 12:14:22 -06:00
parth-gr 17cfda5bd6 osd: reweight osd while resizing
osd got resized by cryptsetup bluestore cmd
but it should also be reweight to balance the pgs properly

closes: https://github.com/rook/rook/issues/14430

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-08-20 22:52:33 +05:30
Travis Nielsen d91b8073c5 Merge pull request #14488 from sp98/set-min-compat-client-to-reef
core: set min-compat-client to reef for upmap-read
2024-07-29 11:28:29 -06:00
sp98 ee5e710912 core: set min-compat-client to reef for upmap-read
If upmap-read balancer mode is required, then set
min-compat-client to reef

Signed-off-by: sp98 <sapillai@redhat.com>
2024-07-29 22:03:37 +05:30
Travis Nielsen 88e952a3ac osd: update the device class if desired state changes
Normally the device class of an OSD is determined at provisioning
and is not updated thereafter. In some scenarios the admin may
want to force update the device class to a new value. The device
classes can be updated by first setting allowDeviceClassUpdate
in the storage spec of the cephcluster, then updating the
device class specified on the deviceSets or other OSDs.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-17 13:54:21 -06:00
Travis Nielsen 689b39de4f Merge pull request #14057 from travisn/deviceclass-log
pool: Return error if device class update fails
2024-07-12 08:50:35 -06:00
Blaine Gardner 5884f1c900 multus: reset validation tool debounce time to 30
Reset the Multus validation tool debounce time to its intended 30 second
value. It was changed to 5 for testing, and the change was accidentally
committed.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-07-11 11:27:33 -06:00
Blaine Gardner 33f5407dd4 multus: add host checking to validation tool
In order to help users check that they have implemented the newly-added
Multus host configuration prerequisites, add a check to the validation
tool to verify connectivity.

Because users who are already running clusters with Multus enabled, add
a flag that allows users to only check for host configuration
prerequisites. This mode will not start the large number of clients that
would normally be started because those clients could disrupt a running
Rook cluster negatively.

Host checking pods require host network access. Many Kubernetes
distributions have pod security features enabled. In order to allow
non-Vanilla distros to run this tool, allow specifying a service account
that pods will run as, which can be configured by the admin to allow
test pods.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-07-10 13:41:38 -06:00
Travis Nielsen 0bea31ef7f pool: return error if device class update fails
Updating the device class swallowed any error if updated
for the pool. The error was not even logged, so we couldn't
troubleshoot why the new crush rule was not applied.
Log the error for troubleshooting and also fail the pool
reconcile since the desired configuration was not applied.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-10 12:59:43 -06:00
Travis Nielsen b92bbba671 pool: skip updating crush rules for stretch clusters
Pools in stretch clusters must all specify the same
CRUSH rule. No pools can use a different rule. When there
is a change in the device class, we do not even expect to update
the crush rules in a stretch cluster. Different device classes
are not supported in stretch clusters, and it's expected to be
a homogenous environment. Therefore, skip all crush rule updates
in stretch clusters.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-10 11:08:31 -06:00
Niraj Yadav b8b7af3495 osd: use old passphrase to kill the luks slot
While adding a new encryption key to slot 1
if there exists a key in slot 1 which is not
equal to the one we want to update it with,
we kill the slot and then add the new key to it.

While killing the slot, the existing code uses
the new key, which is not valid in such cases.

This patch modifies the code to use the key in
slot 0 (the one that we know works) to kill the slot.

Signed-off-by: Niraj Yadav <niryadav@redhat.com>
2024-06-21 19:15:01 +05:30
Blaine Gardner 4b51c2c3bd Merge pull request #14322 from ideepika/wip-disablecrush-updates
enableCrushUpdates option: rook operator would not be able to update crush rules by default if not set
2024-06-17 12:20:26 -06:00
Travis Nielsen 720c23abcf Merge pull request #14325 from ideepika/wip-solve-device-class-bug
pool: get the exact deviceClass name instead of crushroot+deviceClass
2024-06-12 16:13:41 -06:00
Deepika Upadhyay 41116be919 pool: get the exact deviceClass name instead of crushroot+deviceClass
this lead to creation of 2 crush rules because of difference in
deviceClass names:
eg:
creating a new crush rule for changed deviceClass
("default~hdd"-->"hdd") on crush rule "test-crush-bug-az-ab-4"

Signed-off-by: Deepika Upadhyay <deepikaupadhyay01@gmail.com>
2024-06-13 01:03:20 +05:30
Deepika Upadhyay d71f9c238f pool: add option to enableCrushUpdates to pool if required
this will be disabled by default but in scenarios where the user want to
update failureDomain, DeviceClass etc, this option can be enabled, to be
noted this can lead to lot of data rebalancing and remapping. Use with
caution

Signed-off-by: Deepika Upadhyay <deepika.upadhyay@clyso.com>
2024-06-12 22:48:25 +05:30
Blaine Gardner 08a27940ed multus: add and test ipv6 support for validation tool
Add IPv6 support for multus validation tool. Also test that IPv6 support
works by specifying one of the NetAttachDefs with an IPv6 address range.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-06-03 17:30:36 -06:00
Travis Nielsen e479b051bc osd: configure cluster full settings when osds fill up
When the clusters reach full, nearfull, or backfill full thresholds
ceph will raise health warnings and stop allowing IO or backfill
depending on the threshold. These settings require special ceph
commands instead of being generic ceph config. Allow these settings
to be set from the CephCluster CR in the spec.storage
section.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-05-30 12:10:41 -06:00
Brian Dowling ef0ed93134 osd: reduce safe-to-destroy retry timeout to 15s
This reduces the safe-to-remove retry interval from 1m to 15s.

Closes #14247

Signed-off-by: Brian Dowling <bjd-dev@simplicity.net>
2024-05-27 13:54:21 -04:00
Satoru Takeuchi f776c0b35e core: remove pacific specific code
Since pacific is no longer supported, we can remove pacific specific
code.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2024-05-15 02:26:33 +00:00
momantech 496afdbad3 docs: delete duplicate words and revise the names of some methods
delete duplicate words and revise the names of some methods

Signed-off-by: momantech <cuimoman@qq.com>
2024-04-25 15:43:40 +08:00
Travis Nielsen 61332caa4b Merge pull request #14049 from NymanRobin/crd-output-enhancements
operator: make CephBlockPoolRadosNamespace and CephFilesystemSubVolumeGroup get outputs more verbose
2024-04-16 12:00:15 -06:00
NymanRobin 70a7e61da5 operator: make crds outputs more verbose
The following printcolumns were added

CephBlockPoolRadosNamespace: Phase,
BlockPoolName, Age
CephFilesystemSubVolumeGroup: Phase,
FilesystemName, PinningConfig, Age

Also improved the error messages in
SubVolumeGroupClient

Signed-off-by: NymanRobin <nyman.robin@gmail.com>
2024-04-16 08:40:16 +03:00
Travis Nielsen 319a12fd18 Merge pull request #14042 from clonefetch/master
core: fix function names in comment
2024-04-15 11:35:33 -06:00
clonefetch 29ff8d9823 core: fix function names in comment
Signed-off-by: clonefetch <c0217@outlook.com>
2024-04-16 00:54:42 +08:00
Travis Nielsen 499a09ed72 Merge pull request #14052 from sp98/cleanup-radosnamespace
Cleanup RADOS namespace with forced deletion annotation
2024-04-12 11:11:47 -06:00