Commit Graph
7961 Commits
Author SHA1 Message Date
Elise Gafford 32e5d09336 ceph: remove CSI resources on deletion of last cluster
We create CSI resources when we create the first Ceph cluster.
This change deletes all CSI resources when we delete the last Ceph
cluster.

Partially resolves: #4234
Signed-off-by: Elise Gafford <egafford@redhat.com>
2019-11-22 10:33:39 -05:00
Blaine Gardner e947187dd4 Merge pull request #4352 from Madhu-1/csi-v1.2.2
CSI: update ceph-csi from v1.2.1 to v1.2.2
2019-11-21 14:57:08 -07:00
Elise Gafford 3adcb67755 ceph: add removeCallbacks hook to Operator and ClusterController
In order to remove Ceph-CSI resources after deletion of the last
Ceph cluster, the operator must be able to perform post-processing
actions on cluster deletion. This change creates a hook for the
addition of post-deletion operator callback functions.

Partially resolves: #4234
Signed-off-by: Elise Gafford <egafford@redhat.com>
2019-11-21 11:11:25 -05:00
Elise Gafford 35336bc03f ceph: add ownerRefs to CSI resources
In order to facilitate the deletion of CSI resources, this patch
adds ownerReferences to all CSI deployments, daemonsets, and
services. This ownerRef refers to the CSI ConfigMap in all cases.

Partially resolves #4234
Signed-off-by: Elise Gafford <egafford@redhat.com>
2019-11-21 11:07:25 -05:00
Travis Nielsen 572d895a42 Merge pull request #4346 from rohantmp/drainDelay
Ceph: Add delay between drain switches
2019-11-20 21:32:51 -08:00
Madhu Rajanna 7f14b52ba6 CSI: update ceph-csi from v1.2.1 to v1.2.2
cephcsi v1.2.2 release is out and the image is available
for use, updating rook to use latest available release
image

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-11-21 10:59:20 +05:30
Rohan CJ e408c5fd7f Ceph: Add delay between drain switches
Earlier, simultaneous drains could allow the drain detection to switch
disabled PDBs before the Ceph health had fully reflected the effects.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-11-21 07:22:22 +05:30
Woohyung Han 9bbff4195a Ceph: Fix NFS document with wrong label
In NFS document, the document example explain with
`-l name=nfs-busybox` label, however no corresponding label in
previous section. Fix to the label mentioned in the previous
section.

Signed-off-by: Woohyung Han <techhanx@gmail.com>
2019-11-20 16:54:31 +09:00
Sébastien Han c3370ef3c6 ceph: add missing pod sec context for crash
When running on OCP we must use priv containers so that we can chown the
hostpath dir properly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-19 07:18:02 -08:00
Travis Nielsen 8e3a620bc5 Merge pull request #4335 from Madhu-1/update-sidecar
CSI: update kubernetes sidecar images
2019-11-18 22:57:06 -08:00
Madhu Rajanna 49381b322d CSI: update kubernetes sidecar images
update csi sidecar images to fix CVE-2019-11255

more info:
https://github.com/kubernetes/kubernetes/issues/85233
https://github.com/kubernetes-csi/external-snapshotter/issues/193
https://github.com/kubernetes-csi/external-provisioner/issues/380

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-11-19 10:20:12 +05:30
Travis Nielsen d0a736c905 Merge pull request #4328 from travisn/fast-stop-osd
Stop osd process more quickly during pod shutdown to reduce IO unresponsiveness
2019-11-18 19:30:03 -08:00
Travis Nielsen ba6fcffd8f ceph: stop osd process more quickly during pod shutdown
The OSD needs to shut down quickly during upgrade, or other scenarios
where the OSD is being restarted. To facilitate this fast shutdown,
rook will run kill -9 on the osd process. The Ceph OSD is designed
to be safe even when killed like this. This allows the
ECONNREFUSED to be returned sooner, which will redirect the OSD
traffic to other OSDs and cause less downtime.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-11-18 19:01:47 -08:00
Travis Nielsen 9eea60f9f4 ceph: release the LV immediately after the osd process exits
When the OSD is running on a PVC, the LV needs to be released immediately
after the OSD process exits. The cleanup was being skipped when the OSD
process exited and returning an error rather than allowing the
LV cleanup to proceed.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-11-18 19:01:02 -08:00
Blaine Gardner f32cecb701 Merge pull request #3206 from d-luu/ceph_priority_classes
ceph: added priority classes to components
2019-11-18 11:27:57 -07:00
Sébastien Han 7ac4b01a4d Merge pull request #4320 from leseb/lvm-skip
ceph: osd various lvm enhancement
2019-11-18 09:32:18 -08:00
Travis Nielsen 893b80e8c9 Merge pull request #4332 from ShyamsundarR/csidriver-fix
CSI: Make attach mandatory in ceph CSIDriver object
2019-11-17 19:28:00 -07:00
d-luu 9c755fac66 ceph: added priority classes to components
Adds priority class support to Ceph components
  to influence scheduler's pod preemption

