Commit Graph
1317 Commits
Author SHA1 Message Date
Sébastien Han a42cc44d11 Merge pull request #3894 from mvollman/osd_ceph_conf
ceph: fix encrypted osd startup
2019-09-25 09:00:06 +02:00
Sébastien Han 24fc94cc57 Merge pull request #3955 from leseb/cv-debug-prepare
ceph: various osd fixes and improvements with lvm and ceph-volume
2019-09-25 08:46:34 +02:00
Sébastien Han 21e44c29e9 Merge pull request #3969 from leseb/osd-socket
ceph: osd reset 'run dir' to default location
2019-09-25 08:45:46 +02:00
Sébastien Han 42cebf6311 ceph: osd run lvm config all the time
Previously, we were applying lvm config changes to OSD running on PV. So
now, we do this for any type of cluster deployment (bare metal or
Cloud).

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-24 22:49:39 +02:00
Sébastien Han 3404460d3c ceph: osd, fix lvm filter regexp
The lvm documentation uses commas to separate the regular expressions.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-24 17:17:29 +02:00
Sébastien Han 9b2afbca14 ceph: osd add debug logs for ceph-volume on prepare
Previously the debug flag was turned on for the 'activate' call only,
now 'prepare' will also take advantage of it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-24 17:17:29 +02:00
Travis Nielsen 9affd75752 Merge pull request #3959 from Madhu-1/fix-svc-crt
Update service if already present
2019-09-24 08:44:14 -06:00
Sébastien Han ad514606bf ceph: osd reset 'run dir' to default location
Previously, "run dir" was used to place a number of file and config on
dataDirHostPath. Now, since a lot of configs and options have moved
either on the OSD's startup CLI line or remove with bluestore we don't
need to change the default.

Also, it was confusing for user and difficult to find the socket.
The is is not breaking any config in dataDirHostPath since all the
elements (keyrings) are hardcoded in the config file.

Closes: https://github.com/rook/rook/issues/3966
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-24 10:27:59 +02:00
Sébastien Han d8813513eb ceph: fix various spelling issues
Correct spelling.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-24 10:26:22 +02:00
Kristoffer Grönlund fb599dd02b Ceph: Remove finalizer even if flex is disabled
When the flex driver is disabled, the check for
volume attachments will fail and the finalizer
is never removed. To avoid this, just log the
failure to list volumes and remove the
finalizer anyway.

Resolves #3912

