Commit Graph
5036 Commits
Author SHA1 Message Date
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
Sébastien Han 58b7b1e012 ceph: stop potential secret leak
If cluster info is not fully initialized we could leak some of the ceph
secrets in the operator logs.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-20 09:56:27 +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
Travis Nielsen f4df6f6069 Merge pull request #5143 from shellwedance/ceph_add_size_in_pool_create
Ceph: Add replica_size flag in replicated pool creation time
2020-04-07 07:21:05 -06:00
Sébastien Han 36f6726405 Merge pull request #5200 from leseb/fix-codegen
rook: fix codegen
2020-04-07 14:46:38 +02:00
Sébastien Han 6a1c9ec5f0 rook: fix codegen path
The path was copied in the wrong location, ending up with a duplicated
directory in pkg/pkg/api. We need pkg/ only.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-07 13:11:59 +02:00
morimoto-cybozu 9edf8c45b5 ceph: fix resync failure of OSD pod using LV-backed-PV
This fixes the resync of the Deployment of the OSD pod that uses
an LV-backed PV.
`getOSDInfo()` reads the configuration of the OSD pod from the existing
Deployment, but it overlooked this case.

Closes: https://github.com/rook/rook/issues/5139
Signed-off-by: morimoto-cybozu <kenji_morimoto@cybozu.co.jp>
2020-04-07 09:53:00 +00:00
RAJAT SINGH 013c5bbac3 Ceph: Filesystem Pool Size are ignored
The old Filesystem's pool is not getting updated when changed with the new File system.
So, we added two helper functions namely generateDataPoolNames and generateMetaDataPoolName  that will generate the names of the pools and then change those pool's values using the SetPoolSize method.

Signed-off-by: RAJAT SINGH <rajasing@redhat.com>
2020-04-07 14:54:45 +05:30
taeuk_kimanddonggyu_park c266c982c9 Ceph: Add replica_size to replicated pool creation
Add size parameter to pool create command instead of executing pool set command only for size
This makes pool min_size reflect replica size.

Co-authored-by: donggyu_park <donggyu_park@tmax.co.kr>
Signed-off-by: taeuk_kim <taeuk_kim@tmax.co.kr>
2020-04-07 07:06:35 +00:00
Dmitry Yusupov b640f75c08 edgefs: fix SMB controller update path
Signed-off-by: Dmitry Yusupov <dmitry.yusupov@nexenta.com>
2020-04-06 18:32:23 -07:00
Travis Nielsen 099ed307d5 Merge pull request #5177 from ashangit/set_pg_num_min
ceph: set pg_num_min for rgw metadata pools
2020-04-06 11:24:39 -06:00
n.fraison 27579733b8 ceph: set pg_num_min for rgw metadata pools
Since e396379 rook create rgw metadata pools with 8 PGs instead of
32. But the pg_autoscaler increase it back to 32 as the pg_num_min parameter
is not set on those pools.

Signed-off-by: n.fraison <n.fraison@criteo.com>
2020-04-06 18:14:56 +02:00
n.fraison ddadfbc993 ceph: remove leading and trailing space from get config
Value returned by ceph config get can contains some trailing space which leads to
issues when running other ceph command.
For ex.:
2020-04-06 15:32:43.543050 I | exec: Running command: ceph osd pool set test-1.rgw.control pg_num_min 8
 --connect-timeout=15 --cluster=rook-ceph --conf=/var/lib/rook/rook-ceph/rook-ceph.config --keyring=/var/lib/rook/rook-ceph/client.admin.keyring --format json --out-file /tmp/249563089
2020-04-06 15:32:44.005018 I | exec: Error EINVAL: error parsing int value '8

Signed-off-by: n.fraison <n.fraison@criteo.com>
2020-04-06 18:14:50 +02:00
Sébastien Han 71799682ca ceph: print the reason for reconciling
General debugging helper without having to turn on DEBUG logs.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-06 16:07:01 +02:00
Travis Nielsen eeb687ad14 ceph: log skipped reconcile based on ceph health
When the Ceph health is HEALTH_ERR the controllers will skip the
reconcile. With info level logging there needs to be an indication
of this decision to skip the reconcile, otherwise users will
wonder why their resources aren't being created.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-06 16:07:01 +02:00
Umanga Chapagain 362a9c78e0 Ceph: revert mgr to minimal privilege
mgr should only include "mon allow profile mgr" instead
of "mon allow *"