Signed-off-by: d-luu <david@davidluu.info>
2019-11-15 16:28:41 -06:00
Sébastien Han 7553318235 ceph: osd append instead of replace
Since the lvm config might change again in the future and because the
filter in the conf is commented as an example, let's append our filter
instead of searching and replacing.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-15 22:54:10 +01:00
Sébastien Han 8c8b8e7fef ceph: osd add more details when changing lvm conf
Let's be more verbose and informative when we are performing actions.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-15 22:54:09 +01:00
Sébastien Han 3e82a0f4a6 ceph: osd add env var to skip uded on lvm
With DM_DISABLE_UDEV, LVM will avoid interaction with udev.
LVM will manage the relevant nodes in /dev directly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-15 22:54:03 +01:00
ShyamsundarR 48a0decc49 CSI: Make attach mandatory in ceph CSIDriver object
A recent PR #4172 added the ability for rook to create
the CSIDriver object on a kubernetes cluster. The change also
made it so that attachRequired value in the ceph CSI drivers
were set to false.

This leads to the entire attach skipping the AD controller
that deals with RWO attachment enforcement. Thus, if a
CephFS volume is marked RWO, 2 pods on different hosts can
end up mounting the same and consuming it at the same time.

Further for RBD, currently the image watchers are the only ones
that prevent a double mount of an image, other than the AD controller
enforcement of single attach for RWO RBD PVs. This has proven
not to be reliable in the face of MON failures, as the watcher
information is lost, and a second mount is allowed.

Thus, we need to bring back the attach requirement to leverage
kubernetes checks and balances for RWO volume type, and
prevent unwanted multi-attach use of the same.

This PR hence undoes some of the changes introduced by the
PR #4172, to bring the attacher side car back, and also declare
the attachRequired for both RBD and CephFS CSI plugins as true.

NOTE: Initially the attachRequired was set to false as this
improved attach times considerably on kubernetes, as the
entire phase was being avoided.

Signed-off-by: ShyamsundarR <srangana@redhat.com>
2019-11-15 16:15:53 -05:00
Sébastien Han 59164f2bca Merge pull request #4326 from travisn/doc-pvc-usage
Add osd anti-affinity to the example of OSDs on PVCs
2019-11-15 19:54:51 +01:00
Travis Nielsen 93543a2565 Merge pull request #4321 from leseb/reorganize-design-dir
design: add backends to their respective directories
2019-11-15 11:01:15 -07:00
Travis Nielsen dd04c5f1bc ceph: add anti-affinity for the example of osds on pvcs
OSDs on PVCs need some anti-affinity or other node affinity in order
to attempt to spread the OSDs across nodes. The OSD anti-affinity
is only effective when the number of OSDs matches the node count,
but at least it is a start.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-11-15 08:30:15 -07:00
Sébastien Han 91b76cc24c doc: update design links
Since we re-organized the design directory we need to update the links
in various files.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-15 11:29:46 +01:00
Travis Nielsen dd97c01682 Merge pull request #4323 from SUSE/fix-appname-cmdreporter
k8sutil: cmdreporter: properly set app name
2019-11-14 19:21:37 -07:00
Blaine Gardner 71573077d3 k8sutil: cmdreporter: properly set app name
The app name was not being set in k8sutil's cmdreporter code, resulting
in jobs being labeled `app=` with no name. Change cmdreporter's `New`
method to validate the contents of the config struct and not the inputs
to the `New` method to help prevent an issue like this from creeping up
in the future.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-11-14 15:50:26 -07:00
Blaine Gardner 76e3d22de6 Merge pull request #3495 from SUSE/legacy-osd-integration-test
ceph: in upgrade test, ensure legacy osds run
2019-11-14 15:49:40 -07:00
Dmitry Yusupov 951b85c5a4 Merge pull request #4294 from sabbot/isgw-configuration
edgefs: Additional ISGW configuration
2019-11-14 14:30:07 -08:00
Sébastien Han cc2750459b Merge pull request #4319 from rohantmp/drainFix
Ceph: Ensure draining state is set and checked correctly.
2019-11-14 15:11:16 +01:00
Sébastien Han 3c28d3368d design: add backends to their respective directories
Add missing directories and re-organize the folder.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-14 12:48:04 +01:00
Rohan CJ e8198d44d5 Ceph: Fix bug: clusterdisruption noout timestamp was being reset periodically
The timestamp was being periodically cleared and reset, so the noout never expired.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-11-14 15:29:12 +05:30
Rohan CJ e51e9f3ec9 Ceph: Ensure draining state is set and checked correctly.
- Checking whether drain was incorrectly checked precense in map instead
  of string length. The actual zero value was an empty string.
