Commit Graph
10763 Commits
Author SHA1 Message Date
sp98 b0cb722638 mon: set mon pdb max unavailable as 2 in case of 5 or more mons
If the spec.mon.count is 5 or more, then create
mon pdbs with maxUnavailable count as 2. We can
afford to have more than 1 mons down while
draining the nodes in this case.

Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit a4866b4b06)
2024-02-20 19:29:36 +00:00
Travis Nielsen f9cdbbd06a Merge pull request #13783 from rook/mergify/bp/release-1.13/pr-13780
External: fix syntax error import-external-cluster.sh (backport #13780)
2024-02-16 12:17:55 -07:00
Tim Olow 49dd36f2eb external: update import-external-cluster.sh
Removed = that was preventing the import-external-cluster.sh script from
importing external ceph cluster into k8s.

Fixes https://github.com/rook/rook/issues/13679

Signed-off-by: Tim Olow <tim@eth0.com>
(cherry picked from commit 7dcffae3f7)
2024-02-16 18:23:36 +00:00
mergify[bot] 749369e4a0 Merge pull request #13771 from rook/mergify/bp/release-1.13/pr-13768
core: Continue processing PVs for network fencing when no node IPs found (backport #13768)
2024-02-14 19:31:13 +00:00
Madhu Rajanna 1149d91a48 core: retry other pvc if active client not found
retry other cephfs/rbd pvc if there
are no active clients found on ceph cluster.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit ca21bd9715)
2024-02-14 18:57:11 +00:00
Madhu Rajanna c9b2e9f6af core: use error wraping in fenceCephFSVolume
to keep the code consistent and to propogate
more details about error rook uses error wraping.
updating current code whereever its required to
wrap the details.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit eb97390df2)
2024-02-14 18:57:11 +00:00
Madhu Rajanna 3a5eb389e2 core: fix cephfs pvc network fencing
The cephfs PVC might exist on the kubernetes
node object but due to some timing issues the
ip might not be visible on the ceph cluster or
the client might already got evicted or disconnected
from ceph cluster. In this case we will not be
able to get IP details for the subvolume and we dont
have any check for empty ip's in the code and rook
tries to create NetworkFence CR with empty Ip's
and the NetworkFence will get moved to the Failed state.
This PR adds the necessary check and logging to prevent
this one.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 0e115c44bf)
2024-02-14 18:57:11 +00:00
Travis Nielsen f6751d75ce Merge pull request #13767 from rook/mergify/bp/release-1.13/pr-13718
core: Delete networkFence CRs during cluster removal (backport #13718)
2024-02-13 21:18:00 -07:00
Travis Nielsen 3e83416fe1 Merge pull request #13764 from rook/mergify/bp/release-1.13/pr-13741
mgr: remove privileged security context from mgr sidecar container (backport #13741)
2024-02-13 15:51:36 -07:00
subhamkrai 01142d56d4 core: remove namespace/ownerRef from networkFence
since networkFence is a cluster-based resource so that we don't need
the namespace and ownerReferences as it cause garbage-collector errors.
Also, now we create the networkFence with clusteUID label so when doing
cleanup we match the cephCluster uid and networkFence label clusterUID.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 5bff860380)
2024-02-13 21:56:34 +00:00
Travis Nielsen 42e8e8b580 Merge pull request #13762 from rook/mergify/bp/release-1.13/pr-13693
Disallow legacy hostNetwork  together with  non-default provider (backport #13693)
2024-02-13 09:56:42 -07:00
Redouane Kachach f6458e91ae mgr: remove privileged security context from mgr sidecar container
Mgr sidecar was using a privileged security context because it needed
to create the /var/lib/rook directory, generate the config on it, and
then copy it to the /etc/ceph directory. This change creates empty
directories on /var/lib/rook and /etc/ceph so the mgr sidecar can use
them, removing the need for using a privileged security context.

Fixes: https://github.com/rook/rook/issues/13719

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit db4b3322fa)
2024-02-13 14:59:52 +00:00
Michael Adam 824626d3e5 network: disallow legacy hostNetwork together with non-default provider
Fixes: #13692

Since the introduction of the "host" network provider, the  legacy
"hostNetwork" setting is intended to be used only in combination with
the default network provider (""), but the code did not enforce this.

This change adds the required validation checks to throw errors
in invalid constellations.

These checks are added both in the operator's input  validation code
and as kubernetes x-validation admission policies in the Cepcluster CRD.

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 25aa15e6c1)
2024-02-13 14:15:00 +00:00
Michael Adam bc44e4c164 ci: add "network" to the allowed commit message prefixes
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit c38612c280)
2024-02-13 14:14:59 +00:00
mergify[bot] cd11d3c0c3 Merge pull request #13742 from rook/mergify/bp/release-1.13/pr-13736
csi: update cephcsi image to 3.10.2 (backport #13736)
2024-02-09 18:52:35 +00:00
Madhu Rajanna c6c2cdfa29 csi: update cephcsi image to 3.10.2
Updating the cephcsi image to 3.10.2
which is the latest released one.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit c22597a32c)
2024-02-09 18:21:53 +00:00
mergify[bot] 1278a78188 Merge pull request #13733 from rook/mergify/bp/release-1.13/pr-13314
osd: support create osd with metadata partition (backport #13314)
2024-02-08 23:35:43 +00:00
Liang Zheng d13cc7731d osd: support create osd with metadata partition
Currently, when rook provisions OSDs(in the OSD prepare job), rook effectively run a
c-v command such as the following.
```console
ceph-volume lvm batch --prepare <deviceA> <deviceB> <deviceC> --db-devices <metadataDevice>
```
but c-v lvm batch only supports disk and lvm, instead of disk partitions.

We can resort to `ceph-volume lvm prepare` to implement it.

Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
(cherry picked from commit ee05e82cea)
2024-02-08 21:21:05 +00:00
Travis Nielsen 11800bb395 Merge pull request #13732 from travisn/release-1.13.4
build: Update the release version to v1.13.4
v1.13.4
2024-02-08 13:20:31 -07:00
travisn 0c32fa3dd1 build: update the release version to v1.13.4
For the patch release update the examples and docs
to v1.13.4.

Signed-off-by: travisn <tnielsen@redhat.com>
2024-02-08 12:36:38 -07:00
Travis Nielsen 8335a9923a Merge pull request #13731 from rook/mergify/bp/release-1.13/pr-13728
core: remove ownerRef from networkFence (backport #13728)
2024-02-08 12:07:56 -07:00
mergify[bot] 94eb35e6d0 Merge pull request #13729 from rook/mergify/bp/release-1.13/pr-13722
helm: Remove cpu limits from all pods (backport #13722)
2024-02-08 18:33:58 +00:00
subhamkrai 0113cc85c5 core: remove ownerRef from networkFence
since networkFence is a cluster-based resource so that we don't need
the namespace and ownerReferences as it cause garbage-collector errors.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 2ac418a3b2)
2024-02-08 18:27:28 +00:00
travisn 952b705ffc helm: remove cpu limits from all pods
When CPU requests and limits are assigned to a pod,
the pod will be guaranteed the requests, up to the limits.
Even if there are spare CPU cycles, the pod cannot use
them. Thus, pods can be unnecessarily denied compute
when they need to burst if the limits are set.

Therefore, it is not recommended to set CPU limits
since the CPU requests are already guaranteeing that
no pod will be starved at least for its requests.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 27265ff279)
2024-02-08 18:00:33 +00:00
mergify[bot] 1c0b68ab30 Merge pull request #13713 from rook/mergify/bp/release-1.13/pr-13673
osd: correct counting the devices when metadataDevice is set (backport #13673)
2024-02-08 00:33:45 +00:00
Satoru Takeuchi 0c3de73bdb osd: correct counting the devices when metadataDevice is set
The validation logic of checking the number of devices is
wrong when `metadataDevice` is set and `osdsPerDevice` > 1.
`len(cvReports)` is the expected number of OSDs and is
the number of specified data devices multiplied
by `osdsPerDevice`.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
(cherry picked from commit 753bbfe1c4)
2024-02-08 00:04:02 +00:00
Travis Nielsen bcb43028a6 Merge pull request #13721 from rook/mergify/bp/release-1.13/pr-13720
docs: fix CephCluster.spec.cephVersion.imagePullPolicy list item (backport #13720)
2024-02-07 14:46:45 -07:00
Joshua Hoblitt f30f34922c docs: fix CephCluster.spec.cephVersion.imagePullPolicy list item
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit a670fd9671)
2024-02-07 21:09:58 +00:00
Travis Nielsen 0c0e202d81 Merge pull request #13710 from rook/mergify/bp/release-1.13/pr-13511
core: set blocking PDB even if no unhealthy PGs appear (backport #13511)
2024-02-06 12:41:34 -07:00
Ryotaro Banno f4291a3e0a core: set blocking PDB even if no unhealthy PGs appear
When `managePodBudgets` is enabled, the Rook operator sets a blocking
PDB by considering the failure domains of the OSDs. This functionality
is implemented by `reconcilePDBsForOSDs`, and it sets the PDB only after
unhealthy PGs appear. However, there are no unhealthy PGs when an OSD
with no PGs becomes down. In this case, the PDB is never enabled.

This PR makes the operator configure the blocking PDB without waiting
for the unhealthy PGs to appear. This PR solves the above problem
because the blocking PDB is always enabled when a down OSD is detected.

Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
(cherry picked from commit 6def9c8e30)
2024-02-06 18:47:17 +00:00
mergify[bot] 9221e5910c Merge pull request #13688 from rook/mergify/bp/release-1.13/pr-13615
csi: update network fence CR name (backport #13615)
2024-02-06 18:34:27 +00:00
Travis Nielsen 73e2fdb34f Merge pull request #13682 from rook/mergify/bp/release-1.13/pr-13652
core: Skip reconcile if override configmap is empty (backport #13652)
2024-02-06 11:34:12 -07:00
Travis Nielsen d55c2663c5 Merge pull request #13689 from rook/mergify/bp/release-1.13/pr-13623
object: add check specific to name and namespace for ceph cosi driver (backport #13623)
2024-02-06 11:33:29 -07:00
travisn 285d5fcabf core: skip reconcile if override configmap is empty
If the configmap rook-config-override is empty,
there is no need to trigger the reconcile to update
the ceph daemons. This configmap update is causing
unnecessary reconciles periodically in some clusters
even when it is empty.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 0240ee8563)
2024-02-06 17:49:26 +00:00
Riya Singhal 49aa21c93c csi: update network fence CR name
this commit updates the name of network fence CR to
node name + driver name, which will allow the creation of
multiple network fence per drivers on the same node, and
modifies the unit test and deletion procedure for the
same.

Signed-off-by: Riya Singhal <rsinghal@redhat.com>
(cherry picked from commit c2e3cf367c)
2024-02-06 17:48:53 +00:00
Jiffin Tony Thottan fb9befd501 object: add check specific to name and namespace for ceph cosi driver
The name for cephcosi driver should be ceph-cosi-driver and namespace
should same as the rook operator. Otherwise request need to be failed.

Fixes: #13025
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
(cherry picked from commit 5b5e1c0292)
2024-02-06 17:48:34 +00:00
Travis Nielsen 97ecfb9a76 Merge pull request #13709 from rook/mergify/bp/release-1.13/pr-13699
test: use mounter kernal instead of fuse (backport #13699)
2024-02-06 07:56:26 -07:00
subhamkrai 6887958c67 test: use mounter kernal instead of fuse
this kernal version is greater than 5.11 let's
use mounter kernal instead of fuse.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit abc272c91c)
2024-02-06 14:17:32 +00:00
subham rai 2383442d16 Merge pull request #13706 from rook/mergify/bp/release-1.13/pr-13697
ci: remove `/dev` prefix from the `TEST_SCRATCH_DEVICE`  and `deviceFilter` spec. (backport #13697)
2024-02-06 17:18:55 +05:30
sp98 ba470a54dd ci: fix ci failure for multicluster tests
This PR fixes the failure while running multicluster mirroring CI tests

Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit 45adae1931)
2024-02-06 10:42:44 +00:00
Travis Nielsen b084598802 Merge pull request #13696 from rook/mergify/bp/release-1.13/pr-13694
ci: fix detection of GH actions extra disk (backport #13694)
2024-02-05 20:03:03 -07:00
Blaine Gardner 5e53ce16a6 ci: fix detection of GH actions extra disk
The 'extra' block device attached to GH actions runners has changed size
twice in 3 months. The previous strategy of detecting the disk by size
is becoming harder to maintain. Additionally, the block size with recent
changes (75G) is now the same as the boot device (also 75G), making the
method inexact.

The method can now be summarized as, "find the boot disk and choose the
disk that isn't the boot disk to be the 'extra' one used."

Prior to this, we used a one-liner based on `lsblk`. While we could
still make this a one-liner, the method is now updated to 2 effective
lines, plus debug text output to stderr to help if we need to debug
further in the future.

Of note, the 'extra' disk has a mount point of "/mnt", but it is unclear
whether this is a reliable heuristic for detecting the extra disk. For
years now, GH action runners have had only 2 disks. Therefore, it seems
slightly more likely that a heuristic to "choose the non-boot disk" will
be a more robust long-term solution.

If this strategy proves to be unreliable in the future, it may be wise
to consider whether "the device with a partition mounted to '/mnt'"
would be a good alternative.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit feacb6424e)
2024-02-06 02:10:55 +00:00
Travis Nielsen 68b17e05ef Merge pull request #13691 from rook/mergify/bp/release-1.13/pr-13675
ci: disk in github action increased to 75G from 64G (backport #13675)
2024-02-05 19:08:43 -07:00
subhamkrai 7f2b60681d ci: disk in github action increased to 75G from 64G
the disk size in the github action machine has
increased from 64G to 75G. Now, we detech the version
automatically not fetching hard coded value.

Co-authored-by: Jan Klippel <jan.klippel@uhurutec.com>
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 6b0deb32d9)
2024-02-05 17:29:54 +00:00
Blaine Gardner 964d38c686 Merge pull request #13671 from rook/mergify/bp/release-1.13/pr-13670
ci: check for gofmt usage in golangci-lint (backport #13670)
2024-02-01 17:42:18 -07:00
Blaine Gardner 8d3e6f2dc5 ci: check for gofmt usage in golangci-lint
This is needed because not all contributors may be using gomft to format
source code, and this could result in inconsistent usage over time.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit c98ce0a56b)
2024-02-01 19:13:09 +00:00
Travis Nielsen 2b876080ec Merge pull request #13668 from rook/mergify/bp/release-1.13/pr-13653
exporter: Don't delete exporter service on daemon deletion (backport #13653)
2024-02-01 10:17:05 -07:00
Travis Nielsen d1a6ebdf5a Merge pull request #13669 from rook/mergify/bp/release-1.13/pr-13663
csi: Fix NetNamespaceFilePath generation with namespace instead of name (backport #13663)
2024-02-01 10:16:45 -07:00
Praveen M e596f31cf0 csi: fix NetNamespaceFilePath generation
Corrected the NetNamespaceFilePath generation in the
subvolumegroup & radosnamespace controller by replacing
the cephCluster.Name with cephCluster.Namespace.

Signed-off-by: Praveen M <m.praveen@ibm.com>
(cherry picked from commit 67ff924b57)
2024-02-01 16:33:34 +00:00
travisn af513df7c4 exporter: dont delete exporter service on daemon deletion
The exporter service and service monitor should not
be deleted if an individual daemon is being removed
from a node. As long as the exporter is enabled with
v18 and newer, the exporter service and service monitor
should exist. Clusters were seeing their metrics stop
collection when the exporter service and service monitor
would disappear, especially when multiple clusters are
configured.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit a1fc70f2fc)
2024-02-01 16:31:54 +00:00