Commit Graph
765 Commits
Author SHA1 Message Date
sp98 94953f3f7b osd: create config before migration osd
create the ceph config and keyring file in the osd prepare pod
before starting the OSD migration. These files are needed to
run any ceph command.

Signed-off-by: sp98 <sapillai@redhat.com>
2024-01-08 15:35:45 +05:30
Blaine Gardner cd253d0218 multus: use nginx-unprivileged image from quay
Use Quay as the source for the nginx-unprivileged image used for the
Multus validation tool because Quay does not rate limit image pulls,
which are a common complaint for users of the tool.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-01-04 14:25:40 -07:00
parth-gr c9fd382c13 subvolumegroup: add pinning spec in subvolumegroup CRD
subvolumegroup can be pinned by pintype and pinsetting
So adding the spec to enhance its functionality

Closes: https://github.com/rook/rook/issues/12607

Signed-off-by: parth-gr <paarora@redhat.com>
2023-12-11 21:54:25 +05:30
Travis Nielsen d1e0b3f9a9 Merge pull request #13349 from subhamkrai/revert-callback-code
Revert "osd: add callback function in osd removal"
2023-12-07 12:01:54 -07:00
subhamkrai a30338ae6e Revert "osd: add callback function in osd removal"
This reverts commit 927af7c7f7.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-12-07 21:01:04 +05:30
travisn 6f8e42422d core: fix golang linter issues with variables in loops
Loop variables cannot be reliably uses since they will
change with each iteration. Update these loop variable
uses to be safe by indexing the slice rather than
using the loop variable directly.

Also suppress the linter issues for passwords used
in tests.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-12-05 14:14:58 -07:00
Alexander Trost 3097455d78 Merge pull request #13246 from koor-tech/ceph_config_via_cluster_crd_impl
operator: allow setting ceph config options via ceph cluster crd
2023-12-02 11:27:20 +01:00
Alexander Trost 4ed35d6bd6 operator: allow setting ceph config options via ceph cluster crd
This implements the "Ceph Config via Ceph Cluster CRD" design document
as a `cephConfig:` structure on the CRD.
This also fixes the `yq` commands used to manipulate the
`cluster-test.yaml` that caused CI issues for this PR and potentially
unknowingly others.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2023-12-02 00:05:48 +01:00
Travis Nielsen 1efb694050 Merge pull request #13266 from parth-gr/svg-name
subvolumegroup: add name spec in subvolumegroup CRD
2023-11-30 10:16:40 -07:00
parth-gr 939a1b7d20 subvolumegroup: add name spec in subvolumegroup
Originally we create it using this cmd
ceph fs subvolume create <vol_name> <subvol_name>
So we can have 2 variables filesystem and subvolume name,
Currently the CR doesn't allow us to make subvolume-name
as constant as needed to "csi" because of k8s limitations

Signed-off-by: parth-gr <paarora@redhat.com>
2023-11-30 20:39:11 +05:30
Travis Nielsen ee14ecb5a7 Merge pull request #13281 from subhamkrai/add-callback-osd-removal
osd: add callback function in osd removal
2023-11-29 23:13:12 -07:00
subhamkrai 927af7c7f7 osd: add callback function in osd removal
Adding callback function in the osd removal method
as in downstream there is requirement of adding extra
check before proceeding with osd removal.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-11-30 10:48:24 +05:30
Rakshith R 59cb0dd4bf csi: add CSIDriverOptions section in cephCluster CR
This commit adds new CSIDriverOptions section in
cephCluster CR. This section contains settings
for read affinity and kernel+fuse Mount options
These settings will be injected directly into
rook-ceph-csi-config cm to be applicable per
ceph cluster.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-11-29 19:34:28 +05:30
Ryotaro Banno 0ad88e9d68 core: add pgHealthyRegex to DisruptionManagementSpec
This patch adds `pgHealthyRegex` field to DisruptionManagementSpec.
`pgHealthyRegex` is a regular expression that is used to determine which
PG states should be considered healthy. The default value of
`pgHealthyRegex` is:

        ^(active\+clean|active\+clean\+scrubbing|active\+clean\+scrubbing\+deep)$

which is effectively the same as before.

Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
2023-11-22 00:19:04 +00:00
travisn 03d077aa6b core: remove support for ceph pacific
Pacific is end of life and no longer necessary to
support in Rook with v1.13.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-11-14 17:07:03 -07:00
Travis Nielsen 3288e60cf5 Merge pull request #13069 from subhamkrai/update-device-class
pool: allow updating deviceClass on existing pool
2023-11-13 10:57:57 -07:00
subhamkrai 133154d192 pool: allow updating deviceClass on existing pool
This commits add check to update the deviceClass on
existing pool.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-11-13 20:40:21 +05:30
Satoru Takeuchi 8e80b21035 Revert "osd: support encrypted OSD on partiton"
This reverts commit 093125904b.

Once we introduced encrypted OSD on partition in #12924.
However, even though `encryptedDevice` field is `true`,
an non-encrypted OSD is created. To prevent the creation
of misconfigured OSD, it's better to revert #12924 for now.