- Unsetting drain did not check if the cluster was clean.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-11-14 13:20:55 +05:30
Travis Nielsen b24a1e545e Merge pull request #4312 from leseb/lvm-filter
ceph: update lvm filter
2019-11-13 13:40:28 -07:00
Blaine Gardner b9a5717356 integration: raise retry loop count
Raise the retry loop count to stabilize the integration tests.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-11-13 12:23:18 -07:00
Blaine Gardner e5f2f45408 ceph: integration: add pre-test disk wipe job
Before starting an integration test, run a job on all nodes to wipe the
disks so that the integration tests will actually test Rook using the
disks for storage.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-11-13 12:23:18 -07:00
Blaine Gardner 79160abd18 ceph: in upgrade test, ensure legacy osds run
During upgrade tests, Rook should verify that it can still run legacy
OSDs. This includes directory-based OSDs, filestore disk OSDs, and
bluestore disk OSDs installed without ceph-volume (i.e., before mimic
v13.2.2) can still be run after upgrade.

This necessitates running the upgrade test twice; once with filestore
and once with bluestore.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-11-13 12:23:17 -07:00
Sébastien Han 8c3db31e35 ceph: update lvm filter
The following commit from LVM
https://github.com/lvmteam/lvm2/commit/08396b4bce45fb8311979250623f04ec0ddb628c#diff-13c602a6258e57ce666a240e67c44f38
updated the lvm.conf and thus changed our filter. So now it does not
match anymore.
Updating the filter to match fixes that issue.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-13 17:46:47 +01:00
Sébastien Han 314394f464 Merge pull request #4281 from rohantmp/consolidated
Ceph: Fix topology logic for drains.
2019-11-13 16:37:09 +01:00
Rohan CJ 1ba2633c27 Ceph: Clean up canaries on nodes that no longer have OSDs or when the node is deleted.
This prevents long-lasting false positives that prevent the ordered progression
of drains.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-11-13 16:04:45 +05:30
Rohan CJ dd3f0ca63c Ceph: Set the drain-canaries deployment ownerReference to the rook operator.
The drain canary was not being garbage collected properly.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-11-13 16:04:45 +05:30
Rohan CJ a930264b55 Ceph: Add node topology labels to the drain-canary.
This serves to make the drain-canary selectable by failure domain.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-11-13 16:04:45 +05:30
Rohan CJ 9ec12a587b Ceph: Fix node name checking in the clusterdisruption controller.
Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-11-13 16:04:24 +05:30
Sébastien Han d9679e5cf4 Merge pull request #3316 from leseb/ceph-crash
ceph: add ceph-crash controller
2019-11-12 23:16:02 +01:00
Sébastien Han 496e6e52cd Merge pull request #4260 from leseb/cv-skip-restorecon
Ceph-volume skip restorecon
2019-11-12 20:59:53 +01:00
Sébastien Han 5d16ffc766 Merge pull request #4286 from anmolsachan/utilization_alert
ceph: update cluster storage utilization alert threshold and timing
2019-11-12 19:43:53 +01:00
Travis Nielsen 4d75d7f71a Merge pull request #4249 from travisn/roadmap-1.2
Update the roadmap for the rook v1.2 release
2019-11-12 10:00:26 -07:00
Sébastien Han 109e6521db Merge pull request #4268 from oneoneonepig/master
ceph: kubectl edit should be kubectl patch
2019-11-12 17:28:02 +01:00
Sébastien Han a0fdf1bb5f ceph: add CEPH_VOLUME_SKIP_RESTORECON env var
This will tell ceph-volume not to run any restorecon commands.

This relies on https://github.com/ceph/ceph/pull/31421

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-12 16:27:20 +01:00