Commit Graph
1695 Commits
Author SHA1 Message Date
Sébastien Han 61dea11de3 Merge pull request #6234 from subhamkrai/fix-dns-suffix
ceph: fixed DNS suffix breaks in custom DNS suffix clusters
2020-09-11 15:06:59 +02:00
subhamkrai 209dc6251d ceph: fixed DNS suffix breaks in custom DNS suffix clusters
By addding ".svc" to the endpoint of the object store,
will fix the custom DNS suffix cluster.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-09-11 13:29:53 +05:30
Madhu Rajanna b88373f9f3 ceph: dont set ownerRef when creating csidriver object
currently, we are setting the rook operator as the
owner on the csidriver objects, as csidriver is cluster
the scoped object we should not set a namespaced object
as owner on cluster scoped object.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-11 11:59:44 +05:30
Travis Nielsen 7a6620f2c0 ceph: remove orphaned mon pvc after failed failover
If the mon failover fails, if the mon is on a pvc, the pvc could remain
orphaned. This is likely to happen if there is not a node available
for scheduling the mon. Therefore, the operator will ensure after a failover
that any orphaned mon pvc is cleaned up.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-09-10 10:21:33 -06:00
Travis Nielsen 2e36913dad ceph: set the pvc name label on mon deployments
When the mons are based on pvcs, the pvc_name label was not being set
as expected. Now the label will always be set on both the canary and
the daemon pods.

The mon pvcs were also never being deleted during canary cleanup. This
code is now removed since we must be very careful when the pvcs are
removed.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-09-09 16:08:07 -06:00
subhamkrai 34d27d55d5 ceph: update cephobjectstore monitoring logic
currently, cephobjectstore monitoring is never
stopped for the following flow:
 1. objectstore is deleted
 2. go routine is stopped
 3. objectstore is created
 4. objectstore is deleted
so, removing clusterResourceDeleted flag and
working with the map only.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-09-03 15:58:48 +05:30
Varsha Rao a0dab8faab ceph: remove NParts and Cache_Size from MDCACHE block
As setting them to small value affects the performance and they are not related
to metadata caching. https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/495185

Signed-off-by: Varsha Rao <varao@redhat.com>
2020-09-02 16:41:15 +05:30
Sébastien Han 152ebf618d ceph: only enable init container if dash is enabled
If the dashboard module is not enabled we don't need to run the
"dashboard-server-addr" init container.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-01 11:42:40 +02:00
Sébastien Han 96b4a56a57 ceph: silence aws s3 sdk logs on healthcheck
We don't need to activate the debug logs on the objectstore
healthchecks.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-01 09:32:15 +02:00
Sébastien Han af72502fe4 ceph: do not use label selector on external svc
When the cluster is external there are no running pods so setting a
Selector on the Service Spec does not make sense, even worse, it makes
Kubernetes reconciling and overriding the configured endpoint.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-01 09:32:15 +02:00
Sébastien Han bd90f9afe9 ceph: add more error handling and debug logging
The predicate was lacking from very useful errors as well as logging
messages.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-01 09:32:15 +02:00
Sébastien Han e7043edbd8 ceph: reconcile if cm is config override
Earlier, we were returning only when the object was not the config
override configmap, we want the opposite.
Also, this was blocking all subsequent conditions and add the correct
check to avoid cm to reconcile.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-01 09:32:15 +02:00
Sébastien Han b68f9a7a41 ceph: fix the service monitor port name
When the cluster is external the service monitor port name should match
with the name of the external metrics one.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-01 09:32:15 +02:00
Raghavendra TalurandNitin Goyal 42a30ff5f8 ceph: skip check for existing PVs in forced uninstall
If AllowUninstallWithVolumes is set in the cleanup policy then we don't
check and wait for the deletion of existing volumes from the
cephCluster.