Signed-off-by: Kristoffer Grönlund <kgronlund@suse.com>
2019-09-24 08:22:30 +02:00
Madhu Rajanna bdfdac8ee4 Update service if already present
previously we are not updating the service
if it's already present. with this change,
we will update the service. this does not
trigger any error message if service
already present.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-09-24 09:43:02 +05:30
Michael Vollman e12bbd6f7c ceph: fix encrypted osd startup
Encrypted OSDs are failing because ceph-volume is unable to determine
how to contact the monitors.  Setting the CEPH_CONF env variable for OSD
pods fixes this issue. (#3846)

Signed-off-by: Michael Vollman <michael.b.vollman@gmail.com>
2019-09-20 16:36:52 -04:00
travisn f3ce214822 ceph: configure additional lvm settings for rhel8
RHEL8 introduces some lvm changes. For OSDs on PVs to work
we need to set allow_changes_with_duplicate_pvs = 1.
This is required since we're copying the block image
under another location.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-09-20 11:51:07 -06:00
Travis Nielsen 5f37de8abc Merge pull request #3927 from Madhu-1/fix-3921
Make kubelet path configurable in operator for csi
2019-09-20 10:45:27 -06:00
Travis Nielsen 70c44c6eea Merge pull request #3924 from travisn/osd-on-pvc-nodename
Ceph: OSD pods should always use hostname for node selector
2019-09-20 10:45:10 -06:00
Travis Nielsen 03f328b0ed Merge pull request #3755 from sp98/fix-osd-on-pvc
[osd on pvc] deactivate device from lvm after OSD Prepare and OSD daemon pod ends
2019-09-20 10:43:33 -06:00
Madhu Rajanna 345f099bbc Make kubelet path configurable in operator
currently CSI templates have hardcoded kubelet
path which will  be used for  mounting PVC,this
will not work if kubelet is configured to use
different path, with this PR  kubelet path
can be configured for CSI.

Fixes: #3921

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-09-20 18:51:44 +05:30
Santosh Pillai 9db863377a release the device held onto by lvm
When running osds on pvc, the lvm is still holding the device when the cluster is deleted. As a result the PVs go into `failed` state
when the cluster is deleted. On deactivating the device, the 'failed' pvs get deleted as well. Solution involves:
- Running `lvchange -an <vg group name>` to deactivate the device.
- This command runs after 'osd prepare' completes.
- This command also runs after the 'osd daemon pod' is deleted or if the ceph-osd process terminates for some reasons.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2019-09-20 18:08:13 +05:30
Rohan CJ 195f20ad01 Pick up tolerations for drain canary pod from the osd.
This change is necessary drain canary pod needs to be schedulable on
the same nodes as the OSDs. Since it affects multiple OSDs, we need to
gather tolerations from multiple OSDs.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-09-20 15:15:08 +05:30
travisn 57d446ec6f ceph: osds to always use hostname for node selector
The node selector for running OSDs on PVCs was using the node name
rather than the node's hostname. In clusters where the node name
is different from the hostname this would cause the osd daemons
to be in pending state indefinitely. Now the node selector will
use the hostname as expected.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-09-19 16:01:52 -06:00
Travis Nielsen 30fe718a97 Merge pull request #3907 from leseb/c-v-debug-log
ceph: enable ceph-volume debug logs
2019-09-19 12:19:20 -06:00
Sébastien Han 4e3ad8b8b8 Merge pull request #3916 from leseb/rm-used-func
test: remove unused function
2019-09-19 18:09:17 +02:00
Sébastien Hanand: Tuan Do Anh 13686e3f8c test: remove unused function
Remove dead code.

Co-authored-by:: Tuan Do Anh <tuanda@vn.fujitsu.com>
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-19 11:37:14 +02:00
Sébastien Han 087d71106b ceph: add a new CR property to force upgrades
On rare occasion, the ceph checks might not be 100% correct and the user
might decide to force an upgrade anyway.
Correctly, if we are in an upgrade, we perform `ok-to-stop` check for
each daemon, if one of them fails, we retry and eventually fail.
They are corner-cases where users would like to force the upgrade anyway.

Enhance the new CR property: "skipUpgradeChecks: true".

Closes: https://github.com/rook/rook/issues/3872
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-19 10:55:56 +02:00
Sébastien Han c96fe8b5f8 ceph: enable ceph-volume debug logs
It's fine to enable debug logs from c-v, it's not so verbose and really
useful when debugging.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-18 13:55:18 +02:00
Sébastien Han 11640f030a Merge pull request #3822 from krig/ceph-dashboard-port
Ceph: Use HTTP port if SSL is disabled
2019-09-18 11:29:56 +02:00
Travis Nielsen 6469b06f0a Merge pull request #3870 from leseb/fix-cmd
ceph: fix upgrade commands
2019-09-17 23:24:55 -06:00
Travis Nielsen 480312c976 Merge pull request #3889 from leseb/use-v14.2.4-20190917
ceph: bump to v14.2.4
2019-09-17 16:56:51 -06:00
travisn 60290943ef ceph: ensure the csi secret exists on upgrade
The CSI secret was only being created for new clusters.
Upgraded clusters did not have the secret generated. To support
upgraded clusters to use CSI, we always ensure the csi secret
exists when the orchestration runs.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-09-17 12:15:37 -06:00
Sébastien Han 171c4ac438 ceph: fix upgrade commands
Several commands were not using the cli finalizer function which builds
up the right argument to run a ceph command. This was working on the
operator since it used to have an /etc/ceph/ceph.conf file so we could
ran the command without specifying the ceph conf and key paths.
However, we recently removed that and it silently broke this "already"
broken code :).

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-17 18:59:42 +02:00
Blaine Gardner 908675bb17 Merge pull request #3847 from leseb/more-pg-autoscaler
pg autoscaler and osd bluefs fixes
2019-09-17 09:43:55 -06:00
Sébastien Han d3104ed47b Merge pull request #3879 from ashishranjan738/mdbfix
fix(fencing): changes mdb controller to use namespace for checking ceph status
2019-09-17 15:34:59 +02:00
Sébastien Han bc6dcb9995 ceph: bump to v14.2.4
v14.2.4 just got released so let's use it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-17 15:08:15 +02:00
Sébastien Han f7df86df16 Merge pull request #3569 from galexrt/docs_improve
docs/ceph: add list of unusable directories paths
2019-09-17 12:20:01 +02:00
Ashish Ranjan c4ee336fe0 fix(fencing): change mdb controller to use namespace for checking status
This commit changed mdb controller to make use of cephCluster's namespace instead of cephCluster's name for checking the ceph health as the ceph config is located in the cephCluster's namespace folder which can makes mdb controller fail when rook operator is deployed in any other namespace apart from rook-ceph.

Signed-off-by: Ashish Ranjan <aranjan@redhat.com>
2019-09-17 11:46:54 +05:30
Travis Nielsen 5295dfb200 Merge pull request #3844 from leseb/nfs-needs-mds
nfs: fail if no mds are running
2019-09-16 18:11:40 -06:00
Sébastien Han c0843f2184 nfs: fail if no mds are running
In order to run ganesha exporting cephfs we must have an MDS server
running. So, we check if the pool was created.
If not present we fail the instanciation of the CR.

