Commit Graph
63 Commits
Author SHA1 Message Date
rohan47 a420db69fe osd: Clean the osds that are out and safe-to-destroy
- When an osd is marked out, and it is safe to be destroyed then delete the osds deployment.
- Removed osdGracePeriod
- Updated unit tests to test osd marked out action

Signed-off-by: rohan47 <rohgupta@redhat.com>
2019-06-14 22:50:33 +05:30
Sébastien Han cba9a359a0 ceph: upgrade apply osd nautilus flag
When OSDs are running on Nautilus we always disable old osd features and
aplpy the onces for Nautilus as described in the upgrade doc.
During an upgrade or the next time an orchestration will be called the
command will be applied. The command is idempotent so we can run it each
time.
This can be backported for 1.0.3

Closes: https://github.com/rook/rook/issues/2960
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-06-13 22:15:15 +02:00
rohan47 a380ca7dc1 fixed ceph pg dump pgs_brief json deserialization
Signed-off-by: rohan47 <rohgupta@redhat.com>
2019-06-06 21:54:37 +05:30
Santosh Pillai 7d5afa29b8 added device class pool property
- Updated code to use deviceClass property when a pool is created for both "replicated" and "erasure code".
- Updated "ceph crush rule create-..." command to use "create-replicated" instead of "create-simple"
- Updated unit tests
- Updated (ceph-pool-crd.md) documentation to reflect the changes.
- Updated pending release notes.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2019-05-15 16:45:39 +05:30
Noah Watkins e33eb98047 ceph: run self-signed cert creation with timeout
fixes: #2784

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-05-06 10:10:05 -07:00
Noah Watkins c2dbb93096 ceph: simplify the ceph command execution interface
this adds a structure to hold various settings related to executing ceph
cli commands, and introduces a common interface for configuring and
running such commands.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-05-06 10:10:05 -07:00
travisn b6568b07b4 ceph: stop disabling scrubbing during osd orchestration
Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-26 09:35:50 -06:00
Travis Nielsen b70bec1a76 Merge pull request #3036 from rohantmp/revertMainMon
Revert "Merge pull request #2986 from rohantmp/mainMon"
2019-04-24 15:02:58 -06:00
Travis Nielsen d11466fced Merge pull request #2900 from mackIOConsulting/fix-mgr-settings
Fix mgr settings
2019-04-24 14:44:20 -06:00
Rohan CJ fb4d23345e Revert "Merge pull request #2986 from rohantmp/mainMon"
This reverts commit b7a564e929, reversing
changes made to 6996571b5c.

Reverting: Linking ceph noout to a node taint.
The taint is applied for reasons other than maintenance as well.
This also needs a way to respect user-set noout.
Need to revisit this with a better design.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-04-24 22:38:38 +05:30
Sébastien Han ab439f6602 Ceph: fix upgrade to Nautilus
This commits allows the upgrade from Mimic to Nautilus to work by:

* removing the v2 brackets on the operator ceph config file generation,
we stick with v1 and can revert this back once we deprecate mimic there
is no rush since mons keep on listening to v1.

* enable messengers 2 when the cluster runs on Nautilus

Fixes: https://github.com/rook/rook/issues/2973
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-04-24 10:57:29 +02:00
Maximilian Mack bdbd67fd7f ceph: fix mgr - dashboard settings
This fix passes on the mgrName to the configureDashboard function.

Signed-off-by: Maximilian Mack <max@mack.io>
2019-04-24 08:26:22 +02:00
Rohan CJ 894f4bffbd - Set noout on cluster when storage nodes are in maintenance (unschedulable)
- Add noout functions to osd client
- export the functions DiscoverStorageNodes,GetAllStorageNodes
  from pkg/operator/ceph/cluster/osd
- Update PendingReleaseNotes.md

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-04-17 19:31:55 +05:30
Ramana Raja 7800d33171 ceph filesytem: use fs fail to bring down filesystem
A ceph filesystem was brought down by marking the filesystem
as down and individually failing the MDSes. From nautilus onwards,
this could be more simply and efficiently done by using
`fs fail` command. See,
https://github.com/ceph/ceph/commit/4c49f165ec1

Resolves: #2841

