Commit Graph
2252 Commits
Author SHA1 Message Date
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
Raghavendra TalurandNitin Goyal a6f59f3b64 ceph: add uninstall mode
This adds an uninstall mode to the ceph cluster. If
allowUninstallWithVolumes in the CleanupPolicySpec is set to true then
the cluster deletion does not wait for the PVs to be deleted.

Co-authored-by: Nitin Goyal <nigoyal@redhat.com>
Signed-off-by: Raghavendra Talur <raghavendra.talur@gmail.com>
2020-08-31 14:06:44 -04:00
Sébastien Han 296997e723 Merge pull request #6175 from leseb/do-not-exec-lvm
ceph: do not exec on rootfs just lookup
2020-08-27 16:26:02 +02:00
Sébastien Han f2313d6db0 ceph: do not exec on rootfs just lookup
Trying to execute a binary from the host within the container can result
in mismatched libraries. The host version is compiled with paths of
libraries on the host where the libs inside the container can differ.
Because the path is known and we only need to make sure whether the bin
exists or not then simply doing a lookup when we fallback on /rootfs is
sufficient.

Closes: https://github.com/rook/rook/issues/6078
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-27 15:16:46 +02: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
Travis Nielsen e40b462216 Merge pull request #6084 from cloudical-io/additional_user_labels_ceph
ceph: allow user to add labels to pods
2020-08-25 15:58:40 -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
Sébastien Han 0c1250ac81 ceph: resync codegen
Resync API.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-25 19:21:50 +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 aa5362d48d Merge pull request #6120 from leseb/fix-5996
ceph: do not use realPath for osd on pvc
2020-08-19 17:33:46 +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 944d8cb209 ceph: do not use realPath for osd on pvc
It is fine to use /mnt/set1-data-0-k47mc, it looks like I thought there
was an issue with udev but there is none...

Closes: https://github.com/rook/rook/issues/5996
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-19 14:39:55 +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 b4db31033b Merge pull request #6107 from leseb/fix-6078
ceph: check rootfs for lvm too
2020-08-18 11:52:36 -06:00
Sébastien Han 713d3ecace ceph: check rootfs for lvm too
On rancher OS, the lvm binary is in a different location and cannot be
accessed via the root namespace. So we now also check directly from
/rootfs. When using nsenter, itbreaks out of container's mount
namespace and executes an lvm command.

Closes: https://github.com/rook/rook/issues/6078
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-18 17:04:56 +02:00
Sébastien Han adab0e07e5 Merge pull request #6059 from leseb/lvm-list
ceph: improve callCephVolume() for list and prepare
2020-08-18 13:30:49 +02: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
Alexander Trost 788709f67a Merge pull request #6082 from cloudical-io/additional_user_labels
core: added labels to rook v1
2020-08-17 18:18:42 +02:00
Sébastien Han b4208f4a55 Merge pull request #6090 from leseb/fix-rgw-healthcheck
ceph: fix object store healthcheck yaml
2020-08-17 17:32:15 +02:00
Sébastien Han dbac1c11d0 ceph: improve callCephVolume() for list and prepare
callCephVolume() was using our exec interface with CombinedOutput which
means return both stdout and stderr. This is fine when preparing OSDs
since we read back the stdout and also want any errors if any (stderr).
However when listing OSD we only want the output since ceph-volume tends
to mix stdout and stderr in the output and does not always silence the
warning types/harmless errors. If the listing has a problem we report it
by printing the ceph-volume log file.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-17 12:43:43 +02:00
Alexander Trost e990841206 docs: added rbd mirror crd documentation
This adds some basic RBDMirror CRD documentation and fixes the types.go
comments accordingly.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-08-17 11:55:42 +02:00
Alexander Trost 5225a59278 core: added labels to rook v1
This adds Labels and LabelsSpec to the rook.io/v1 apis pkg.

Related to #6050

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-08-17 10:57:48 +02:00
Sébastien Han 7859bf5c4b ceph: fix object store healthcheck yaml
Reverting some of
https://github.com/rook/rook/commit/23f0ac7f9c7157383bc860b259c1964df46454c1
to re-use `bucket` for the healthcheck configuration.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-17 10:25:49 +02: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