Commit Graph
5036 Commits
Author SHA1 Message Date
Sébastien Han c8994ff450 Merge pull request #7752 from jshen28/add-print-columns
ceph: add phase to cephfilesystems crd
2021-04-29 15:00:05 +02:00
shenjiatong 21bb12a20d ceph: upgrade mds fix typos
fix some nits on error wraps and logging

Signed-off-by: shenjiatong <yshxxsjt715@gmail.com>
2021-04-29 16:45:08 +08:00
Ali Maredia c9fee1f883 ceph: ensure object store endpoint is initialized for user
when store.Status was not initialized it caused
crashes when assigning store.Status.Info["endpoint"]
to objContext.Endpoint.

This commits makes sure store.Status is not Nil
before setting objContext.Endpoint and
objContext.SecureEndpoint in the ObjectStoreUser
controller.

Closes: https://github.com/rook/rook/issues/6916
Signed-off-by: Ali Maredia <amaredia@redhat.com>
2021-04-28 21:47:34 -04:00
shenjiatong 41f775ec17 ceph: make sure standbys are stopped
wait and make sure standbys are stopped before
continuing to upgrade the primary mds daemon.

Signed-off-by: shenjiatong <yshxxsjt715@gmail.com>
2021-04-29 08:12:29 +08:00
shenjiatong 81f888260b ceph: reset max_mds and allow_standby_replay in deferred function
set fsPreparedForUpgrade to true for upgrading mds, to
make sure that max_mds is set back to active count
after all mds agent gets upgraded

Signed-off-by: shenjiatong <yshxxsjt715@gmail.com>
2021-04-29 08:06:39 +08:00
shenjiatong 58f6b495af ceph: complete missing steps of upgrading mds
Upgrading mds requires extra steps than simply
replacing ceph image. see https://docs.ceph.com/en/latest/cephfs/upgrading/
for reference.

Signed-off-by: shenjiatong <yshxxsjt715@gmail.com>
2021-04-29 08:06:38 +08:00
Blaine Gardner 6ee626b3aa Merge pull request #7764 from thotz/obcsslfix
ceph: support for OBC operations if it uses TLS RGW endpoint
2021-04-28 14:27:08 -06:00
Travis Nielsen 6af362abd4 Merge pull request #7768 from travisn/skip-upgrade-checks-log
ceph: Clarify log message to continue with upgrade if needed
2021-04-28 13:19:23 -06:00
parth-gr bb23622b72 core: enhancement in debug logs
When DEBUG logging is enabled in the operator, there are a number of overwhelming messages in the log that are very overwhelming and don't seem useful, which makes debug mode difficult to use
Updated and Cutted down the messages that are not useful in debug mode

Closes: https://github.com/rook/rook/issues/7499
Signed-off-by: parth-gr <paarora@redhat.com>
2021-04-28 22:28:10 +05:30
Jiffin Tony Thottan a5a5661e5f ceph: add security spec to object store spec
Add `SecuritySpec` to specify kms details for rgw in `ObjectStoreSpec` than using existing
`SecuritySpec` used for `ClusterSpec`. The vault secret engines conflict with OSD and RGW
kms encrytpion

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-04-28 14:39:39 +05:30
Jiffin Tony Thottan 3ef3e8b72e ceph: check for kv engine version for SSE RGW
The "https://docs.ceph.com/en/latest/radosgw/vault/" says RGW supports only version v2 of
kv engine, so pod won't start if the admin didn't provide "VAULT_BACKEND" in security.kms.ConnectionDetails

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-04-28 13:03:22 +05:30
Jiffin Tony Thottan 8e5c6c126c ceph: modify ValidateConnectionDetails() in kms
The ValidateConnectionDetails() contains `clusterSpec` assuming `SecuritySpec` only
part to `cephCluster` CRD. But we may need to validate same for `SecuritySpec` in
`cephObjectStore` CRD. Hence modifying the signature of the api.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-04-28 13:03:16 +05:30
shenjiatong e1fd23933f ceph: add phase to cephfilesystems crd
add a Phase to columns that should be printed

