Commit Graph
1057 Commits
Author SHA1 Message Date
Sébastien Han 929853b652 ceph: remove ROOK_VERSION from the mgr pod
Because of this, the mgr would be restarted if the operator image
change. This must not happen.
Added unit tests for cephMgrOrchestratorModuleEnvs() as well.

Closes: https://github.com/rook/rook/issues/4361
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-26 15:40:36 +01:00
Sébastien Han 088548a7f3 Merge pull request #4360 from travisn/upgrade-log-msg
Clarify log message for Ceph upgrades
2019-11-25 23:31:53 -08:00
Travis Nielsen a376263d8d Merge pull request #4344 from leseb/crash-priv
ceph: add missing pod sec context for crash
2019-11-25 10:27:39 -07:00
Travis Nielsen 87e2b09453 ceph: clarify log message for Ceph upgrades
Some log messages indicate when the upgrade checks will be
performed. If the Ceph image hasn't changed, the upgrade checks
are skipped. The messages were confusing if running a Rook
upgrade.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-11-22 09:03:03 -07: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
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
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
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
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 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
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
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
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
Dmitry Yusupov 951b85c5a4 Merge pull request #4294 from sabbot/isgw-configuration
edgefs: Additional ISGW configuration
2019-11-14 14:30:07 -08: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
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 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
Sébastien HanandRohan CJ 90cd8224f4 ceph: add ceph-crash controller
A new controller to bootstrap ceph-crash pod on Ceph nodes running Ceph
pods only.

This implementation is unfortunately a mix of 'hacks' to make the daemon
working correclty. The ceph-crash script faced different issues:

* it's not a daemon
* it does not have any key in cephx
* it runs ceph commands under the hood which need an admin key and a
ceph.conf

On upstream Ceph, ceph-crash needs to grow better, once that happens we
will improve our implementation.

This also enhances osd provisionConfig struct with DataPathMap

Pod volumes and volume mount needs DataPathMap to perform the right
actions on log and crash dir. Exposing DataPathMap makes that possible.

Obviously, this is exposing ceph crash reports on the host as
well as pushing them into the mgr.
Basically, if a daemon fails, it'll put its core dump into
/var/lib/ceph/crash, bindmounting this dir on the host, ensures that the
crashes don't get lost when the pod dies.

Example:

```
[leseb@tarox~/go/src/github.com/rook/rook][rgw-liveprobe !] kubectl -n rook-ceph exec -ti rook-ceph-crashcollector-minikube-574858b99c-zvg4z bash
bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_TIME: cannot change locale (en_US.UTF-8): No such file or directory
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]# ceph crash ls

[root@rook-ceph-osd-2-7644f99695-cljzh /]# pidof ceph-osd
13258 5415 5397
[root@rook-ceph-osd-2-7644f99695-cljzh /]# kill -SIGABRT 13258
[root@rook-ceph-osd-2-7644f99695-cljzh /]# ls /var/lib/ceph/crash/
2019-11-12_12:56:51.404109Z_39f060e1-776d-4605-8f28-85c97e53de96     posted

... wait maximum 10 min (ceph-crash scraps every 10 minutes)
... the container will exit

[root@rook-ceph-osd-2-7644f99695-cljzh /]# exit
[leseb@tarox~/go/src/github.com/rook/rook][rgw-liveprobe !]
[leseb@tarox~/go/src/github.com/rook/rook][rgw-liveprobe !] kubectl -n rook-ceph exec -ti rook-ceph-crashcollector-minikube-574858b99c-zvg4z bash
bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_TIME: cannot change locale (en_US.UTF-8): No such file or directory
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]#
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]#
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]# ceph crash ls
2019-11-12_12:56:51.404109Z_39f060e1-776d-4605-8f28-85c97e53de96 osd.1
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]# ls /var/lib/ceph/crash/
posted
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]# ls /var/lib/ceph/crash/posted/
2019-11-12_12:56:51.404109Z_39f060e1-776d-4605-8f28-85c97e53de96
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]# tail /var/lib/ceph/crash/posted/2019-11-12_12\:56\:51.404109Z_39f060e1-776d-4605-8f28-85c97e53de96/log
   1/ 5 mgr
   1/ 5 mgrc
   1/ 5 dpdk
   1/ 5 eventtrace
  -2/-2 (syslog threshold)
  -1/-1 (stderr threshold)
  max_recent     10000
  max_new         1000
  log_file /var/lib/ceph/crash/2019-11-12_12:56:51.404109Z_39f060e1-776d-4605-8f28-85c97e53de96/log
--- end dump of recent events ---
```

Signed-off-by: Sébastien Han <seb@redhat.com>
Co-authored-by: Rohan CJ <rohantmp@gmail.com>
2019-11-12 16:06:07 +01:00
Sébastien Han 76c33e0f85 Revert "ceph: osd hide 'restorecon' when necessary"
This reverts commit d224fbdef1.
Since https://github.com/ceph/ceph/pull/31421, the monkey patching of
'restorecon' is not needed anymore.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-12 15:34:12 +01:00
Sébastien Han 124a98bc67 ceph: expose AppName of mgr and rbd-mirror
The ceph-crash controller needs to access the app name, so let's export them.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-12 13:50:36 +01:00
Travis Nielsen 0bb8000825 Merge pull request #4273 from egafford/associate-keyrings-with-deployments
ceph: Standardize association of keyrings with deployments
2019-11-11 17:06:24 -07:00
Anton Skriptsov 2c543c4cdb edgefs: Additional ISGW configuration
Signed-off-by: Anton Skriptsov <sabbotagge@gmail.com>
2019-11-11 11:04:14 -08:00
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
egafford bb7aac4b62 ceph: Standardize association of keyrings with deployments
This change standardizes the ownerRefs of Ceph keyrings to
k8s Deployment resources across all daemons and refactors a
bit of duplicate code on keyring association for ease of
maintenance.

Fixes: #4089

Signed-off-by: egafford <egafford@redhat.com>
2019-11-08 09:50:37 -05: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