Initially, I intended to correct this problem. However, I found
it will take long time because we need to change the KMS-related
code, init containers of both OSD pod and OSD prepare pod.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2023-11-07 12:37:31 +00:00
Sheetal Pamecha 06c176524a multus: improve the multus validation test's flakiness metric
Allow the flakiness threshold window to be tuned from the cli

Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
2023-10-31 15:23:10 +05:30
Satoru Takeuchi 6fee3c9ff4 osd: prevent to fallback to lvm mode in osd on lvm creation
Rook creates raw mode OSD as possible and falls back to lvm mode if necessary.
This logic doesn't work if only supports raw mode.

Closes: https://github.com/rook/rook/issues/11438

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2023-10-11 22:36:53 +00:00
Blaine Gardner 0c721e05d5 multus: allow node profiles in validation test
Add the ability to specify node profiles in the multus validation test.

This addresses a few points of early feedback on the validation tool.
Statements below critique the tool's behavior before this patch.
1. The tool assumes all daemons are on public and cluster network, which
   means users who have a significantly smaller cluster net (a
   design choice) cannot run a single test to determine if Rook is
   likely to install correctly.
2. The tool does not have placement options to select only a subset of
   Kubernetes nodes to run validation on.
3. Users of multus seem to have a dedicated pool of storage nodes more
   often than the average Rook install. This makes sense for security-
   and perforance-minded users. The tool cannot run a single test to
   verify storage-only and general-workload nodes at one time.

These points are addressed by allowing users to specify configurations
for different "NodeTypes."

Each NodeType config has options for selecting the number of OSDs as
well as the number of other (non-OSD) Ceph daemons. This limits the
unnecessary exhaustion of cluster network addresses from critique 1.

Each NodeType config has its own placement (critique 2).

Users can define as many NodeTypes as needed to test the network for
their planned CephCluster. Specifically, this allows the tool to test
storage-only nodes and generalized-workload nodes at the same time. An
arbitrary number of NodeTypes are allowed to support even more highly
specialized cluster setups, such as multiple tiers of storage nodes
where some storage-only nodes may run more OSDs than others.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2023-10-04 15:26:35 -06:00
Redouane Kachach b3dd74ea20 docs: fixing some spelling issues
closes: https://github.com/rook/rook/issues/12987

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-10-03 13:50:17 +02:00
travisn f7094d1d13 file: disable active standby when set to false
The activeStandby property of the filesystem CR was not
taking effect when changed from true to false. The standby
was only being enabled when true, but never applied when
changed to false.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-10-02 08:27:14 -06:00
Travis Nielsen cb9ffacce5 Merge pull request #12909 from testwill/pkg-import
core: import packages only once
2023-09-21 15:30:04 -06:00
Satoru Takeuchi 093125904b osd: support encrypted OSD on partiton
Let's use raw mode for encrypted OSD. This mode supports encrypted
OSD on partition.

Closes: https://github.com/rook/rook/issues/10984

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2023-09-19 13:10:18 +00:00
guoguangwu 235ac293ff core: import packages only once
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-09-16 13:40:17 +08:00
Travis Nielsen 0ae3800929 Merge pull request #12770 from sp98/osd-migration-part2
osd: replace existing OSDs to use new store
2023-09-05 08:57:20 -06:00
sp98 11b8d10a5a osd: replace existing OSDs to use new store
This follow up the #12507
- fixes replacing of encrypted OSDs.
- Updates OSD status at the end of reconcile

Signed-off-by: sp98 <sapillai@redhat.com>
2023-09-01 21:07:38 +05:30
go-bai f4cfa95768 mon: typo in json tag of struct MonMap
The json tag in struct MonMap had a spelling error where "json" was incorrectly splled as "josn". This commit corrects the spelling to "json".

Signed-off-by: go-bai <599500688@qq.com>
2023-08-29 12:31:54 +08:00
sp98 886bb357ef osd: replace osd to use new backend store
If osd store is updated in the ceph cluster, then
delete OSDs one by one, cleanup disks and provision a new OSD on
the same disk

Signed-off-by: sp98 <sapillai@redhat.com>
2023-08-17 21:40:55 +05:30
Madhu Rajanna bd9b42d221 file: ignore exit code 22 when adding datapool
Ignore the exit code 22 when adding the
datapool to a filesystem.

updates: #12673

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-08-15 16:01:48 +02:00
Sheetal Pamecha d86fa2abbc osd: use cp -a command for copying init-containers
remove copy-binaries cmd and related code

Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
2023-07-31 09:31:38 +05:30
sp98 c13d34f8d3 osd: configure backend store
Configure osd backend store from the cephCluster spec

Signed-off-by: sp98 <sapillai@redhat.com>
2023-07-24 09:16:30 +05:30
travisn a74a945202 core: remove vault server module dependencies
The vault server dependencies were pulling a lot of indirect modules
that are not necessary for Rook. The modules were only used
for testing. The vault github explicitly indicates that:

"Some other projects have made a practice of doing so in order to
take advantage of testing tooling that was developed for testing Vault itself.
This is not, and has never been, a supported way to use the Vault project."