Signed-off-by: shenjiatong <yshxxsjt715@gmail.com>
2021-04-28 15:18:11 +08:00
Sébastien Han 302b90014e Merge pull request #7631 from BlaineEXE/allow-volumeclaimtemplate-metadata
api: persist VolumeClaimTemplate metadtata
2021-04-28 09:10:33 +02:00
Jiffin Tony Thottan f9c7634d88 ceph: support for OBC operations on enabled TLS RGW endpoint
OBC operations will fail if RGW only enabled HTTPS. With this change, OBC operations
will use needed TLS certs to succeed the operation.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-04-28 12:37:38 +05:30
Jiffin Tony Thottan 7a5928d2c5 ceph: add api to fetch cacert for RGW server
Rook operator sends S3 to RGW server for bucket operations performed by healthchecker,
bucketprovisioner etc. Add api to fetch cacert if the TLS enabled for RGW.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-04-28 12:25:36 +05:30
Blaine Gardner b60c495561 Merge pull request #7704 from alrs/nfs-multiple-imports
nfs: fix multiple imports
2021-04-27 15:47:34 -06:00
Blaine Gardner d260b81e97 core: persist VolumeClaimTemplate metadtata
Allow metadata on VolumeClaimTemplates in StorageClassDeviceSets to be
persisted. The latest changes to controller-gen allows us to embed
objectmeta for embedded types.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-04-27 13:37:48 -06:00
Travis Nielsen 6f61d95dc3 ceph: clarify log message to continue with upgrade if needed
The ceph upgrade blocks if the ceph heatlh is HEALTH_ERR. If the user
wants to force the upgrade despite the health error, they will need
to set skipUpgradeChecks: true in the cephcluster CR. This message
will hopefully make that setting more discoverable.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-04-27 11:31:28 -06:00
Travis Nielsen 08f896e865 ceph: detect the osd topology affinity during upgrade
The nodeAffinity for portable OSDs is needed to ensure the OSDs are
tied to the same zone or other failure domain where the OSD was
prepared and where it is expected to run. During upgrade the topology
affinity was not being detected since the osd prepare job is skipped
in that case. Now the topology will be detected from the running
OSD daemon pod's node.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-04-27 08:51:51 -06:00
Satoru Takeuchi 2beaa5db79 Merge pull request #7719 from cybozu-go/ceph-simplify-cmd-timeout
ceph: unity timeout values of commands
2021-04-27 07:12:36 +09:00
Satoru Takeuchi 709e8d5ba8 ceph: unity timeout values of commands
There is no strong reason to have different timeout values.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-04-26 12:57:40 +00:00
Jiffin Tony Thottan 809a8d174c test: adding unit test for service serving cert
include unit tests for the new apis and functionality introduced by the feature
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-04-26 18:23:29 +05:30
Jiffin Tony Thottan aea21d9c84 ceph: service server cert support for rgw
Service serving certificates are intended to applications that require
encryption in openshift. These certificates are issued as TLS web server
certificates. Currently RGW supports TLS authentication with help of
certs passed as secrets, in this case we add following details as
`service.annotations` in the Objectstore Gateway Spec :
```
service:
  annotations:
    service.beta.openshift.io/serving-cert-secret-name: <name for
autogenerated secret>
```

More details about service serving cert can be found at :
https://docs.openshift.com/container-platform/4.6/security/certificates/service-serving-certificate.html

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-04-26 18:15:12 +05:30
Nitin Goyal 99bc72d79f ceph: stop using updatePVCIfChanged and start using ExpandPVCIfRequired
delete updatePVCIfChanged method on "Cluster" from osd package and use
the common one ExpandPVCIfRequired from k8sutil pkg

Signed-off-by: Nitin Goyal <nigoyal@redhat.com>
2021-04-23 08:47:49 +05:30
Nitin Goyal 3575c3bf78 ceph: expand Mon Pvc's
Expand Mon Pvc's if storage request has increased for the Mons in the
cephcluster crd.

Signed-off-by: Nitin Goyal <nigoyal@redhat.com>
2021-04-23 08:47:49 +05:30
Nitin Goyal 2e8f513197 core: add func ExpandPVCIfRequired in k8sutil pkg
ExpandPVCIfRequired will expand PVC if and only if current PVC size is
less than the desired PVC size.

Signed-off-by: Nitin Goyal <nigoyal@redhat.com>
2021-04-23 08:47:49 +05:30
Travis Nielsen 116bf7dcf1 Merge pull request #7733 from travisn/ceph-15.2.11
ceph: Example manifests to deploy with v15.2.11
2021-04-22 12:12:41 -06:00
parth-gr 80a9b26bfd ceph: operator loops forever over existing nodes
When the node get added to the cluster the operator always watches for node events and starts a reconcile when a node is ready.
Checking the Node if they already have OSDs present and stopping them from reconcile.

Closes: https://github.com/rook/rook/issues/7534
Signed-off-by: parth-gr <paarora@redhat.com>
2021-04-22 22:38:08 +05:30
parth-gr f6bd25ae01 ceph: update OSDs reconcile
OSDs not automatically started when adding nodes to existing cluster.
Call the helper NormalizeCrushName(name) to make sure the node name can match the name in the crush map before querying for the node in the crush map, and reconcile when new nodes get added.