Co-authored-by: Nitin Goyal <nigoyal@redhat.com>
Signed-off-by: Raghavendra Talur <raghavendra.talur@gmail.com>
2020-08-31 14:07:32 -04:00
Travis Nielsen 85d72f70b0 Merge pull request #6170 from leseb/obc-log
ceph: run obc requests with debug
2020-08-26 20:45:13 -06:00
Sébastien Han 3a92f98233 ceph: use special dns suffix for object ep
By addding ".svc.cluster.local" to the endpoint of the object store, the
OBC requests won't go through a proxy if any is configured.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-26 17:10:31 -06:00
Sébastien Han bcd76bf46d ceph: run obc requests with debug
Use debug log to all the s3 calls so it's either to debug. Also, it's
not so verbose.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-26 15:27:49 +02:00
Travis Nielsen 24b0bdd119 Merge pull request #6156 from cloudical-io/first_part_6111
ceph: operator should only "watch" OSD placement nodes
2020-08-26 07:20:30 -06:00
Alexander Trost a87c00ddee ceph: allow user to add labels to pods
This allows users to specify additional labels to be added to the components
created by the Rook Ceph operator.
Additionally the rbd mirrors are now getting their annotations and
labels set.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-08-25 19:38:51 +02:00
Alexander Trost 94d5196439 ceph: operator should only "watch" OSD placement nodes
This change is the first part to improve the watch OSD nodes logic in
the Rook Ceph operator.
This commit changes the "is node valid check" to use the OSD placement
instead of the all placement. The OSD placement is "merged" with the
all placement already.

Second step will be to skip the first "iteration" of the "nodes added"
events and then start the actual watch logic.

Partially resolves #6111.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-08-25 18:16:20 +02:00
Sébastien Han 8668e1f69c ceph: correctly return if multus was applied
We must only return if multus got configured successfully.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-25 09:54:18 +02:00
Jared Watts 06ab07be8b Merge pull request #5863 from prksu/nfs-provisioner
nfs: nfs provisioner controlled by operator
2020-08-24 16:26:23 -07:00
Sébastien Han d89b06bcf2 Merge pull request #6137 from thotz/cephobjectstorelogging
ceph: use proper log functions in object package
2020-08-24 10:46:21 +02:00
Ahmad Nurus S 5cc2ceda2d nfs: make provisioner as sidecar of nfs server
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-08-21 16:40:33 +07:00
Jiffin Tony Thottan 7413485b8a ceph: use proper log functions in object package
There is incorrect usage of log functions in the object directory, changing those instances

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-08-21 12:39:53 +05:30
rohan47 8c4ede1edc ceph: added support for multus for csi
CSI pods now utilize multus networking and connect to public
network specified in the CephCluster CR.

Closes: https://github.com/rook/rook/issues/5356
Signed-off-by: rohan47 <rohgupta@redhat.com>
2020-08-20 18:25:09 +05:30
Sébastien Han ee893eda5e Merge pull request #6126 from leseb/encryption-expansion-pvc
ceph: add expansion support for encrypted osd on pvc
2020-08-19 21:40:46 +02:00
Travis Nielsen ce92249725 ceph: continue with memory limits below min settings
The operator will now allow the resource limits to be applied below the
recommended minimums. In small clusters, even the recommended minimums
may not be necessary. A warning is still printed to the operator log,
but we allow the configuration to continue.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-19 11:07:16 -06:00
Sébastien Han 321e8e0b5a ceph: add more pvc dep unit tests
Added more unit tests scenario for osd on pvc such as:

* block/db/wal
* block encryption
* block/db encryption
* block/db/wal encryption

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-19 18:45:31 +02:00
Sébastien Han 803462ceca ceph: add encrypted block status container
This init container displays the status of the encrypted pvc. This can
be really useful for debugging purpose.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-19 17:13:46 +02:00
Sébastien Han cb81ee7d1d ceph: add pvc expansion support for encrypted osds
We now support the expansion of encrypted osds. We added a new init
container to run "cryptsetup resize".

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-19 17:13:46 +02:00
Sébastien Han 3f42db5ce0 ceph: support osd deployment update on encrypted pvc
If the deployment spec was updated or restarted, the "encryption-open"
init container would fail to open the device since it was already
opened on the node.
Because they are no reliable post stop hook on Kubernetes, the trick is
to use a small bash init container.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-19 17:13:25 +02:00
Sébastien Han d5b1e89ce2 Merge pull request #6118 from travisn/osd-prepare-resources
ceph: Set the OSD prepare resources
2020-08-19 15:38:06 +02:00
Sébastien Han 6d6449b5af Merge pull request #6103 from travisn/osd-prepare-placement
ceph: Separate placement for osd prepare jobs from osd daemons
2020-08-19 14:04:03 +02:00
Travis Nielsen 18d39d909e ceph: set the osd prepare resources
The osd prepare resources were only being set on the main container
while the init containers either did not have resources set, or were
inheriting the resource settings from the device set resources for osds.
Now the osd prepare resources will be consistently set based on the
prepareosd resources in the main section of the cluster CR.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-18 22:58:26 -06:00
Travis Nielsen 26f59c0382 ceph: remove redundant check for encrypted osds
This is simply a code simplification to remove an extra check for
whether the OSDs are encrypted. There is no change in functionality.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-18 22:50:32 -06:00
Travis Nielsen 0ffa0348b5 ceph: separate placement for osd prepare jobs from osd daemons
The osd prepare jobs and osd daemons may have different placement
requirements. In particular, the topology spread constraints
or pod anti-affinity should only work on either the prepare job or
osd daemon, but does not work effectively on both types at the same
time. Therefore, we split out the osd prepare placement to be separate
from the osd daemon placement. If the osd prepare placement is not set
the operator will fall back to the osd daemon placement for
backward compatibility.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-18 15:24:04 -06:00
Travis Nielsen cb3db54187 Merge pull request #6072 from alimaredia/object-multisite-testing
ceph: object realm controller unit tests
2020-08-18 14:58:38 -06:00
Ali Maredia 5b339cf791 ceph: object realm controller unit tests
Add unit tests for the ceph object realm
controller.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2020-08-18 15:15:14 -04:00
Travis Nielsen 98db380237 Merge pull request #6062 from leseb/wal-encryption
ceph: add support for wal encrypted device on pvc
2020-08-17 14:07:40 -06:00
Travis Nielsen 7481993959 Merge pull request #6017 from humblec/ceph-csi-snapshotter
Add/update ceph csi snapshotter rbac and sidecar deployments
2020-08-13 12:32:35 -06:00
Humble Chirammal 97a3283099 ceph: add snapshot create/delete and restore doc for cephfs
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-13 22:17:01 +05:30
Sébastien Han efa7ba9d84 Merge pull request #5986 from subhamkrai/secureport
ceph: disable object store port when secureport specified
2020-08-13 17:25:57 +02:00
Sébastien Han 1390335f98 Merge pull request #6063 from leseb/fix-crash-collector
ceph: check for gone node on crash collector
2020-08-13 17:02:30 +02:00
Travis Nielsen 306c5425de Merge pull request #6033 from Madhu-1/check-channel
ceph: check channel is open before closing
2020-08-13 07:49:20 -06:00
Sébastien Han 4f9435d226 ceph: add support for wal encrypted device on pvc
Similar to https://github.com/rook/rook/pull/5977 but for wal devices.
So if a cluster is deployed on PVC and wal devices, those will be
encrypted as well.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-13 15:42:40 +02:00
Sébastien Han acc5ba1a6b ceph: check for gone node on crash collector
If a node is gone, we try to remove crash collector deployments so they
don't stay stale or pending. We must ensure the node is gone and not
just return an error even if we successfully deployment the orphan
deployment.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-13 14:16:31 +02:00
Madhu Rajanna 52c2ac3620 ceph: check channel is open before closing
to avoid operator panic we should check the channel
is open before closing as a safety measure.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 16:59:28 +05:30
Sébastien Han a91c96cb47 ceph: add support for encrypted metadata pvc
Now the metadata pvc will also be encrypted if the storageClassDeviceSet
has the "encrypted" flag turned on.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-12 22:24:11 +02:00
Humble Chirammal 903fcdb778 ceph: update csi image version to 3.1.0 in spec.go
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-12 22:39:48 +05:30