Commit Graph
1424 Commits
Author SHA1 Message Date
Travis Nielsen 65377cbe63 ceph: osd on pvc node assignment is node selector
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>
2020-05-07 10:51:46 -06:00
Sébastien Han 2e5d6c749e Merge pull request #5362 from thotz/ssl_regression_rgw
objectstore: Add ceph group to FsGroup
2020-05-07 17:18:49 +02:00
Jiffin Tony Thottan 68fc50686a objectstore: Add ceph group as FsGroup
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>
2020-05-07 18:37:36 +05:30
Sébastien Han 228041902b Merge pull request #5406 from cybozu-go/ceph-cleanup-osd-on-pvc
ceph: judge whether an OSD is on PVC or not by function
2020-05-07 09:13:39 +02:00
Travis Nielsen 1e50ca374b Merge pull request #5414 from travisn/force-osd-delete-if-not-out
Delete terminating osd pods even if not out
2020-05-06 17:53:45 -06:00
Travis Nielsen 3c6bae56b7 ceph: delete terminating osd pods even if not out
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>
2020-05-06 15:43:04 -06:00
Travis Nielsen b375e81c37 ceph: allow csi driver version to be undetected
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>
2020-05-06 12:36:10 -06:00
Satoru Takeuchi 417ea131bc ceph: judge whether an OSD is on PVC or not by function
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>
2020-05-07 00:49:17 +09:00
Travis Nielsen f82a07d441 Merge pull request #5394 from Madhu-1/csi-prio
CSI: Set PriorityClassName for CSI pods
2020-05-06 07:08:54 -06:00
Madhu Rajanna ec3ab55d94 CSI: Set PriorityClassName for CSI provisioner pods
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>
2020-05-06 15:45:06 +05:30
Madhu Rajanna cc6ec58891 CSI: Set PriorityClassName for CSI plugin pods
provide an option to set Priorityclassname on the
CSI plugin pods to avoid pod eviction, as the CSI plugin pods are
critical in system for storage. the default value
for the CSI plugin pods is set to system-node-critical.
more info can be found at
https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-05-06 15:45:01 +05:30
Sébastien Han 7589573e0b Merge pull request #5405 from travisn/operator-setting-logging
Log the operator settings and their source
2020-05-06 11:27:04 +02:00
Sébastien Han cecbfcfba6 Merge pull request #5372 from leseb/obc-independent-mode
ceph: add support for OBC on external cluster
2020-05-06 10:30:15 +02:00
Travis Nielsen cd806c83ee ceph: log the operator settings and their source
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>
2020-05-05 13:10:01 -06:00
Madhu Rajanna 73c74d8a42 CSI: Update CSI version to v2.1.1
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>
2020-05-05 13:08:23 +05:30
Sébastien Han b86bb9c528 ceph: add support for OBC on external cluster
We can now consume an external s3 endpoint which is not managed by Rook.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-05-04 18:14:26 +02:00
Travis Nielsen c713fd30f9 ceph: restart portable osd pod if stuck
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>
2020-04-30 09:52:54 -06:00
Sébastien Han 1ea73ce123 Merge pull request #5364 from Madhu-1/err-cleaup
cleanup: use err.Wrap when the formatting is not required
2020-04-30 15:57:27 +02:00
Dmitry Yusupov 9b6c1ede66 Merge pull request #5360 from dyusupov/master
edgefs: provide a way to configure ADS
2020-04-29 09:27:56 -07:00
Travis Nielsen f8e884d2ce Merge pull request #5287 from Madhu-1/resource-limit-csi
CSI: Add resource request and limit for CSI pods
2020-04-29 08:09:19 -06:00
Madhu Rajanna 81688398f2 cleanup: use err.Wrap when the formatting is not required
Replaced err.Wrapf with err.Wrap when the formatting
is not required.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-04-29 17:42:59 +05:30
Madhu Rajanna 4065217913 CSI: use warning if the formatting is not required
If the formatting is not required use warning
instead of warningf

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-04-29 10:26:56 +05:30
Madhu Rajanna 050fb2c616 CSI: code changes to apply resource to container
Update CSI spec code to fetch the resources from the
configmap or ENV and apply the specific resources
to the cephfs,rbd and kubernetes sidecar containers.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-04-29 10:26:51 +05:30
Dmitry Yusupov 2746b2edee edgefs: provide a way to configure ADS
Signed-off-by: Dmitry Yusupov <dmitry.yusupov@nexenta.com>
2020-04-28 14:58:40 -07:00
Madhu Rajanna 1bb5e1bab2 k8sUtil: Add YamlToContainerResource to resource
YamlToContainerResource can be used to convert the raw
string data to the array of ContainerResource.
the ContainerResource can be applied to the
pod container resources request and limits.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-04-28 13:13:31 +05:30
Sébastien Han f27fd207ce ceph: convert the CephCluster controller to the controller-runtime
This is the final conversion to controller-runtime conversion. This time the
CephCluster CRD has been converted to use the controller-runtime
library.
The controller incorporates all the previous watchers too, so the Node
and hot-plug configmap are been watched too.
Only the operator setting configmap is not being watcher since it's not
related to the CephCluster CRD.
Not only the patch converts to controller-runtime but also tries to
re-organize the tree of the repo to actually make the code more
readable and have better functions/methods/tests separations.