Closes: https://github.com/rook/rook/issues/7462
Signed-off-by: parth-gr <partharora1010@gmail.com>
2021-04-22 20:40:14 +05:30
Travis Nielsen 43594adbbb ceph: example manifests deploy with v15.2.11
The latest octopus release is v15.2.11 so we should use
it in the default examples to pick up the latest fixes.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-04-22 08:54:08 -06:00
Sébastien Han a9641a9355 Merge pull request #7716 from leseb/debug-cii
ci: mitigate block locking issues and flapping mirroring test
2021-04-22 15:38:59 +02:00
Travis Nielsen 57c27a4b9e Merge pull request #7724 from Madhu-1/csi-v3.3.1
ceph: update cephcsi to v3.3.1
2021-04-22 07:15:07 -06:00
Sébastien Han 1930eb3b4c ceph: print provision error entirely
If the ceph-volume prepare call fails, let's print the output so we can
see it in the operator's logs.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-22 11:30:37 +02:00
Madhu Rajanna 6bc3c1ac3a ceph: update cephcsi to v3.3.1
As we have cephcsi v3.3.1 release
with couple of bug fixes and a CVE fix
updating the cephcsi to latest release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-04-22 13:57:01 +05:30
Travis Nielsen 213b1b4339 ceph: allow any device class for the osds in a pool
The device class can be any arbitrary value for a pool, depending
on the device class either automatically detected for the OSDs
or an arbitrary device class applied to OSDs in the cluster.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-04-21 12:14:43 -06:00
Lars Lehtonen 50a57985bf nfs: fix multiple imports
This removes multiple imports.

Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
2021-04-20 12:57:12 -07:00
Blaine Gardner b4946aba95 ceph: use ceph-volume v2 report format for Pacific
This fixes cases where raw provisioning mode still cannot be used for
Rook v1.6 and Ceph Pacific clusters where json.Unmarshal fails to read
the ceph-volume output after OSD provisioning.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-04-20 12:45:05 -06:00
Shachar Sharon 9766e9b8fb ceph: allow passing 'osd-crush-initial-weight'
Ceph support the option '--osd-crush-initial-weight' upon OSD start,
which sets an explicit weight (in TiB units) to specific OSD. Allow
passing this option all the way from the user (similar to
'DeviceClass'), for the special case where end users wants it cluster
to have non-even balance over specific OSDs (e.g., one of the OSDs is
placed over a partition alongside OS-partition).

ROOK issue: https://github.com/rook/rook/issues/7448

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
2021-04-20 20:50:54 +03:00
Sébastien Han c9dfd43f35 ceph: remove rbd-mirror ceph config/key
After the peer is imported via a token, ceph internally stores the
information of the remote cluster. So the rbd-mirror daemon does not
need to have files (key and config) for the remote site.
This means lighter code for us, as well no more restarts for the
rbd-mirror daemon once a peer is added to the configuration.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-20 16:55:09 +02:00
Travis Nielsen 56e7af3ee0 Merge pull request #7331 from thotz/healthcheckwhensslenabled
ceph: fix healthcheck in case ssl enabled for rgw
2021-04-20 08:32:17 -06:00
Jiffin Tony Thottan 70f94a2d3c ceph: removing serviceIP from bucketChecker struct
serviceIP is not used by the health bucket checker, hence removing it.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-04-20 14:24:11 +05:30
Jiffin Tony Thottan bcbe707bcb ceph: fix healthcheck incase ssl enabled for rgw
In case ssl enabled for RGW, bucket healthcheck won't work since access is denied from the server.
In that case configure S3 agent using "InsecureSkipVerify: true" option.

Fixes: 7288
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-04-20 14:23:48 +05:30
Rakshith R f5a3f6fa71 ceph: add option to toggle host networking in csi plugin pods
As host networking is no longer necessary for CSI driver,
it will be disabled by default.
An option CSI_ENABLE_HOST_NETWORK is added to rook-ceph-operator-config
configmap and enableCSIHostNetwork in helm chart values.yaml to
enable/disable host network in CSI plugin pods.

Closes: #7203

Signed-off-by: Rakshith R <rar@redhat.com>
2021-04-20 12:57:09 +05:30
Sébastien Han ca1cf6672e ceph: always apply config flags for mds and rgw
We now always set the config flags on reconcile. Previously we were
looking for non-existing rgw or mds which means that on upgrade we would
never set those flags. However, we want to set those flags on "old"
cluster that got upgraded.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-19 17:39:43 +02:00
Lars Lehtonen bb323de403 ceph: fix multiple imports
This mops up the last of the multiple-imports within ceph-related
packages, in pkg/daemon/ceph/agent/flexvolume/manager/ceph and
pkg/daemon/ceph/osd.

Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
2021-04-19 00:06:10 -07:00
Blaine Gardner d3b094710a Merge pull request #7663 from BlaineEXE/radosgw-admin-omap-message-info-to-debug
ceph: change radosgw-admin workaround log to debug
2021-04-16 14:19:11 -06:00
Travis Nielsen 9da066eb3f ceph: allow pool replica min size 0 for EC pools
In v1.6 EC pools are being disallowed by the schema since the minimum
is set to 1 on the replicated.size. We expect the replicated.size to be
0 if an EC pool is being created.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-04-16 12:53:07 -06:00
Blaine Gardner 8aef8b756d ceph: change radosgw-admin workaround log to debug
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-04-16 12:51:54 -06:00
bipuladh 7d5cc8d06b ceph: adds a container to support volume replication controller
this commit adds a new container inside of rbd-provisioner.

Signed-off-by: bipuladh <badhikar@redhat.com>
2021-04-15 21:39:26 +05:30