Commit Graph
1023 Commits
Author SHA1 Message Date
Rohan CJ 4d7c6df034 Ceph: Fix topologyAware in clusterdisruption package does not respect the rook topolgy prefix.
Allow the clusterdisruption package to recognize node topologies other than zone.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-11-11 09:38:33 +05:30
Sébastien Han 5221d84bb8 Merge pull request #4288 from leseb/silence-disruption
Silence disruption errors if necessary and add missing errors
2019-11-08 19:52:43 +01:00
Sébastien Han ccb9f6ec98 Merge pull request #4277 from sp98/fix-osd-on-pvc-on-restart
ceph: skip osd prepare job creation if osd daemon exists for the pvc
2019-11-08 16:16:57 +01:00
Sébastien Han 7dac59f68e ceph: use %q to print
Since I was parsing this file with the previous commits let's add some
cosmetic changes.

%q is more readable since it doubles quotes the variable.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-08 16:04:57 +01:00
Sébastien Han f45bdb119d ceph: print the full err fields
Let's print the whole struct and its fields.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-08 16:03:34 +01:00
Sébastien Han d8b5d52438 ceph: hide wrong error
WriteConnectionConfig() is called after the controller starts and thus
the 'osd find' command fails to complete because there is no ceph.conf
or key on the operator.
Let's skip this error print if that's the case since it's misleading and
polluting the logs.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-08 16:01:02 +01:00
Sébastien Han de172b96e8 ceph: add missing errors
The current code wasn't returning the full error properly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-08 16:00:54 +01:00
Sébastien Han 386ec12032 ceph: fix error message
Re-phrase error message and use %q to put the var into quotes.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-08 15:59:08 +01:00
Santosh Pillai 26360689f5 ceph: skip osd prepare job creation if osd daemon exists for the pvc
When an orchestration is restarted or retriggered and starts new osd prepare pods, they are unable to start because the device is already in use by the osd daemon pods.
This fix simple skips the osd prepare pod creation if the daemon is already running.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2019-11-08 20:11:49 +05:30
Sébastien Han 4ac8e5417b Merge pull request #4276 from leseb/external-cluster-csi-keys
ceph: create csi keys and secrets for external cluster
2019-11-08 13:21:08 +01:00
Travis Nielsen 30f3535116 Merge pull request #4149 from umangachapagain/objectuser-retry
adds retry to ObjectUser creation
2019-11-07 17:45:26 -06:00
Sébastien Han 80c8846a19 Merge pull request #4150 from rajatsingh25aug/simplify_addOrRemove
ceph: Simplification of addOrRemoveMonitor()
2019-11-07 14:02:38 +01:00
RAJAT SINGH 65fb5684f2 Ceph: Simplification of addOrRemoveMonitor()
Signed-off-by: RAJAT SINGH <rajasing@redhat.com>
2019-11-07 15:26:47 +05:30
Sébastien Han 10c57f834d ceph: create csi keys and secrets for external cluster
Once the cluster is connected, we need to create the CSI keys so that we
can provide persistent storage to containers, via ceph csi.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-07 10:56:06 +01:00
Sébastien Han 5c010a7cea Merge pull request #4257 from leseb/relax-blockpool
ceph: relax cr block requirements
2019-11-07 08:08:02 +01:00
Sébastien Han 4c3dc2828d Merge pull request #4053 from jmolmo/issue_2606
Get <ceph-volume inventory> data in dev. configmaps
2019-11-06 16:40:43 +01:00
Sébastien Han f78ed36539 Merge pull request #4131 from leseb/osd-fs-flag
ceph: remove topologyAware CRD option
2019-11-06 15:08:21 +01:00
Juan Miguel Olmo Martínez 7c942604f6 ceph: Get <ceph-volume inventory> data in dev. configmaps
**Description of your changes:**
This modification adds the information extracted from 'ceph-volume inventory':
command to the device configmaps generated by the discovery daemon when
"rook discover" starts with the new boolean "--use-ceph-volume" parameter.

Resolves #
https://github.com/rook/rook/issues/2606

Now the <cephVolumeData> field contains all the information returned
from <ceph-volume inventory> command.

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2019-11-06 10:22:56 +01:00
Sébastien Han 546271c179 Merge pull request #4172 from Madhu-1/csi-driver-object
CSI: Add support for CSIDriver object creation
2019-11-06 09:40:21 +01:00
Madhu Rajanna 9b368ef15c CSI: Create CSIDriver Object
This will be helpful to list the CSI drivers
deployed in the kubernetes cluster. if we have
N number of CSI drivers deployed in the cluster,
the user can query kubectl get csidriver and get
the list of registered CSI drivers and it requires
kube 1.14+