Closes: https://github.com/rook/rook/issues/4939
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-28 09:40:35 +02:00
Travis Nielsen 10d5631fee Merge pull request #5246 from ashangit/rm_rgw_on_mon_config_db
ceph: remove specific rgw configuration on mon configuration database
2020-04-27 08:20:54 -06:00
n.fraison 9c6ef9c278 ceph: remove specific mds configuration on mon configuration database
Remove specific mds config added to the mon configuration database when deleting a CephObjectstore
or when scaling down number of mds
Also remove mds CephX key

Signed-off-by: n.fraison <n.fraison@criteo.com>
2020-04-26 11:15:27 +02:00
Travis Nielsen 8727807e49 Merge pull request #5321 from cybozu-go/ceph-some-minor-fixes
update documents and cleanup code
2020-04-24 12:57:15 -06:00
Satoru Takeuchi f78efc50aa cleanup: use the constants of environment variables properly
There are some code where constants of environment variables
are defined but not used properly. Let's avoid to use string
literals as possible.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-04-24 17:31:00 +00:00
Travis Nielsen 5789c2b197 Merge pull request #5289 from Madhu-1/csi-v2.1.0
CSI: update cephcsi to v2.1.0
2020-04-23 07:49:23 -06:00
Travis Nielsen 8d72e788c1 ceph: lookup of the cluster cannot rely on namespace name
The name of a CephCluster is commonly the same as the namespace,
but not always. When looking up the ceph cluster we can look for
the first one in the namespace rather than requiring the name
to be the same as the namespace.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-22 13:42:40 -06:00
n.fraison 848d99265b ceph: factorize deletion of rgw CephX key and configuration in centralized mon database
Use same method for the deletion of rgw CephX key and configuration in centralized mon database
when removing a CephObjectStore or scaling down number of rgw

Signed-off-by: n.fraison <n.fraison@criteo.com>
2020-04-21 22:36:29 +02:00
n.fraison 6b9a70cb9a ceph: remove specific rgw configuration on mon configuration database
Remove specific rgw config added to the mon configuration database when deleting a CephObjectstore
or when scaling down number of rgw

Signed-off-by: n.fraison <n.fraison@criteo.com>
2020-04-21 22:36:11 +02:00
Sébastien Han f792cd7c04 Merge pull request #5280 from travisn/mgr-module-async
Configure mgr modules in parallel of rest of reconcile loop
2020-04-20 14:07:21 +02:00
Madhu Rajanna 5684c4cc37 CSI: update cephcsi to v2.1.0
cephcsi v2.1.0 is released and doesnot need any deployment
template changes. This PR updates the cephcsi image
version to v2.1.0

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-04-20 14:58:25 +05:30
Sébastien Han 7c994441c3 ceph: make admin key optional for external cluster
Currently, we need to configure the Ceph external Admin keyi
in the Rook deployment to be able to connect to an external Ceph cluster.
If we wanted to run in a multi-tenant fashion
were several K8s/Rook clusters wanted to connect to the same external ceph cluster,
each K8s deployment would have the access to the External Ceph Admin key
and could potentially access or delete the Data
from pools that belong to other k8s/Rook Clusters.

