Commit Graph
1382 Commits
Author SHA1 Message Date
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
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
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
Rohan CJ 03e92da102 Ceph: handle not-found error on delete.
Previously, delete was returning an error causing the drain-canary
to reconcile even though it no longer existed.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2020-04-03 19:10:45 +05:30
Sébastien Han 6199861b97 ceph: do not set liveness check on canary pod
The canary pod does not run any daemon so the liveness check probe will
fail.

Closes: https://github.com/rook/rook/issues/5150
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-03 13:23:31 +02:00
Santosh Pillai e1a76bfb96 ceph: Cluster CleanupPolicy: Delete correct mon directories under the dataDirHostPath
In case of multiple clusters, we don't want to delete all the mon directories under the dataDirHostPath during cluster cleanup.
This PR deletes the mon directory only if the montior secret key matches.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2020-04-03 10:01:36 +05:30
Sébastien Han 58f1971172 ceph: do not use host PID anymore
Thanks to https://github.com/ceph/ceph/pull/33633, when running on
Octopus, we don't need to use `--pid=host`. This means we are not using
the host PID but use the PID namespace of the pod.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-01 15:42:53 -06:00
ShyamsundarR de97b6a1d6 ceph: Add ability to specify compression mode for pools
This commit enables configuring a compression_mode for pools
that takes the values as specified for bluestore OSD
compression_mode values,
https://docs.ceph.com/docs/master/rados/configuration/bluestore-config-ref/#inline-compression

Signed-off-by: ShyamsundarR <srangana@redhat.com>
2020-04-01 14:24:30 -04:00
Sébastien Han ed37a6a699 Merge pull request #5128 from leseb/liveness-other-daemons
ceph: add liveness probe to mon, mds and osd daemons
2020-04-01 10:53:12 +02:00
Sébastien Han 040193bb5a ceph: remove DaemonType type
This type was a string already and was just making us doing string()
calls all the time to it's not worth it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-01 09:08:18 +02:00
Sébastien Han 7788901a88 ceph: add liveness probe to mon, mds and osd daemons
Now Kubernetes will perform liveness checks on mon, mds and osd daemons.
The command will:

* call the socket (check for existence)
* execute a command and check the return code (success if 0)

This handles the case where the daemon is stuck locally and
unresponsive. It's unlikely but not impossible.
These checks bring more robustness to the implementation.

rbd-mirror and nfs have been leftover for the following reason. The
rbd-mirror socket name is different from other daemons (could be fixed
though): /run/ceph/ceph-client.rbd-mirror.a.1.94362516231272.asok also,
the command to call would need to be changed from "status" to "rbd
mirror status" so we can keep this for a later.
The nfs ganesha has no socket only a PID file which doesn't mean much.
No PID means the process does not run so Kubernetes will already handle
this and the pod will crash loop.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-31 15:20:42 +02:00
Travis Nielsen 0e55aa348b tests: reduce unhelpful debug logging
Removed some extremely verbose debug logging that makes
the logs difficult to read when debug is enabled.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-30 13:32:47 -06:00
Travis Nielsen 928e901ec5 Merge pull request #5113 from leseb/rgw-port-sdn
ceph: use a different port for rgw on sdn
2020-03-30 13:32:30 -06:00
Dmitry Yusupov c2f175e266 Merge pull request #5120 from dyusupov/master
edgefs: TZ needs to be exposed
2020-03-30 12:30:35 -07:00
Dmitry Yusupov 080510bb6f edgefs: TZ needs to be exposed
/etc/timezone now exposed by operator

Signed-off-by: Dmitry Yusupov <dmitry.yusupov@nexenta.com>
2020-03-30 11:42:45 -07:00
Sébastien Han f136105951 ceph: use a different port for rgw on sdn
When running on SDN, the container is not privileged and the network
stack is not exposed so running the gw on port 80 will not work (not
enough privileged).

Closes: https://github.com/rook/rook/issues/5106
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-30 19:37:11 +02:00
Santosh Pillai 2bfd7c42bc ceph: cleanup cluster.Spec.DataDirHostPath on cluster deletion
In order to ensure proper clean up of all the rook-ceph data when the cluster is deleted, we need to clean up the dataDirHostPath (var/lib/rook)

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2020-03-30 19:36:01 +05:30
Elise Gafford 2ca0d8f93d ceph: add cleanupPolicy to cephcluster spec
In order to perform full automation of cephcluster deletion safely
and protect against catastrophic data loss, the end user must be
able to signify that they intend to irrecoverably delete the data
in their cluster. The cleanupPolicy field of the cluster spec is
intended to communicate this. This patch does not implement
automated deletion, but only creates the spec field and the
safety feature of halting orchestration other than deletion on a
cluster with a set cleanup policy value.

Partially-fixes: #3222
Signed-off-by: Elise Gafford <egafford@redhat.com>
2020-03-30 19:11:54 +05:30