Commit Graph
3118 Commits
Author SHA1 Message Date
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
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 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
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
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
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
travisn 29fb879675 exporter: change verbose info to debug logs
Several messages were showing up in the operator log
more often than necessary, so let's change them to
debug level.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-10-04 12:45:39 -06:00
Blaine Gardner e74333ddcd Merge pull request #12633 from thotz/cosi-user-creation
object: create cosi user for each object store
2023-10-04 10:05:36 -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
travisn fab23d3407 core: use crash profile in crash daemon keyring
The ceph documentation indicates to use the crash profile
instead of specifying rw for the mgr access.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-09-28 11:43:01 -06:00
Travis Nielsen 33fb7b801b Merge pull request #12926 from rkachach/fix_issue_12876
mgr: adding support for prometheus endpoint configuration
2023-09-27 08:09:13 -06:00
Redouane Kachach c763935436 mgr: adding support for prometheus endpoint configuration
Using the new configuration parameters prometheusEndpoint and
prometheusEndpointSSLVerify users can configure dashboard to
point to their prometheus instance.

closes: #12876

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-09-27 11:07:18 +02: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
subhamkrai 2a5ba8e998 build: upgrade controller runtime to 0.16
This commits upgrade the controller runtime version
from v0.15.1 to v0.16.0 and also adding the changes force by
new version.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-09-20 13:02:38 +05:30
Jiffin Tony Thottan a941b3c33f object: create cosi user for each object store
Create each cosi user for each object store and secret which holds
credentials.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-09-19 13:48:58 +05:30
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 a3dafbe9cf Merge pull request #12715 from sp98/osd-sleep
osd: make osd pod to sleep when osds are flapping
2023-09-15 12:24:08 -06:00
sp98 4eb9f62205 osd: make osd pod to sleep when osds are flapping
When OSDs flap, ceph stops the OSD daemon if its marked down greater than
5 times in 600 seconds. But OSD pod restarts and marks the OSD `up` again.
This causes the PGs mapped to these OSDs to peer. While the PGs are peering,
IO to these PGs are blocked.

So we need to ensure that if ceph is marking OSD `down` due to flapping, OSD pod
should not restart to mark the OSDs `up` again.

This PR adds a sleep to the OSD pod if the container returned with a 0 exit code
Default behavior is to sleep for 6 hrs. But user can configure it from the
ceph cluster spec.

Signed-off-by: sp98 <sapillai@redhat.com>
2023-09-15 22:59:46 +05:30
travisn 66547d27be mgr: allow more than two mgrs
While two mgrs is considered sufficient, more mgr daemons are
now allowed in case the admin wants even more fault tolerance
to the active mgr going down, in case multiple mgrs go down.
Up to five mgr pods will be allowed. All mgrs will be in
standby mode except one active mgr. All mgr pods have a sidecar
that will update their respective pod specs with the active
or passive label.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-09-14 13:29:11 -06:00
Matthew Penner d09a43df37 exporter: bind to all interfaces if IPv6 is enabled
Previously ceph-exporter would only bind to IPv4 interfaces. Now if the
CephCluster is configured with `dualStack: true` and/or `ipFamily: IPv6`
an additional flag (`--addrs ::`) will be added to the ceph-exporter
container to make it listen both IPv6 and IPv4 interfaces.

Signed-off-by: Matthew Penner <me@matthewp.io>
2023-09-12 11:39:46 -06:00
Sebastian Hasler 041fc1a71c object: unique username for OBC even when preceding OBC was retained
For an OBC's name we cannot simply use the OBC's namespace and name,
because they can be reused, while the preceding bucket might be
retained by reclaimPolicy. (Commit 2733375ca4 also didn't solve
this issue, as it is an intra-cluster issue.) Therefore we instead
use the OBC's UID which should be unique within the cluster and
across clusters.

Signed-off-by: Sebastian Hasler <sebastian.hasler@stuvus.uni-stuttgart.de>
2023-09-11 23:31:39 +02:00
Blaine Gardner 17f0072d9d Merge pull request #12778 from BlaineEXE/multus-allow-cidr-spec
multus: allow using NADs without inspectable CIDRs
2023-09-07 13:42:41 -06:00
Blaine Gardner 3c43268d0a multus: detect network CIDRs via canary
Change how Rook detects network CIDRs for Multus networks. The IPAM
configuration is only defined as an arbitrary string JSON blob with a
"type" field and nothing more. Rook's detection of CIDRs for whereabouts
had already grown out of date since the initial implementation.
Additionally, Rook did not support DHCP IPAM, which is a reasonable
choice for users. And more, Rook did not support CNI plugin chaining,
which further complicates NADs. Based on the CNI spec, network chaning
can result in any changes to network CIDRs from the first-given plugin.

