Commit Graph
5036 Commits
Author SHA1 Message Date
Guangming Wang e5e0369e37 cleanup: cleanup codebase
exec.go: use String method of bytes itself.

Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-11-07 19:45:32 +08: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
Sébastien Han 6dff2afe8b ceph: osd update error message
Add a more meaninful message.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-29 16:58:16 +01: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
Sébastien Han 1f783041b2 Merge pull request #4180 from travisn/flex-attach
Flex driver should not allow attach before detach on a different node
2019-10-25 10:13:31 +02:00
Travis Nielsen f7d7aa0b7f ceph: flex driver should not allow attach before detach
If a volume is being attached, it should be verified that the volume
is safe to attach. The volume was assumed to be safe to attach if it was
for the same pod. But this was assuming the pod of the same name would be
on the same node. This is true for pods created from deployments, but not
for pods that are part of a stateful set. A stateful set will maintain the
pod name even as the pod is failed over to a new node. Therefore, the fencing
much check if the pod is from the same node before allowing the attach to
continue. Otherwise, we need to wait for the volume to be detached from the
other node.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-10-24 16:55:57 -06:00
Travis Nielsen 092b046f2c Merge pull request #4168 from leseb/use-quorum_status
ceph: use quorum_status instead of mon_status
2019-10-24 16:14:42 -06:00
Travis Nielsen fa834d9a20 nfs: set correct owner reference name for garbage collection
The owner reference for the NFS custom resource was using the namespace
instead of the name. This causes the k8s garbage collector to remove the
nfs resources in some scenarios such as restarting etcd.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-10-24 14:24:45 -06:00
Song Gao 8d0e6ea36d ceph: add label for CSI deployments/daemonsets/statefulsets
Add rook version label to CSI deployments/daemonsets/statefulsets just as the Ceph daemons.

Signed-off-by: Song Gao <2695690803@qq.com>
2019-10-24 23:42:45 +08:00
Sébastien Han 98bc8e4ca0 ceph: revert "CSI: Add support for CSIDriver object creation"
I merged https://github.com/rook/rook/pull/4169 too quickly and didn't
noticed we were supposed to wait for csi 1.2.2.

This reverts commit 520ad44d71.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-24 12:30:11 +02:00
Madhu Rajanna 520ad44d71 CSI: Add support for CSIDriver object creation
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+
and also the functionality is disabled by default

More info here: https://github.com/ceph/ceph-csi/pull/698

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-10-24 15:08:26 +05:30
Sébastien Han aa9f408822 ceph: use quorum_status instead of mon_status
In Octopus, this commit
https://github.com/ceph/ceph/pull/30859/commits/c09b82a80a392ccd0da7677c7b424ce5cd3fa5d6
moved the quorum_status command to a socket call. Thus, the `ceph
quorum_status` command does not exist anymore, to use it we need to do
`ceph daemon mon.$ID quorum_status`. However, this command only works
locally so it won't work if we run it from the operator.
The `ceph mon_status` command is a general command that run from
anywhere and returns the mon map, let's use this one on the operator
code.
This is not a breaking change.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-24 11:27:52 +02:00
Travis Nielsen 0178724425 Merge pull request #4033 from travisn/mgr-module-async
Run the mgr module configuration asynchronously
2019-10-23 12:28:01 -06:00
Sébastien Han 9f053ca4e1 ceph: osd remove --conf flag
Even legacy osds were still running with this flag. In my previous patch
I was trying to minimize the impact of the change and was afraid the
config file was holding important information but that appears not to be
true.

The only option in the config could have the keyring path, but it's
passed in the CLI startup line.

Closes: https://github.com/rook/rook/issues/4063
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-23 11:43:28 -06:00