Block devices can move between reboots. In corner cases, an OSDs block
device might move to a lower-indexed device while the previous device
does not exist. For example, an OSD on /dev/sde might move to /dev/sdd
on reboot if the original /dev/sdd died. There would be no /dev/sde
after that.
Users report that NVMe drives commonly change names, even when there are
no disk failures.
For these cases, ensure the activate script properly handles cases where
the previous disk is not present on the node and where the OSD is still
available on a different disk.
Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit f2304bf8b8)
fixing 'secert' to `secret` and adding workds like
`NotIn, addin` to skip work list.
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 85c25bbc6e)
Signed-off-by: subhamkrai <srai@redhat.com>
Since pacific is no longer supported, we can remove pacific specific
code.
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
(cherry picked from commit f776c0b35e)
LVM-based OSDs on PVCs are legacy and are not well tested.
Therefore, we add status to the cephcluster CR that at least
gives a clue that the OSDs should be replaced.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 3628e83892)
fix UpdateActiveMgrLabel to retry label update on failure. Previously,
the function always returned the current manager, even if update
failed, leading to inconsistent labels. This fix ensures retries on
failures.
Fixes: https://github.com/rook/rook/issues/13601
Signed-off-by: Redouane Kachach <rkachach@ibm.com>
(cherry picked from commit ee7c71c89e)
OSDs on LVM-mode PVCs are failing to come up and crashing
in the expand-bluefs init container. To avoid the crash
and allow the OSDs to start, a workaround was found to
simply remove that init container. Now we disable the
OSD resize for this case to avoid others hitting this
during upgrade as well.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit acd7b4faa0)
If device set names are duplicated, the OSDs will be very confused
when multiple OSDs attempt to be configured with the same
device set names. Updating the device set names does not help
get out of the error situation since the OSDs will also be
confused about which device set they belong to. The reconcile
must fail completely if the device set names are duplicated
to avoid this error scenario.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 7f68d8be38)
The key file deletion process is in the shell script commonly used by
all of encryption-open, encryption-open-metadata, and
encryption-open-wal init containers. The key file is deleted at the
encryption-open init container and encryption-open-metadata and
encryption-open-wal init containers are failed to open the key file.
The key file is in the /etc/ceph folder. Unless that folder is shared,
the key file anyway won't be available in the other init containers
even if it is not deleted by these init containers. And it will
naturally anyway be deleted after the init containers are
completed. So The key file deletion process in shell scripts is
unnecessary.
Fixes: #13737
Signed-off-by: Yuma Ogami <yuma-ogami@cybozu.co.jp>
(cherry picked from commit cdd655ed3f)
the labels listed under the 'monitoring' section are currently only
being applied to the rook-ceph-mgr ServiceMonitor. This change extends
those labels to also include the rook-ceph-exporter ServiceMonitor.
Fixes: https://github.com/rook/rook/issues/13774
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit 10e26709c4)
With the release of Reef v18.2.2 we update the default
recommended version of Ceph to fix the prometheus issues
seen with v18.2.1
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 026d745f8a)
During cluster creation, csi config map was first filled with
mon ips and without CSIDriverOptions.
This commit makes sure CSIDriverOptions are added at the begining
when the entry is first created.
Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit 330f604cca)
# Conflicts:
# pkg/operator/ceph/csi/cluster_config.go
# pkg/operator/ceph/csi/cluster_config_test.go
cephFs fencing needs more testing and bug fixes to make
it in production. We tried multiple fixes but still it need
more work. So, removing the cephfs networkFence realted code
will rever this commit when we start working on this again.
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit bd4250f56e)
earlier, we were only checking the specs of networkFence to see if
unfencing is done before proceeding with deletion but we should also
check the status of networkFence before proceeding with deletion.
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 0ace7cf8cf)
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)
Reduce CRD size by removing some descriptions for things that
(a) are long, (b) are repeated, and (c) are commong kubernetes types.
Remove the `Status` field from VolumeClaimTemplates (a.k.a. PVCs) in
types.go to remove all unnecessary status-related fields.
Use `yq` to go through generated `crds.yaml` to strip out descriptions
for well-known k8s types that are long and repeated where we can't
remove them from types.go. This is mostly placement descriptions and
volumeSource descriptions.
The overall `crds.yaml` file is reduced to less than 60% of its original
size.
Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
Co-authored-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit bd7477ec61)
# Conflicts:
# deploy/charts/rook-ceph/templates/resources.yaml
# deploy/examples/crds.yaml
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
previous code was calling the following command to create the
dashboard user:
> ceph dashboard ac-user-create <username> -i <password-file>
this works the first time when the user doesn't exist, however subsequent
calls for example when the password has changed or when the secret was
deleted from k8s, will not take place as this command will succeeded
because the user already exists but the password is not updated in
this case. The fix consists in adding an explicit call to the command:
> ceph dashboard ac-user-set-password <username> -i <password-file>
which ensures the password is updated correctly in the access control db
Fixes: https://github.com/rook/rook/issues/13594
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit cb028f3a28)
there was a bug in the code which doesn't
sets realm if we try to get the zonegoup
so because of that 1.12 this backport pr
for original change was not working
Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit a9c77280c6)
The changes made to cosi driver are reflected. Add the cosidriver crd to
predicate workflow.
Fixes: #12545
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
(cherry picked from commit 3da2331fa3)
For now we are using the operator namespace name
as the prefix for the csi driver, This PR provides
an option for the users if someone wants to have
their own prefix for the csi driver, if someone tries
to change the prefix for existing csi driver rook
operator will fail to reconcile the csi driver.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit c35a8532aa)
we dont set removeMgrDaemonConfiguration to true unless all the
delete operations went successfull.
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit 39c06d2fa5)
previously, the dashboard parameters supported by Rook were stored in the
daemon configuration section (mgr.X, for example). This differs from
Cephadm-based deployments, where all configurations are stored in the
global mgr configuration section. This variance could result in
configuration mismatches between the active and standby dashboards.
Furthermore, all Ceph dashboard documentation exclusively points to
the global mgr configuration section and makes no use of individual
daemons sections.
Fixes: https://github.com/rook/rook/issues/13577
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit 57e3937d40)
If migration of the OSDs is enabled, operator should wait
for the pgs to be clean after the all the OSDs have reconciled.
This will help add the exponential backoff for the operator
restarts when OSD migration is needed but PGs are still rebalancing the
data after last OSD migration.
Signed-off-by: sp98 <sapillai@redhat.com>
(cherry picked from commit 43d3bf147a)
The exporter pod is ephemeral and frequently being deleted
and re-created when ceph daemons are created. Therefore,
we need to skip reconciling based on the deletion
of the exporter deployment.
Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 995a64fb3a)
This commit adds the flexibility to configure
leader election flags as per the user
requirement and also keeps the existing values
as the default one.
resolve: #13475
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 9b418d24a1)
updating csi provisioner to 3.6.3 to
as we have a bug in 3.6.2
resolves: #13475
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 85b86efee1)