This removes the deployment of Attacher sidecar container,
as we are setting the attacher required to false during
the CSIDriver object creation.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-11-06 11:18:03 +05:30
Travis Nielsen 85c413b212 Merge pull request #4231 from egafford/generate-keyrings-before-MDS-deployment
ceph: Generate MDS keyrings before creating dependent deployments
2019-11-05 15:26:37 -07:00
Travis Nielsen 220033ee60 Merge pull request #4235 from egafford/generate-keyrings-before-RGW-deployment
ceph: Generate RGW keyrings before creating dependent deployments
2019-11-05 15:26:28 -07:00
egafford ecd9ff1672 ceph: Generate MDS keyrings before creating dependent deployments
Failure to create a keyring prior to creating a deployment
dependent on that keyring created a race conditition resulting
in an intermittent and unnecessary pod failure. This change
creates a keyring prior to deployment creation for MDS
daemons.

Partially fixes: rook#4089

Signed-off-by: egafford <egafford@redhat.com>
2019-11-05 15:02:15 -05:00
egafford 8ec1256af8 ceph: Generate RGW keyrings before creating dependent deployments
Failure to create a keyring prior to creating a deployment
dependent on that keyring created a race conditition resulting
in an intermittent and unnecessary pod failure. This change
creates a keyring prior to any RGW deployment.

Partially fixes: #4089
Signed-off-by: egafford <egafford@redhat.com>
2019-11-05 14:58:46 -05:00
Sébastien Han 1916cee895 ceph: relax cr block requirements
The only things that should be required are the name of the pool and the
namespace. We don't need to enforce the replication type as a
requirement.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1767249
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-05 18:11:31 +01:00
Blaine Gardner 97e07069dc Merge pull request #4195 from d-luu/fix_missing_ceph_mgr_annotation
ceph: fix set mgr annotations
2019-11-05 09:25:39 -07:00
Nizamudeen 1aaad8f3be ceph: added a check for triggering the orchestration
Fix for automatic orchestration triggering even if the cluster CRD is unchanged.

Signed-off-by: Nizamudeen <nia@redhat.com>
2019-11-05 15:25:29 +05:30
Umanga Chapagain 6dd474d6f4 ceph: adds retry to ObjectUser creation
retry ObjectUser creation as long as valid input is provided
or it times out. Retry every 15sec for 5min.

integration test creates ObjectUser before ObjectStore to
ensure that ObjectUser waits for ObjectStore to be created
and available

Closes: https://github.com/rook/rook/issues/3937
Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2019-11-05 12:45:45 +05:30
Travis Nielsen 47764715fe ceph: remove the location from the cluster CR
The topology of the cluster should be based on the node labels rather
than a setting in the cluster CR. This allows a much richer and more
dynamic topology to be configured. The location will now be ignored
if specified in the cluster CR.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-11-04 23:07:13 -07:00
d-luu 014431ee0d ceph: fix set mgr annotations
Mgr annotation was previously not being set.

Signed-off-by: d-luu <david@davidluu.info>
2019-11-04 15:22:24 -06:00
Sébastien Han ef6815ebfa ceph: remove topologyAware CRD option
We removed the topologyAware CRD option since it was redundant with the
use of an OSD being backed by a PVC.
So now, if an OSD is backed by a PVC we assume the topology aware
decision and will discover zone and region labels on that host.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-04 09:53:14 -07:00
Travis Nielsen 831c15086a ceph: support all layers of CRUSH map with node labels
The node labels were already supported for zones and regions to add to
the CRUSH map. Now all layers of the CRUSH map will be supported
with the new labels such as topology.rook.io/rack.
The labels will be detected at the osd startup time
similar to the zone and region labels already being detected.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-10-31 14:47:18 -06:00
Travis Nielsen 1593e52933 Merge pull request #4138 from ashleyw/master
edgefs: Add NET_ADMIN to corosync container capabilities
2019-10-30 16:44:48 -06:00
Travis Nielsen b31b570c1f Merge pull request #4220 from rohantmp/uniqueToleration
Ceph: fix the deduplication of tolerations collected for the drain-canary
2019-10-30 13:12:26 -06:00
Travis Nielsen b04567c0bd Merge pull request #4222 from sp98/fix-orchestration-restart
stop orchestration restart on device config map update for osd on pvc
2019-10-30 13:11:27 -06:00
Rohan CJ b16d55f4a0 Ceph: fix the deduplication of tolerations collected for the drain-canary
- Implement exportable TolerationSet with the following differences:
  - Change map key to a string to ensure it is deterministic.
    The old key was a struct that included a pointer.
  - Sort the outputted list by this key to ensure the order is deterministic.
  - Get the tolerations from the deployment instead of the pod as pod tolerations
    are sometimes modified by the system. We only want user provided tolerations
    in our deployment.