When attempting to update to vault v1.13.3, we are hitting
such an unsupported configuration with go modules
that are impossible to satisfy. By removing the tests
that were using the vault server project, we can remove
this large set of dependencies, enable updating to v1.13.3,
and also reduce the modules pulled in by vault.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-07-05 11:33:03 -06:00
travisn c4ec275946 build: update to latest go modules as much as possible
The go modules are updated to the latest client-go, vault,
and other modules. There does not appear to be a combination
of modules that will allow us to use vault v1.13.3, so we
stick with v1.13.2.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-06-23 07:44:17 -06:00
travisn 557a3e06cc core: api updates for controller runtime v0.15
For the controller runtime v0.15 there are some breaking
changes to the api that need to be updated.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-06-22 10:33:28 -06:00
Blaine Gardner f8d9076a38 multus: add config file for validation tool
Allow the validation tool to read test config from a yaml file. To help
users, also allow outputting a config file with default values and
comments instructing how to use the config file.

This work is in anticipation of adding more advanced configuration
options that would be too cumbersome to set using cli flags.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2023-06-20 11:54:37 -06:00
Blaine Gardner d0995c8d76 test: fix nginx image client template error
Regarding Go templates: when inside a range, the base dot (.) context is
not available, so anything used within the range must be set to a
shell-style variable.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2023-05-26 12:20:15 -06:00
iPraveenParihar 78d6528153 test: allow specifying custom nginx image for multus validation
Allow overriding the nginx server image used for the web server and clients from CLI with --nginx-image flag.
Set default image in flag as 'nginxinc/nginx-unprivileged:stable-alpine'

Signed-off-by: iPraveenParihar <praveenparihar68@gmail.com>
2023-05-24 21:04:24 +05:30
Blaine Gardner 3a27cb60b3 operator: pull multus validation test images before test
Before starting multus validation test clients, pull the client image to
all nodes. This will ensure that variations in client readiness timing
will not be affected by variations in the time nodes take to pull the
image. This is intended to reduce the number of false reports of flaky
multus networks.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2023-05-11 16:00:33 -06:00
Blaine Gardner 5a1d1f2175 Merge pull request #12069 from BlaineEXE/multus-golang-tester
test: add multus validation test routine to rook binary
2023-05-02 19:37:29 +02:00
Blaine Gardner 0f6e7ee921 test: add multus validation test routine to rook binary
Add a more involved multus validation test to the Rook binary. Because
this is intended to be end-user runnable, make sure operator-only
commands are hidden.

Build this into the rook binary instead of creating a separate binary
for ease, and because any binary built with the kube api becomes 40+
megabytes. We save quite a bit of space by including this in the Rook
binary, which is good for keeping container layers as small as possible.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2023-05-02 10:23:00 -06:00
parth-gr ed61d25fc3 mgr: fix ceph dashboard login issue
Dashboard ac-user-create cmd was taking more time
then the usual ceph command to run,
So increased the timeout to run the cmd, and
now dashboard admin user is sucessfully created

Closes: https://github.com/rook/rook/issues/12113
Signed-off-by: parth-gr <paarora@redhat.com>
2023-05-02 19:43:53 +05:30
Javier 884d5e9855 osd: allow to use filter device
this feature is to allow the use of filters using the deviceFilter flag
by skipping devices that do not match the filter

Closes: #10340
Signed-off-by: Javier <sjavierlopez@gmail.com>
2023-04-21 13:13:59 -06:00
Travis Nielsen 68fa240a1e Merge pull request #11993 from heliochronix/ipv6-msgr2-mon-config
core: fix config format for msgr2 ipv6 monitors
2023-03-30 08:04:38 -06:00
Miles Simpson f99a8dea3f core: fix config format for msgr2 ipv6 monitors
Signed-off-by: Miles Simpson <miles@milessimpson.com>
2023-03-28 16:45:07 -07:00
Satoru Takeuchi 3e34ebeff8 osd: handle global or node-local device class configuration correctly
Rook uses global or node-local device class configuration if device-level
configurations doesn't exist. However, after introducing device-class
level resource configuration, rook set the default value of device class.
So global or node-level device class configuration has never been used
after that.

Closes: https://github.com/rook/rook/issues/11871
Closes: https://github.com/rook/rook/issues/11826

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2023-03-27 04:28:45 +00:00
parth-gr 8e317ee074 ci: update golangci-lint version as it fails for some k8s version in 1.10
Closes: https://github.com/rook/rook/issues/11896

Signed-off-by: parth-gr <paarora@redhat.com>
2023-03-16 20:59:22 +05:30
Rakshith R 71e011f731 osd: add rotate-key functionality to rook's key-management cmd
This commit adds functionality to be able to rotate
key encryption key of encrypted PVC backed OSDs.
Necessary changes such as adding update functionality
to kms and rbac changes are made as well.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-03-08 12:07:26 +05:30
Rakshith R b41fdfbb62 osd: add support for updating secret for default KMS
This commit adds support for updating secret for default KMS.
This is required for encryption key rotation.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-03-08 12:07:26 +05:30