Now the admin key is optional but the helper script create-external-cluster-resources.sh
will help create the necessary keys/users to connect to that cluster.

Closes: https://github.com/rook/rook/issues/4917 and https://github.com/rook/rook/pull/5227
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-20 09:59:04 +02:00
Travis Nielsen 348690ea64 ceph: update defaults to the ceph v14.2.9 release
With the release of ceph v14.2.9 we set the default examples to this version.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-17 12:54:06 -06:00
Travis Nielsen 9634574d5b ceph: configure mgr modules in parallel of osds
The mgr modules take some time to configure during every reconcile loop.
The OSDs were waiting until the mgr module config was completed. Since
the mgr module config is optional or at least not critical to the rest
of the reconcile we can do it in parallel.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-17 12:43:53 -06:00
Sébastien Han 5adfc7b43d Merge pull request #5085 from leseb/rbd-mirror-crd
ceph: extract rbd-mirror to its own crd
2020-04-15 10:58:22 +02:00
Sébastien Han c1b8a7aa9e ceph: extract rbd-mirror to its own crd
Previously, the rbd-mirror daemon was integrated into the `CephCluster`
CRD. This wasn't really practical since we would have to wait for the
whole orchestration to be done to actually set it up. The same goes for
any CR update. Let's say you want to change the number of daemons, Rook
would go through mons, mgrs and osds until it get to rbd-mirror.
This triggers an undesired full orchestration.

With its own CRD this component just gains a lot more flexibility.

Closes: https://github.com/rook/rook/issues/5084
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-15 09:12:56 +02:00
Travis Nielsen 668bca27b1 ceph: reduce verbose logging for ok-to-stop failures
When a daemon is not safe-to-stop the operator will print the full
stack trace rather than a simple error message that the daemon
cannot be stopped.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-14 14:53:56 -06:00
RAJAT SINGH bb79f7bc2c Ceph: PV provisioning fails upon upgrade
CSI CephFS provisioner fails to provision a Persistent Volume after upgrading from Rook Ceph Operator 1.1.2 to 1.1.7.
This issue can be fixed by removing givePoolAppTag function whenever there is an appName cephFs.

Signed-off-by: RAJAT SINGH <rajasing@redhat.com>
2020-04-14 08:24:07 +05:30
Travis Nielsen 66f310c73b Merge pull request #5219 from travisn/status-reconcile-loop
Skip reconcile events where the spec is not updated
2020-04-09 16:53:40 -06:00
Travis Nielsen 8622583154 Merge pull request #5183 from umangachapagain/mgr-minimal-privilege
Ceph: revert mgr to minimal privilege
2020-04-09 16:53:32 -06:00
Travis Nielsen 8ba023764b Merge pull request #4433 from rajatsingh25aug/dataPool-Fix
Ceph: Filesystem Pool Size are ignored
2020-04-09 16:53:16 -06:00
Travis Nielsen 24789f4c6a ceph: update the object store service port during upgrade
In the v1.3 release the target port for the rgw daemons changed to 8080.
The upgrade was skipping the service update anytime the service already existed.
Now the service will be updated with every reconcile to ensure the target port
is correct.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-09 12:42:20 -06:00
Travis Nielsen ff1ab64d8d ceph: skip reconcile events where the spec not updated
The controllers should ignore events for status updates. The reconcile
only needs to happen when the spec is updated or the resource is marked
for deletion. Otherwise, the controllers may stay in an update loop as
the reconcile events are triggered again every time there is a status
update during the reconcile.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-09 11:20:45 -06:00
Travis Nielsen 269cfe1199 ceph: update status on current version of resources
When updating the status on resources sometimes the update fails due to
the resource being an outdated version. This frequently occurs when
the same reconcile loop updates the status multiple times, or the finalizer
is added, or some other update to the resource. Upon the next reconcile
the error would generally go away since the status or finalizer didn't
need to be updated multiple times. But now the error is not expected
since the controller will retrieve the latest version of the resource
immediately before attempting to update it.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-09 11:20:45 -06:00
Michael Adam 76434a8bc1 nfs: fix comment typo
Signed-off-by: Michael Adam <obnox@redhat.com>
2020-04-08 00:32:08 +02:00