Signed-off-by: Ramana Raja <rraja@redhat.com>
2019-04-12 20:42:48 +05:30
travisn 5ebb651e37 ceph: update the cephcluster custom resource with ceph health
The CephCluster resource will now expose the health of the ceph cluster
so admins can query the status with k8s api or kubectl instead of
needing to run the rook toolbox. The operator will query the
ceph status periodically and update the status in the custom resource.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-10 14:41:18 -06:00
Blaine Gardner a34fbaa594 ceph: update auth caps if get/create key fails
Update integration test suite fails on an error with getting the keyring
for the mgr. The mgr's cephx capabilities have changed and need to be
updated before get, create, or get-or-create can be called. Since other
daemons' caps may change in the future, make an attempt to update the
user's caps on any key generation. This makes the key generation more
declarative from within the operator code for individual Ceph daemons.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-04-03 15:54:00 -06:00
travisn 531da9647c ceph: rely on ceph image creation success instead of rbd get info
Nautilus has an issue targeting Luminous when running the rbd info command.
Rook already has the info it needs for the call and can return it
after the rbd create command succeeds.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-03-20 15:15:36 -06:00
Noah Watkins 379cb98689 ceph: replace release name with fine-grained version
The basic idea here is to replace the release name in the ClusterInfo
object with the fine grained version information queried at runtime.
This patch also removes the Name field from the cluster spec, which was
also runtime determined and was redundant with ClusterInfo relase name.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-03-18 12:57:29 -07:00
Noah Watkins 5c9bb7d9d7 ceph: add helper to execute cmd with retries
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-03-14 14:50:54 -07:00
Ramana Raja 828d2dd366 ceph filesystem: don't use mds deactivate from mimic onwards
From ceph mimic (13.x) onwards, `mds deactivate` command is
deprecated. To scale down the number of active MDSes of a filesystem,
it's sufficient to set the desired number of active MDSes using
'max_mds' setting, and is no longer required to individually
deactivate the unwanted MDSes.

Resolves: #2725
Signed-off-by: Ramana Raja <rraja@redhat.com>
2019-03-12 15:04:11 +05:30
Sébastien Han 97a5b78a59 ceph: filesystem: deprecate flags and updates for Nautilus
The MDS mds_standby_for_*, mon_force_standby_active, and mds_standby_replay
configuration options have been obsoleted. Instead, the operator may now set
the new "allow_standby_replay" flag on the CephFS file system. This setting
causes standbys to become standby-replay for any available rank in the file
system.

Closes: https://github.com/rook/rook/issues/2768
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-03-07 13:59:14 +01:00
Sébastien Han 56f218e5a1 client: ceph - add missing comments
Following Golang conventions, I'm adding the missing comments on
the constants and exported functions.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-01-30 17:11:28 +01:00
Sébastien Han e1d11e45a5 pkg: timeout ceph commands
The Ceph CLI has the flag option '--connect-timeout' which controls the
timeout of the command when reaching out to a monitor. If the connection
cannot be established within 15 seconds, the command will fail. The
default value in Ceph is relatively long (300sec IIRC). This is a
problem when monitors have trouble reaching out quorum, since this means
the command will only fail after 300 sec.
Now we fail faster.

Resolves: https://github.com/rook/rook/issues/2574
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-01-30 17:11:23 +01:00
Sébastien Han 19c7608a80 mgr: add missing rook header
The code header was missing, so adding it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-01-28 10:53:10 +01:00
travisn c2f354680e mons: use the default port of 6789 instead of 6790
Signed-off-by: travisn <tnielsen@redhat.com>
2019-01-17 14:37:58 -07:00
Jeff Layton efefc871d2 ceph: add --force to mgr settings
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-01-09 10:22:28 -05:00
travisn 261aae3f46 mgr: set the server_addr for the dashboard and prometheus modules
Signed-off-by: travisn <tnielsen@redhat.com>
2018-12-20 12:08:37 -07:00
travisn 62f7e5d6ea ceph: update docs, code, and tests to use v1 crd types
Signed-off-by: travisn <tnielsen@redhat.com>
2018-12-05 14:33:11 -07:00
Alexander Trost 18b2da5fc5 Merge pull request #2216 from galexrt/fix_2164
Allow specifying custom Ceph user and secret name for mounting
2018-12-04 23:54:27 +01:00
Alexander Trost ac19f85fbb Allow specifying custom Ceph user and secret name for mounting
Introduce mount security mode for basic multi tenancy

Fixes #2164.

This adds three new parameters/options to StorageClass/flexvolume entry:
* `mountUser`
* `mountSecret`
* `mountSecretNamespace`

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2018-12-04 20:17:15 +01:00
Jeff Layton 677efb1a37 ceph mds: lift setting of max active MDS out of CreateFilesystem
This seems a bit misplaced, since CreateFilesystem is all about
doing the initial setup of the filesystem, and the daemons are
managed in a different block of code.