All these problems make it more and more difficult for Rook to support
Multus by inspecting the NAD itself to predict network CIDRs. Instead,
it is better for Rook to treat the CNI process as a black box. To
preserve legacy functionality of auto-detecting networks and to make
that as robust as possible, change to a canary-style architecture like
that used for Ceph mons, from which Rook will detect the network CIDRs
if possible.

Also allow users to specify overrides for CIDR ranges. This allows Rook
to still support esoteric and unexpected NAD or network configurations
where a CIDR range is not detectable or where the range detected would
be incomplete. Because it may be impossible for Rook to understand the
network CIDRs wholistically while residing only on a portion of the
network, this feature should have been present from Multus's inception.

Improving CIDR auto-detection and allowing users to specify overrides
for auto-detected CIDRs rounds out Rook's Multus support for CephCluster
(core/RADOS) installations. No further architectural changes should be
needed for CephClusters as regards application of public/cluster network
CIDRs for Multus networks.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2023-09-07 10:12:55 -06:00
Louis Bailleul e56122cbce operator: config default interval value for discovery daemon
Correctly set discoveryInterval default value by passing defaultDiscoverInterval to k8sutil.GetValue
Allow to set ROOK_DISCOVER_DEVICES_INTERVAL env var through discoveryDaemonInterval helm value

Signed-off-by: Louis Bailleul <louis.bailleul@pgs.com>
2023-09-07 10:28:13 +01: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
Travis Nielsen ded675e758 Merge pull request #12825 from weirdwiz/service-monitor-port
monitoring: set port for servicemonitor for ceph-exporter
2023-09-01 11:58:41 -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
Travis Nielsen 3f67a7861f Merge pull request #12791 from subhamkrai/restart-ceph-pods
core: restart ceph daemons when network updated
2023-09-01 08:42:08 -06:00
Travis Nielsen dadf2e5b84 Merge pull request #12487 from subhamkrai/enable-addons-sidecar
csi: enable csi-addons-side when crds are deployed
2023-09-01 07:23:41 -06:00
Divyansh Kamboj 708dd29a97 monitoring: set port for servicemonitor for ceph-exporter
ceph-exporter's ServiceMonitor and Service CRD contain different port
name, which results in no metrics being collected by prometheus.

this commit makes GetCephMonitor configurable, which we use to set
consistent port names in ServiceMonitor and Service for ceph-exporter.

Signed-off-by: Divyansh Kamboj <dkamboj@redhat.com>
2023-09-01 12:56:53 +05:30
subhamkrai 29d2b6a071 core: restart ceph daemons when network updated
We need to restart all the ceph daemons whenever
cephCluster network settings are modified like
requiremsgr2, encryption and compression. This
required for Ceph to consider the new settings
it require new ceph daemons all over.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-09-01 11:30:48 +05:30
Travis Nielsen 35a86d4373 Merge pull request #12804 from thotz/check-owner-bucket-exist-grant
object: avoid creating same bucket for two different OBC
2023-08-31 15:09:46 -06:00
subhamkrai a755ec156a csi: enable csi-addons-side when crds are deployed
when deploying csi, we'll check if csi-addons crds
are deployed we'll enable csi-addons sidecar by default.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-08-31 11:28:49 +05:30
Jiffin Tony Thottan b39e813290 object: avoid creating same bucket for two different OBC
If bucket exists for Provision(), then check whether user in the OBC and
owner of bucket are same.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-08-28 18:19:24 +05:30
Madhu Rajanna eb304a5073 core: return valid CIDR ip
we need to return a valid CIDR IP
to get it fenced properly, the previously
returned one was like `10.63.0.5:0/32` which
is not a valid CIDR, removing `:0` to look like
proper IP CIDR.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-08-28 10:58:16 +02:00
travisn 2b1cc4c7b8 object: allow creating an object user in different namespace
The object user was previously required to be created in the
same namespace as the object store and the cluster. Now,
the object user can be reconciled even in a different namespace
from the cluster and object store. The namespace would be specified
in the object user CR.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-08-25 11:54:57 -06:00