this commit deletes csi operator CR's when
user wants to revert back to csi driver for
some reasons. This commits deletes CR's like
`clientProfile, cephConnection, driver,
operatorConfig, and clientProfileMapping`.
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 3b7a7b8958)
this commit add watcher for cm `rook-ceph-operator-config`
to look for updated value of `ROOK_USE_CSI_OPERATOR` before
adding this watcher we had to restart rook operator pod
so that it reconciles and create cephConnection CR.
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit dd6693ff97)
If the ROOK_USE_CSI_OPERATOR setting is not found in the
rook-ceph-operator-config configmap, the default now
is to use the csi operator instead of the previous
csi driver
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit b2b28e1280)
If the network is encrypted with msgr2, cephfs requires
the mount options to include ms_mode=secure. Now this
will be set by default if the mount options are not
already set in the cephcluster CR or the operator env
var CSI_CEPHFS_KERNEL_MOUNT_OPTIONS.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 6309cd367e)
If the cephfs kernel mount options are not specified in the
cephcluster.spec.csi CR settings, fall back to the setting
in the operator env var CSI_CEPHFS_KERNEL_MOUNT_OPTIONS.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit eeebfbf496)
The csi client profile CR needed to be updated if
the spec changed. Previously, the client profile was never
being updated because it was calling Update() on the
existing CR retreived from Get(), rather than with
the updated spec.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit cc39368964)
Fix a wrong usage of the CephX daemon config that should be CephX CSI
config.
Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 480b407bc2)
The driver names were only being initialized in certain code paths
where the drivers were being started and stopped. However, another
code path relied on those names being set. Now, we initialize the
driver names every time the CSI params are initialized, instead of
initializing the names separately.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit af548ef2f6)
The csi read affinity requires the crush topology labels
to be specified in the cephconnection CR. If they are
not specified by the user, rook can generate the default
topology labels instead of expecting them.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 79e067ec05)
The securityContextConstraints require setting whether
host networking and host port access is needed by the
ceph cluster service accounts. The helm chart now allows
enabling this mode with the settings:
rook-ceph chart: useOperatorHostNetwork: true
rook-ceph-cluster chart: cephClusterSpec.network.provider: host
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 82262a8472)
Add a minimally useful document explaining how to initiate CephX key
rotation for users.
Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 52255e314c)
Allow Rook to rotate CephX keys for Ceph v19.2.3 and up with the
exception of Ceph mons. While v19.2.3 has the `ceph auth rotate` command
that Rook needs to perform key rotation, there is still ongoing work in
Ceph to change how the `mon.` key is tracked internally. Rook's mon key
rotation requires those currently-unreleased Ceph changes.
Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit a952b7511a)
Cleanup up overall usage of CephX statuses in CephCluster.
Convert all CephX statuses to non-pointer types. There is no specific
need for pointer types, and keeping these as non-pointers means there is
not a risk of nil pointer exceptions in all the various Rook controllers
for upgraded clusters.
Move initialization of CephCluster CephX status items to
`preMonStartupActions()`. This helps resolve 2 issues:
1. 'Uninitialized' state was being set for external CephClusters where
CephX statuses are not relevant.
2. 'Uninitialized' state was being set for upgraded clusters whose key
status cannot be determined.
Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 2fd9c9a88c)
this commit add check to only run the csi-operator in
all the canary tests and upgrade suite only, other suite
like smoke and object will still test csi-driver.
Also, adding changes to make CI happy.
Signed-off-by: subhamkrai <srai@redhat.com>
Co-Authored-by: Travis Nielsen <tnielsen@redhat.com>
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit c57a47f774)
this commits enable the csi-operator by default,
moving it from experimental to stable.
Also, disable the csi-operator chart from generating
rbac in common.yaml
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 506ac2a3ff)
Rotate fs mirror daemon cephx keys based on the cephXconfig in the
cephcluster spec and also update the fs mirror status with the latest
cephxStatus
Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit 8df6b8d0d0)
With the csi operator becoming the default for deployment,
the docs are now updated with the details in the quickstart
guide and upgrade guide to help with the transition.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit b856338c5e)
The CSI operator requires the SecurityContextConstraints to
be configured for the service accounts that have a different
name from the previous CSI driver, both via the manifest install
and the helm install.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit cb6da09a44)
When removeing CephBlockPool check first that related ceph pool is exist in cluster,
since it may be manually removed by mistake.
Related-Issue: #16328
Signed-off-by: Denis Egorenko <degorenko@mirantis.com>
(cherry picked from commit c9e0f89a8b)
rotate mon daemon keys and update the cephx status for mons in the
cephcluster resource.
Signed-off-by: Santosh Pillai <sapillai@redhat.com>
(cherry picked from commit fe42fe102f)
There is a field in the CR spec to override
the name and the feature was not implement,
This commits adds the support to override the
cephclient name if ever required.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit a71cc27b72)
the CR cannot be created without a Name,
Removing the check as it never gets executed.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 36c84aa43c)