In a later patch, we're going to want to allow the CRD to spin
up MDS' for filesystems that already exist. Lift the code that
sets the MDS count into the caller.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2018-12-01 07:32:46 -05:00
Travis Nielsen b239397033 Merge pull request #2293 from travisn/clean-pg-status
Cluster is clean if PGs are scrubbing
2018-11-27 17:31:14 -07:00
travisn 232e65f934 cluster is clean if PGs are scrubbing
Signed-off-by: travisn <tnielsen@redhat.com>
2018-11-20 17:01:46 -07:00
Travis Nielsen 12e6cd941d Merge pull request #2257 from lbogdan/fix/rbd-info
ceph: use "rbd info" to get image info after creating it
2018-11-20 13:11:09 -07:00
Andrey Laguta c247e8c0f7 Add urlPrefix setting for ceph dashboard
Signed-off-by: Andrey Laguta <13280256+laevilgenius@users.noreply.github.com>
2018-11-06 02:58:47 +02:00
Bogdan Luca 93e4e8ddcb ceph: use "rbd info" to get image info after creating it
Signed-off-by: Bogdan Luca <luca.bogdan@gmail.com>
2018-11-03 17:19:18 +02:00
travisn 39117a7a0b mgr: configure a self-signed cert and admin user for the dashboard
Signed-off-by: travisn <tnielsen@redhat.com>
2018-11-01 11:49:36 -06:00
travisn b02cd099f1 mons: allow scaling up or down the size of quorum
Signed-off-by: travisn <tnielsen@redhat.com>
2018-10-17 11:00:05 -06:00
Blaine Gardner 96f9a9c4ad ceph mds: allow mds deployment scale-down
fix #2193

Fix regression introduced by PR allowing MDS config creation in init
container. This allows the new deployment-based mds clusters to scale
down where currently they can only remain constant or scale up.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2018-10-12 14:53:08 -06:00
Blaine Gardner ce803fbf9d Ceph mds/file: Set up config in init container
Progress toward issue #2003.
Includes design from design doc PR #1578

Use init containers to create configuration for Ceph mgrs. There is only
one init container in this design. The init container calls the Rook
binary to create Ceph config files which are then shared with the mds
daemon main container.

Once this init is run, the main mds daemon is run. Leaving room to use
the Ceph-versioned image in the future, call `ceph-mds --foreground ...`
to run the Ceph mds.

The refactor to using an init container also necessitated refactoring
the mdses replicaset implementation to a deployment-per-pod
implementation due to a chicken-egg problem. With a single container (in
the before times) the Rook binary was able to call the ceph-mds daemon
with an id generated from the pod name. Since the pod name is not known
before runtime, and the id is one of the few params that must be
specified to Ceph daemons on run, it is necessary to know the id
beforehand; thus the move to a deployment architecture following the
likes of the mon and mgr daemons.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2018-10-05 19:01:12 -06:00
Ganesh Maharaj Mahalingam b8c7e151bc use return error code instead
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2018-09-08 15:23:28 -07:00
Ganesh Maharaj Mahalingam ff9230a10f PVC create resiliency
While creating a PVC, if the operator dies between successfully creating a rbd
image and associating it with a PV, that PVC will never be completed. A
restarted operator will also fail to complete the task as the requested rbd
image already exists. With the assumption that a PVC UID will always be unique,
this patch will try to use the existing volume and complete the PVC request.

Resolves: #2072

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2018-09-07 15:34:59 -07:00
travisn f840e3574e mon: start a deployment instead of replicaset
Signed-off-by: travisn <tnielsen@redhat.com>
2018-09-01 00:12:42 -06:00
travisn 5f01178e83 mon: set names based on chars instead of integers
Signed-off-by: travisn <tnielsen@redhat.com>
2018-08-30 22:18:53 -06:00
Dennis Chen 25086c01ad Roundup the size of the RBD volume image
Current code will truncate the generated RBD image in some cases,
this PR will round up the size to make sure the final RBD image
generated can cover all the required data space.

Also, corresponding unit test cases added to verify the change.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-08-29 11:10:07 +08:00
Alexander Trost 2080330539 Add dataPool parameter to StorageClass
This change allows block storage to use a given Ceph pool for it's data.

Fixes #1733

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2018-08-17 16:28:08 +02:00
Alexander Trost a7d002fe5c operator: Set min_size to dataChunkCount for ec pools
Resolves #1795

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2018-07-19 23:51:26 +02:00
Travis Nielsen 363e5ee58a Merge pull request #1892 from jcsp/wip-osd-remove-idempotent
Fix retry of OSD deletion
2018-07-17 15:47:00 -06:00
John Spray bed1d01e9c Fix retry of OSD deletion
Previously, if this failed mid-way it would then throw
an exception at the first operation when retrying (because it's
trying to reweight an OSD that might not be in the map any more)

Signed-off-by: John Spray <john.spray@redhat.com>
2018-07-17 14:08:23 +01:00
travisn 94496fe88e debug logging for the osd health check
Signed-off-by: travisn <tnielsen@redhat.com>
2018-07-11 10:28:15 -06:00