As of Nautilus Ceph auto-tunes its osd_memory_target on the fly so we don't need to force it.
ROok does not support Mimic anymore so this can be removed.
Signed-off-by: Sébastien Han <seb@redhat.com>
In 1.3 we added support for the metadata pvcs, thus requiring the name
to be set on the templates to differentiate between data and metadata.
For backward compatibility we need to assume the template is for data
if it is not set.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
During cluster delection, the finalizer will not be removed until
all the PVCs are removed. Since this could wait for a long time,
as long as the deletion event is re-queued, we need to cancel
the goroutine that is watching for cluster deletion so it can
avoid running multiple goroutines as the event runs again
and again.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
When a cluster is requested for deletion there is no longer
a reason to monitor the cluster health such as whether mons
are in quorum, osds are up and in, or monitor the ceph status.
The cluster will wait potentially for a long time if the
PVCs are not deleted by the admin, therefore we stop monitoring
the cluster even before the finalizer is removed.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
If the admin key is available, set the external creds struct
to use that admin username and key instead of requiring the
callers to check every time if they should use the admin
key or the external key.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The Ceph version information is not needed to be passed
to the osd health checker since mimic support was dropped.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The ceph username is all that needs to be passed to the goroutines
that are monitoring the health of Ceph. This simplifies the
initialization of the goroutines.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The monitoring goroutines that check for mon and osd health,
the ceph cluster status, and the bucket provisioner should
only be started once for each cluster. Previous to this change
and since the controller runtime conversion the goroutines were
being started again every time a reconcile was run. This means
you could potentially have many goroutines monitoring the same
thing.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
This PR is for rebasing #4683 with master. With new controller runtime changes most the changes with #4683 got redundant.
Only valid change is waiting for all the object buckets to be cleaned up before removing the finalizer.
Co-authored-by: Elise Gafford <egafford@redhat.com>
Signed-off-by: Santosh Pillai <sapillai@redhat.com>
The operator continues to run even though the controller-runtime
failed to start. Since the controller-runtime is essential, the operator
is non-functional after that. It makes troubleshooting more difficult.
Closes: https://github.com/rook/rook/issues/5434
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
pg_num_min needs to be set on all new and existing rgw
metadata pools so the autoscaler won't immediately
increase the pg count. The pg_num_min was only being set
on existing pools and not on new pools.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
During cluster deletion, we currently only retry for a couple minutes
to wait for the pvcs to be deleted. After the timeout, we proceed
with the cluster deletion. To properly protect the pvcs for proper
cleanup, the finalizer should not be removed until the pvcs
are all confirmed to be deleted. In order to not block other cluster
events, we re-queue the deletion event to run again every 10s
until the pvcs are deleted or the finalizer is manually removed.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The controller setting for requeuing an event moved to the
opcontroller package and was no longer needed in the main
controller package.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
updated deployment strategy of provisioner
deployment to Recreate to avoid issue during
update, Recreate strategy will Kill all existing
pods before creating new ones.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
sometimes the kube schedular will schedule the
provisioner pod on the same node. it doesnot make
sense to have both provisioner pod running on the same
node, we need to set the pod anti affinity to make
sure that no provisioner pods runnings on the same
node.
Fixes: #5271
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
Because the secret is mounted and owned by root and the rgw is running
under the 'ceph' user then it cannot access it. So moving from 0400 to
0444 fixes the issue.
Closes: https://github.com/rook/rook/issues/5265
Signed-off-by: Sébastien Han <seb@redhat.com>
When a user or a bucket does not exist anymore, let's stop the reconcile
loop instead of waiting forever.
Also, unlink the user before deleting it otherwise the deletion fails.
Signed-off-by: Sébastien Han <seb@redhat.com>
When Rook-Ceph is connected to an external cluster and the admin tries
to create resources such as CephFilesystem or CephObjectStore, we must
create the rook-ceph-config secret so that the daemons can get their mon
information.
Closes: https://github.com/rook/rook/issues/5439
Signed-off-by: Sébastien Han <seb@redhat.com>
An OSD on a PVC when portable=false is assigned to a node
with a node selector. The same node assignment is expected
for the lifetime of the cluster. On subsequent reconciles,
the operator was looking up the node assignment from the
nodeName on the pod spec, which is not set if the pod is down.
The operator needs to retrieve the assignment from the
deployment spec node selector.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
ceph gid (167) provided as supplymentary group, so that all the mounts can
be accessed by the same. This is required for ssl certificate consumed by
the rgw server from ceph octopus onwards.
Closes: https://github.com/rook/rook/issues/5265
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
When an OSD pod is stuck in terminating state, there is no need
to check if the OSD is marked as out before force deleting.
As long as the osd is down we will force delete the pod.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
If ROOK_CSI_ALLOW_UNSUPPORTED_VERSION=false and the csi canary image
is set to quay.io/cephcsi/cephcsi:canary, the csi driver fails
to load as expected since it is not supported. But if the
flag is set to true, it is expected to allow the canary image
which isn't versioned. The supported version check was requiring
that the version be detected in the image.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
There are many duplicated code to judge whether an OSD is on PVC
or not. Instead, let's introduce a function for this purpose.
It can also be applied to the logic of judging whether an OSD
on PVC has metadata device or not.
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
provide an option to set PriorityclassName on the
CSI provisioner pods to avoid pod eviction, as the CSI provisioner
pods a critical in system for storage. the default value
for the CSI provisioner pods is set to system-cluster-critical.
provisioner pods are less priority than plugin pods.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
ceph mds deactivate is not valid command for Nautilus, changing the mechnaism of upgrading so that it can be done in the way Nautilus does it.
Closes: https://github.com/rook/rook/issues/5278
Signed-off-by: RAJAT SINGH <rajasing@redhat.com>
The operator settings can come either from the configmap, an
env var, or a default value. Knowing where the setting is loaded
from is an important detail to see in the log.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
cephcsi v2.1.1 is released with fix for xfs formatting
issue. This PR updates the cephcsi image version to
v2.1.1
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
If the OSD pod is portable and is on a failed node, the node
will be stuck indefinitely in the terminating state. The pod
can be force deleted in this scenario in order to allow the
underlying volume to be detached and then mounted on another
node.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>