Commit Graph
1228 Commits
Author SHA1 Message Date
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
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
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
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
subhamkrai e21854145a ceph: disable object store port when secureport specified
currently, the object store schema requires the
port to be non-zero. This does not allow http
access to the object store to be disabled.
so setting the port minimum to 0 to from 1 in the cr.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-08-12 21:57:01 +05:30
Sébastien Han 7d6974b9b7 ceph: add octopus validation for pvc encryption
The c-v encryption is part of 15.2.5 on Octopus.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-12 12:06:35 +02:00
Travis Nielsen d7a83107b6 ceph: mon failover should scale down failed mon first
When a mon is failed over, the new mon is started before the old mon
is removed from quorum and purged from the cluster. If the mon has
anti-affinity, in small clusters or specific toplogies where sufficient
nodes are not available, the new mon may be prevented from starting simply
because the dead mon pod still exists. To ensure a clean failover, the
dead mon pod must first be stopped before the new mon is started.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-11 10:30:28 -06:00
Sébastien Han d91f55e8ed Merge pull request #5580 from silverhandy/master
ceph: add support for wal device for OSD on PVC
2020-08-11 13:57:56 +02:00
Sébastien Han f66473a8f8 ceph: fix healtcheck for external cluster
For external cluster, it is not an issue to have a mon count set to 0
since Rook is not deploying/managing the monitors.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-10 11:46:35 +02:00
Chen, Tingjie 0e87348093 ceph: add support for wal device for OSD on PVC
Based on the feature of metadata PVC for OSD: #4818, add the wal device.

For this, you need to create a new volumeClaimTemplates, its name must be "wal", if "wal" is
set, "metadata" device will refers specially for block.db device, and "wal" refers for block.wal
device in BlueStore.

A template will look like this:

```
volumeClaimTemplates:
- metadata:
    name: data
  spec:
    resources:
      requests:
        storage: 10Gi
    # IMPORTANT: Change the storage class depending on your environment (e.g. local-storage, gp2)
    storageClassName: gp2
    volumeMode: Block
    accessModes:
      - ReadWriteOnce
- metadata:
    name: metadata
  spec:
    resources:
      requests:
        storage: 6Gi
    # IMPORTANT: Change the storage class depending on your environment (e.g. local-storage, io1)
    storageClassName: io1
    volumeMode: Block
    accessModes:
      - ReadWriteOnce
- metadata:
    name: wal
  spec:
    resources:
      requests:
        storage: 6Gi
    # IMPORTANT: Change the storage class depending on your environment (e.g. local-storage, io1)
    storageClassName: io1
    volumeMode: Block
    accessModes:
      - ReadWriteOnce
```

We now map block, block.db and block.wal directly inside the container instead of
running ceph-volume activate.

Signed-off-by: Chen, Tingjie <tingjie.chen@intel.com>
2020-08-10 08:48:20 +08:00
Sébastien Han 2dcc6ee392 Merge pull request #5864 from rohan47/whereabouts_fix
ceph: fix networkAttachmentConfig to be compatible with whereabouts cni
2020-08-06 15:11:16 +02:00
Sébastien Han f9ae232bc8 Merge pull request #5984 from Madhu-1/fix-nil-pointer
ceph: add check for nil object status
2020-08-06 14:23:24 +02:00
Sébastien Han f936ad3cbf Merge pull request #5680 from umangachapagain/rbd-pool-stats
Add spec to enable/disable RBD pool stats collection
2020-08-06 10:53:49 +02:00
Sébastien Han f91616f1e6 Merge pull request #5982 from Madhu-1/remove-csi-1.13
ceph: remove csi support for kubernetes 1.13
2020-08-06 09:53:49 +02:00
Madhu Rajanna 99cd310cd2 ceph: add check for nil object status
in couple of unit testing the tests are
panicing with nil pointer exception,This
commit adds a check for status pointer before
operating on it.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-06 12:19:49 +05:30
Umanga Chapagain edcb80b237 ceph: unit test cases for enableRBDStats
Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-08-06 12:07:21 +05:30
Umanga Chapagain 83d7cdb85c ceph: configure mgr to enable collection of RBD stats
Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-08-06 12:07:21 +05:30
Travis Nielsen a3bf935957 ceph: update the cluster status with a clean object
The cluster CR status needs to be updated with the latest object
instead of a cached copy or else it could fail if there is some
other update. Using the Rook clientset ensures it is the latest
instead of using the cached controller runtime object.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-05 15:55:01 -06:00
Travis Nielsen 15fae3c4cd ceph: during upgrade service selector cannot be changed
The service selector labels cannot be updated during the upgrade or else the
mon commands will not respond until the mon deployment is also updated.
Since there is a mon command to check for the ceph versions before the
deployment is updated, the operator would remain stuck during the upgrade.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-05 11:32:42 -06:00
Madhu Rajanna 1989e0d8c5 ceph: remove csi support for kubernetes 1.13
as the kubernetes 1.13 is EOL and there is no major
functionalities available in 1.13 (resize,snapshot,clone
metrics etc) we are removing the support for kubernetes
for the same.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-05 21:19:59 +05:30
rohan47 f5bbc8c5c5 ceph: fix networkAttachmentConfig to be compatible with whereabouts cni
In the whereabouts config, the network range is determined by range
option unlike other cni plugins that use Subnet option.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2020-08-05 21:17:13 +05:30
Sébastien Han 7d7523a8a2 ceph: fix unit test mock
Mock the user creation otherwise the health check fails and panics.

Closes: https://github.com/rook/rook/issues/5976
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-05 16:09:24 +02:00
Sébastien Han 89b3225441 ceph: add encryption support for osd pvc
We can now encrypted OSD device that were provisioned via a storage
class using the PV interface.
The encryption works at the storageClassDeviceSets level, which means we
can have encrypted and non-encrypted sets.
Using the new key `encrypted` we can turn it on.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-05 10:06:11 +02:00
Sébastien Han af1e8c320a ceph: do not log an error if no clusters
If the list of cluster is empty there is no need to report an error in
the logs.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-05 10:05:51 +02:00
Travis Nielsen 06c21954e1 ceph: labels are immutable for match selectors
The labels cannot be updated on a deployment match selector.
In v1.4 a new label was added for ceph_daemon_type that is intended
to be on the pod labels, but cannot be applied to the match selectors.
Therefore, we suppress any new labels that are added to the daemons.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-04 16:47:00 -06:00