Commit Graph
5036 Commits
Author SHA1 Message Date
zer0def 9b69b5cb46 rgw: correctly handle mgr-proxied rgw cli commands in multus scenarios
Due to multi-site Ceph object resources (realms, zonegroups, zones)
reconciliation CLI commands being proxied through CephCluster's Mgr pods
in Multus-based scenarios, return codes were being additionally wrapped
by K8S' command streams and weren't adequately handled in-code, causing
reconciliation of CephObject(Realm|ZoneGroup|Zone) resources to fail, as
an exit code of 0, instead of the expected syscall.ENOENT (2) was returned.

Fixes #12833

Signed-off-by: zer0def <zv0uzqbqnncivw0afjsx79jmd19shpps3r5f2vjc6yv@definedaszero.xyz>
2023-11-20 23:42:17 +01:00
dependabot[bot] 8abc599c42 build(deps): bump the k8s-dependencies group with 4 updates
Bumps the k8s-dependencies group with 4 updates: [k8s.io/api](https://github.com/kubernetes/api), [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver), [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) and [k8s.io/cloud-provider](https://github.com/kubernetes/cloud-provider).

Updates `k8s.io/api` from 0.28.3 to 0.28.4
- [Commits](https://github.com/kubernetes/api/compare/v0.28.3...v0.28.4)

Updates `k8s.io/apiextensions-apiserver` from 0.28.3 to 0.28.4
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.28.3...v0.28.4)

Updates `k8s.io/cli-runtime` from 0.28.3 to 0.28.4
- [Commits](https://github.com/kubernetes/cli-runtime/compare/v0.28.3...v0.28.4)

Updates `k8s.io/cloud-provider` from 0.28.3 to 0.28.4
- [Commits](https://github.com/kubernetes/cloud-provider/compare/v0.28.3...v0.28.4)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/apiextensions-apiserver
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/cli-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/cloud-provider
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 14:21:16 -07:00
Travis Nielsen 297e8400e5 Merge pull request #12850 from parth-gr/node-telemetry
core: report node metrics using ceph telemetry
2023-11-16 14:55:44 -07:00
parth-gr f007f2aca1 core: report node metrics using ceph telemetry
Add this reporting with the cephcluster reconcile,
Similar way we reported other telemetry's

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

Signed-off-by: parth-gr <paarora@redhat.com>
2023-11-16 19:13:22 +05:30
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
Blaine Gardner d01029a4b0 Merge pull request #13206 from BlaineEXE/multus-fix-network-canary-all-placement
multus: fix placement error for net addr detect job
2023-11-14 17:58:19 -06:00
Blaine Gardner 0a538bfc37 multus: fix placement error for net addr detect job
Fix an issue in the network address detection job where placement was
only retreived from osd and not merged with all.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2023-11-14 12:36:58 -07:00
Travis Nielsen 1f157df699 Merge pull request #12817 from parth-gr/objectstore-improvements
object: improve the error handling for multisite objs
2023-11-14 12:33:38 -07:00
parth-gr 46c241433d object: improve the error handling for multisite objs
here is the https://go.dev/play/p/SS9Q-dAiIx3 example which says the
error handling was wrongly implemented

Signed-off-by: parth-gr <paarora@redhat.com>
2023-11-14 15:12:15 +05:30
Blaine Gardner 5230fcd60d Merge pull request #12845 from synarete/nfs-liveness-probe
nfs: add livness-probe to nfs-ganesha container
2023-11-13 13:44:57 -06: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
Shachar Sharon e05184d0a7 nfs: allow livness-probe for nfs-ganesha container
Use K8s LivenessProbe mechanism to check OK-status of nfs-ganesha
container. A user may define his own lineness-probe, or a default one
which expects NFS TCP-port 2049 to be active; that is, willing to accept
new connections: for Ceph>=18.2.1 issue 'rpcinfo' call on local pod;
otherwise use standard K8s TCP-socket liveness probe mechanism.
Define permissive values to liveness-probe to ensure that the NFS
service is defined in failed-state only when it has non-recoverable
error.

The current default definition of LivenessProbe is expected to guard the
nfs pod from at least the following two cases:

  - Deadlocks: where an nfs-ganesha server is running, but unable serve
    new connections due to internal bad-state.

  - Resource exhaustion on the host node (e.g. OOM) which prevents the
    server from accepting new connections and reply to NULL RPC request.

In both cases we expect K8s to reschedule the nfs pod, most likely on
different host node.

Refs rook issue #12719

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
2023-11-13 16:21:24 +02:00
Shachar Sharon 7c3e91390e nfs: add optional LivenessProbe to GaneshaServerSpec
Allow end-user to have full control on NFS-Ganesha liveness probe:

  - Disabled
  - Enabled, using user-provided definition
  - Enabled, using Rook's default liveness probe for Ganesha.

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
2023-11-13 16:21:24 +02:00
Blaine Gardner a7fce61f68 Merge pull request #13129 from BlaineEXE/multus-use-rook-image-for-ip-detect
multus: use rook image for ip range detection
2023-11-09 11:29:24 -06:00
Travis Nielsen 635570a168 Merge pull request #13179 from rkachach/fix_issue_13159
mgr: set interval of serviceMonitor to the value from MonitoringSpec
2023-11-09 07:17:41 -06:00
Redouane Kachach 06bc976959 mgr: set interval of serviceMonitor to the value from MonitoringSpec
This change updates the serviceMonitor interval field with the
value from the MonitoringSpec.

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

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-11-09 06:35:20 +01:00
Satoru Takeuchi 77db655558 Merge pull request #13169 from cybozu-go/osd-revert-encrypted-osd-on-part
Revert "osd: support encrypted OSD on partiton"
2023-11-09 06:54:15 +09:00
Blaine Gardner db1ca8c93e multus: use rook image for ip range detection
Use the Rook image (defined by the operator pod) to detect the Multus
network address ranges. It is reasonable for users to want to have a
minimal Ceph image that does not have the `ip` utility installed, which
is used for detecting the address ranges of multus interfaces. Instead,
use the Rook image, which Rook can ensure has the `ip` tool if Ceph ever
removes it from their image.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2023-11-08 10:11:04 -07:00
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
Madhu Rajanna 5658e026cb csi: remove deprecated grpc metrics code
GRPC metrics got deprecated in cephcsi
3.7.0 and the deprecated flags will get
removed in the next release. This PR
removes the deprecated metrics code which
allow us to run with older cephcsi as well.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-11-07 11:24:17 +01:00
travisn a24a50670d build: update go modules from merge conflict
The merge of the go modules in the apis subdirectory
missed some changes from another merge around the same
time, so this will add the missing updates and
fix the CI.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-11-01 21:30:13 -06:00
Travis Nielsen d72abc4ae9 Merge pull request #13113 from travisn/api-modules
build: Add go modules for apis subdir
2023-11-01 15:58:34 -06:00
Blaine Gardner 35bd18660e Merge pull request #13123 from Sheetalpamecha/mmultus-validation-test
multus: improve the multus validation test's flakiness metric
2023-11-01 09:44:19 -06:00
Travis Nielsen 9738a0f19d Merge pull request #13071 from travisn/reef-base-image
core: Update operator base image to reef
2023-10-31 11:02:12 -06: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
Travis Nielsen 674407db7b Merge pull request #12952 from sp98/hostpath-to-pvs
mon: failover mons from hostpath to persistent volumes
2023-10-30 11:31:21 -06:00
sp98 09356636fa mon: failover mon from hostpath to pv
failover mons from  hostpath to pv and vice versa

Signed-off-by: sp98 <sapillai@redhat.com>
2023-10-30 11:46:00 +05:30
subhamkrai ef4dd76df1 pool: rbd cmd shouldn't use admin in external mode
when creating networkFence, rbd command was loading
admin config and hence running rbd command use client.admin
in case of external cluster also. With this commit instead
of client.admin user it will use what is being passed to
config.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-10-27 14:45:01 +05:30
travisn 0e0598c155 build: add go modules for apis subdir
To keep the go dependencies minimal, add the go packages
just for the pkg/apis directory. Projects that only reference
the rook apis can then have a smaller footprint for Go
dependencies.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-10-26 16:25:56 -06:00
travisn 80244fa6ba object: change is_master from string to bool
In Reef the is_master changed from a string to a bool
so we must update the type for proper json
serialization.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-10-25 15:26:17 -06:00
travisn a421143ddd Revert "core: use crash profile in crash daemon keyring"
This reverts commit fab23d3407.
The mgr requires rw access for the cron job that collects
the crashes.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2023-10-20 15:46:36 -06:00
Bin WangandTravis Nielsen 4a705b46b0 osd: print warning message if no matching node found for osd
As seen in https://github.com/rook/rook/issues/1988, it's a common
mistake to configure rook nodes with names that don't match Kubernetes's
node label. This PR prints more detailed message to help debugging
problem.

Signed-off-by: Bin Wang <bin.wang@mail.binwang.me>

Add break according to review comment

Co-authored-by: Travis Nielsen <tnielsen@redhat.com>

Update log message according to review comment

Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
2023-10-16 18:37:25 -04:00
Travis Nielsen 1dae1aa59e Merge pull request #13036 from BlaineEXE/test-notsecret
test: mark unit test secrets as not secret
2023-10-13 10:15:55 -06:00
Travis Nielsen 76e4464ab3 Merge pull request #12165 from cybozu-go/osd-prevent-to-fallback-to-lvm-mode-in-osd-on-lvm-creation
osd: prevent to fallback to lvm mode in osd on lvm creation
2023-10-12 11:08:51 -06:00
Travis Nielsen 75d8a79aac Merge pull request #13041 from iamniting/scc
Enhance SCC Function to Support Multiple Namespaces
2023-10-12 10:54:37 -06:00
Nitin Goyal 86afa591ba security: enhance SCC Function to Support Multiple Namespaces
Currently, the function receives a single namespace string and appends
it to the users. This approach is insufficient when dealing with
multiple CephClusters running in different namespaces, as there will be
only one SCC. This update modifies the function to create users for all
specified namespaces, ensuring compatibility with multiple namespaces.

Signed-off-by: Nitin Goyal <nigoyal@redhat.com>
2023-10-12 19:56:19 +05:30
Madhu Rajanna 9f2b7d572d csi: fix indentation for mountinfo
Fixed the indentation for the mountinfo
or else an emptyDir is getting created
for it.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-10-12 09:01:26 +02:00
Blaine Gardner 3c7499facf test: mark unit test secrets as not secret
There are 2 cases of randomly generated secrets copied into Rook's unit
test code that have been flagged by Gitleaks. Add a comment to both
cases to help the tool understand that these aren't real production
secrets -- just unit test stand-ins.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2023-10-11 16:42:29 -06:00
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 a48d5f2a80 Merge pull request #13031 from sp98/osd-script-update
osd: use bash script if restart interval is > 0
2023-10-11 11:47:27 -06:00
sp98 ffd69291f1 osd: use bash script if restart interval is > 0
If `FlappingRestartIntervalHours` for OSD is > 0 in the cephCluster CR,
then start OSD inside a bash script.

Signed-off-by: sp98 <sapillai@redhat.com>
2023-10-11 11:38:26 +05:30
travisn 5359c4f4f5 mon: write assimilate config to operator dir
The /tmp dir is not always available in some environments.
The only directories the operator should rely on
are the directories that are in its pod spec.
For assimilate-conf now we use the /var/lib/rook
directory to generate files since we know it is
a valid emptydir mounted into the operator pod.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-10-10 16:10:30 -06:00
Travis Nielsen 703f594f4c Merge pull request #12860 from parth-gr/mds-liveness
mds: improve the mds liveness probe calls
2023-10-10 08:21:00 -06:00
parth-gr 3d4036547c ci: check mds liveness probe unit test from the CI run
Signed-off-by: parth-gr <paarora@redhat.com>
2023-10-10 18:56:36 +05:30
Madhu Rajanna 54ce2a96da csi: add mountinfo path for cephfs daemonset
If mountinfo path is available cephcsi will
try to recover the fuse client. adding the
support for the same in Rook.

fixes: #13009

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-10-06 11:16:23 +02:00
Blaine Gardner 29fa7771f8 Merge pull request #12998 from travisn/exporter-logging
exporter: Change verbose info to debug logs
2023-10-05 11:28:45 -06:00
Eng Zer Jun 77bff6a07c core: remove redundant len check
From the Go specification [1]:

  "1. For a nil slice, the number of iterations is 0."
  "3. If the map is nil, the number of iterations is 0."

`len` returns 0 if the slice or map is nil [2]. Therefore, checking
`len(v) > 0` before a loop is unnecessary.

[1]: https://go.dev/ref/spec#For_range
[2]: https://pkg.go.dev/builtin#len

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-10-05 20:16:46 +08: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
parth-gr 2dd9b00ca3 mds: improve the mds liveness probe calls
Instead of checking the socket files for mds daemon,
check the mds daemon in fs maps

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

Signed-off-by: parth-gr <paarora@redhat.com>
2023-10-05 00:54:06 +05:30