Fixes: #2529
Reverts: #2523
Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-04-06 16:03:51 +05:30
Sébastien Han 56707ddcc4 Merge pull request #5179 from ashangit/auth_key_not_deleted
ceph: remove appropriate rgw ceph user when CephObjectStore is deleted
2020-04-06 10:02:20 +02:00
n.fraison 2cb04ea271 ceph: remove appropriate rgw ceph user when CephObjectStore is deleted
Signed-off-by: n.fraison <n.fraison@criteo.com>
2020-04-06 07:23:55 +02:00
Umanga Chapagain 3fa772e3a7 Yugabytedb: fixes unhandled type assertions
unhandled type assertions can lead to runtime panic. using
the boolean 'ok' flag to handle failure to assert type.

Issue: #4566
Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-04-04 14:00:57 +05:30
Umanga Chapagain a6e7256d52 NFS: fixes unhandled type assertions
unhandled type assertions can lead to runtime panic. using
the boolean 'ok' flag to handle failure to assert type.

Issue: #4566
Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-04-04 14:00:52 +05:30
Umanga Chapagain e8889c4764 Edgefs: fixes unhandled type assertions
unhandled type assertions can lead to runtime panic. using
the boolean 'ok' flag to handle failure to assert type.

Issue: #4566
Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-04-04 14:00:47 +05:30
Umanga Chapagain b6a8a094ce Cockroachdb: fixes unhandled type assertions
unhandled type assertions can lead to runtime panic. using
the boolean 'ok' flag to handle failure to assert type.

Issue: #4566
Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-04-04 14:00:42 +05:30
Umanga Chapagain ffc029f6fe Cassandra: fixes unhandled type assertions
unhandled type assertions can lead to runtime panic. using
the boolean 'ok' flag to handle failure to assert type.

Issue: #4566
Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-04-04 14:00:39 +05:30
Umanga Chapagain 654efb6d0a Ceph: fixes unhandled type assertions
unhandled type assertions can lead to runtime panic. using
the boolean 'ok' flag to handle failure to assert type.

Issue: #4566
Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-04-04 14:00:19 +05:30
Dmitry Yusupov afd8398a6b Merge pull request #5165 from dyusupov/master
edgefs: support for SMB CRD
2020-04-03 14:18:14 -07:00
Dmitry Yusupov 4920202c10 edgefs: support for SMB CRD
Signed-off-by: Dmitry Yusupov <dmitry.yusupov@nexenta.com>
2020-04-03 13:15:14 -07:00
Sébastien Han c5075d55d1 ceph: trigger update on child controllers
When the CephCluster CR gets updated with a new image version, we need
to notify the child controllers of that upgrade.
For this, we set a 'ceph_version' label on the CR itself which will
effectively trigger a reconcile based on an update event.
This needs to be revisited and see how we can make use of
`EnqueueRequestsFromMapFunc` which might be a better approach using
controller-runtime built-in.

Closes: https://github.com/rook/rook/issues/5153
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-03 13:56:49 -06:00
Travis Nielsen 948c0328bd Merge pull request #5162 from travisn/csi-v2.0.1
Enable the Ceph CSI v2.0.1 driver by default in Rook
2020-04-03 13:31:59 -06:00
Travis Nielsen b8e0d8902c Merge pull request #4077 from leseb/rook-multus
ceph: add multus support
2020-04-03 11:14:08 -06:00
Travis Nielsen b1825db09d ceph: install CSI driver v2.0.1 by default
With the release of the CSI v2.0.1 driver, this should now be the
default driver deployed by Rook. The minimum driver version
supported is still v2.0.0

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-03 11:08:19 -06:00
Travis Nielsen b9223e4922 Merge pull request #5155 from travisn/upgrade-instructions
Upgrade doc clarifications for v1.3
2020-04-03 10:30:10 -06:00
Sébastien Han 20d1543507 ceph: add multus support
You can now use Rook along with Multus. Multus must be up and running
and the right ressources must exist such as NetworkAttachmentDefinition
CR.
The Cluster CR spec has new fields to work with multus:

network:
  provider: multus (or 'host' for hostNetworking)
  selectors:
    public: NetworkAttachmentDefinition name
    cluster: NetworkAttachmentDefinition name

If only a single NetworkAttachmentDefinition is provided Rook will use
both anyway for the Ceph traffic.

Please refer to the doc to learn more.

Closes: https://github.com/rook/rook/issues/4716
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-03 18:00:15 +02:00
Travis Nielsen a6a7e46bfc Merge pull request #5104 from rohantmp/rbacFix
Fix RBAC and handle error to enable deleting of drain-canaries
2020-04-03 09:17:19 -06:00
Travis Nielsen 96dd92cc7f ceph: change verbose info log to debug in controller
Keeping the operator log clean...

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-03 09:15:25 -06:00