Closes: https://github.com/rook/rook/issues/3835
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-16 09:48:58 +02:00
Sébastien Han 22c9c3a813 ceph: disable bluestore warn on legacy statfs
When upgraded to Octopus or 14.2.5, OSDs will fix themselves on the fly at
startup, so we just need to silence this warning for now.
No migration is needed.

Closes: https://github.com/rook/rook/issues/3539
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-16 09:33:00 +02:00
Kristoffer Grönlund d67ef2bcdd Ceph: Use HTTP port if SSL is disabled
Using port 8443 / dashboardHTTPS when not running HTTPS
is confusing, so use the dashboardHTTP port (7000 by
default) instead.

Also don't expose the dashboard port as "https-dashboard"
when not using https, instead expose as "dashboard".

Resolves #3810

Signed-off-by: Kristoffer Grönlund <kgronlund@suse.com>
2019-09-16 09:29:39 +02:00
Sébastien Han 11d3831d74 ceph: more mgr autoscaler option
Now that the pg_autoscaler is on by default, it is "normal" (and okay) to
have a small number of PGs in the cluster if the overall cluster usage is
also low. This setting just results in a health warning out of the box
when you create a pool and haven't written any data yet.

fyi: ceph upstream https://github.com/ceph/ceph/pull/30352

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-13 18:31:42 +02:00
Sébastien Han 5b930872b9 ceph: make lifecycle hook chown less verbose
It looks like on large store, the `--verbose` option is going over grpc
message buffer, since the output might be quite big.

See the error:

([chown --recursive --verbose ceph:ceph /var/log/ceph /data/rook-storage/osd11]) for
 Container "osd" in Pod "rook-ceph-osd-11-85dbbb5cd6-djttp_rook-ceph(4bf77ccd-d631-11e9-8334-fa163ed365ca)" failed - error: rpc error: code = ResourceExhausted desc = grpc: trying
to send message larger than max (15133688 vs. 8388608), message: ""

Removing the verbose flag should fix this.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-13 18:08:52 +02:00
Alexander Trost 0827df646a docs/ceph: add list of unusable directories paths
This adds a list of unusable directories paths to the Ceph Cluster CRD
doc page and the Ceph operator validation code. Reason for adding these
directories is that they are causing errors during Ceph OSD deployment.
Example: When an user wants to use `/rook` as a directory for an OSD,
the cluster deployment fails because the `mountPath`s must be unique:
```
Job.batch "rook-ceph-osd-prepare-NODE" is invalid: spec.template.spec.containers[1].volumeMounts[4].mountPath: Invalid value: "/rook": must be unique
```

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2019-09-13 14:06:32 +02:00
Sébastien Han 36d6120c3d Merge pull request #3819 from ashishranjan738/codefix
[Disruption logging]: Wrap the openshift fencing reconcilers with error loggers.
2019-09-12 11:04:49 +02:00
Sébastien Han af60060704 Merge pull request #3626 from jmolmo/issue-3603
Set "ssl_server_port" dashboard setting if it is present in ceph dashboard config
2019-09-12 09:52:44 +02:00
Sébastien Han ff73043b75 Merge pull request #3790 from umangachapagain/nbd-filter
ignore updates on nbd device
2019-09-11 17:59:15 +02:00
rohan47 a4639ae541 Changed the OSD DOWN message to debug level
We want the OSD DOWN message to be shown when debug option is set to
true in the rook-ceph operator.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2019-09-10 22:06:48 +05:30
rohan47 fcbce4898c Set the Command property for the OSD prepare init container blkdevmapper
If a Ceph container image is specified which has a entrypoint then the
Init container for osd prepare job blkdevmapper will fail. So set the
Command property.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2019-09-10 22:05:50 +05:30
Ashish Ranjan 651efc26b1 Disruption: Wrapped the reconcile logic with a secondary reconcile func
This commit wraps the existing reconcile logic for mdb and machinelabel controller with a secondary reconcile func for better logging as rook's logging mechanism is not compatible with controller-runtime logging interface.

Signed-off-by: Ashish Ranjan <aranjan@redhat.com>
2019-09-10 13:28:55 +05:30
Blaine Gardner c91db82cde Merge pull request #3811 from SUSE/fix-ceph-volume-outputs-to-stderr-now
Ceph: use combined output from ceph-volume
2019-09-09 14:09:20 -06:00
Travis Nielsen 6e4b40b842 Merge pull request #3786 from rohantmp/drainFix
Fix: only schedule node drain canaries on nodes with osds
2019-09-09 22:53:15 +03:00