- Modify tests to try duplicate keys from different structs. The old way tested duplicate
  keys using the same structs.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-10-30 22:42:01 +05:30
Santosh Pillai d1c82015f9 ceph: stop orchestration restart on device config map update for osd on pvc
when running OSD on PVC, orchestration should not be started again if there is any change in the device config
map. Added a check to skip orchestration on device CM update when StorageClassDeviceSets are available,
that is, when running osd on pvc.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2019-10-30 20:00:27 +05:30
Travis Nielsen 95171c682b ceph: continue with orchestration if a single mon pod fails to start
If the cluster has previously been initialized and the operator
is restarted, the operator needs to perform the first orchestration
to confirm basic cluster health, then start watching for CR events.
If there was a single mon pod in a failed or pending pod state, the
orchestration was blocked even if just one mon was in this state.

The scenario is when a node is lost and a mon and the operator happen
to be running on that node. The operator will restart, but the mon
will not restart because it is tied to the node that died (unless running
on a PVC). The mon would remain in a pending state while attempting
to schedule on the node that is down indefinitely and the operator would
be blocked indefinitely. Now we will just log the error and attempt
to continue.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-10-30 08:24:18 -06:00
Sébastien Han 09e29d01b1 Merge pull request #4214 from leseb/skip-restorecon
ceph: osd hide 'restorecon' when necessary
2019-10-30 14:44:30 +01:00
Sébastien Han 69a3a52f37 Merge pull request #4213 from rohantmp/canaryImage
Ceph: use the rook image for drain-canaries.
2019-10-30 11:57:36 +01:00
Sébastien Han d224fbdef1 ceph: osd hide 'restorecon' when necessary
Some testing on OpenShift has shown that enabling Hostnetworking causes
issues with ceph-volume creating OSD.
This is a pure Red Hat OpenShift downstream issue.

This is meant to be temporary while we are waiting for the Selinux team
to get back to us.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-30 11:32:15 +01:00
Rohan CJ 17f6a25b2b Ceph: use the rook image for drain-canaries.
Change the canaries to use the rook image instead of the busybox image to
run `sleep infinity`. This removes our dependency on an external image that
we do not control.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-10-30 12:47:14 +05:30
Travis Nielsen 1bab64687b Merge pull request #4198 from egafford/generate-keyrings-before-OSD-deployment
ceph: Generate keyrings before OSD deployment
2019-10-29 16:51:36 -06:00
egafford 51689b6d3f ceph: Generate keyrings before OSD deployment
Generating keyrings after deployments created a race condition
resulting in intermittent OSD pod failure on the first attempt.
This change creates keyrings prior to creation of OSD deployments
and updates the owner after the creation of a deployment.

Partially fixes: rook#4089
Signed-off-by: egafford <egafford@redhat.com>
2019-10-29 16:01:50 -04:00
Travis Nielsen 3d5addc282 Merge pull request #4123 from thotz/obc
objectstore: set quota for max_bucket into -1 in Grant()
2019-10-28 13:40:39 -06:00
Dmitry Yusupov 2b80eaf052 Merge pull request #4190 from sabbot/sysrepcount-failuredomain-validation
FailureDomain/SysRepCount validation
2019-10-25 10:36:53 -07:00
Ashley Williams 05aba33636 fix: add NET_ADMIN to corosync container capabilities
Resolves https://github.com/Nexenta/edgefs/issues/393

Signed-off-by: Ashley Williams <hi@ashleyw.co.uk>
2019-10-25 16:37:34 +01:00
Anton Skriptsov d75a281d6e edgefs: FailureDomain-SysRepCount validation
Additional failureDomain,sysRepCount validation

Signed-off-by: Anton Skriptsov <sabbotagge@gmail.com>
2019-10-25 06:27:35 -07:00
Sébastien Han 5662911317 ceph: fix set osd prepare resources
Use the right struct field. Previously it was pointing to the osd global
resource now it does the osd prepare.

Closes: https://github.com/rook/rook/issues/4182
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-25 10:55:25 +02:00
Sébastien Han 07f9780396 Merge pull request #4179 from travisn/nfs-owner-ref
NFS: Set correct owner reference for garbage collection
2019-10-25 10:21:06 +02:00