Commit Graph
1175 Commits
Author SHA1 Message Date
Sébastien Han caa8b9cb2f ceph: external refuse cluster older than Nautilus
The external cluster must run at least on Nautilus. The main reason
being the msgr2 knowledge by the Operator and the Ceph CLI.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han 83eca4b7ae ceph: fix various debug messages
Debug was used instead of Debugf so types were not interpreted
correctly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han f25e4a6fbc ceph: re-adapt controller code
Re-adapt controller code with the latest changes. Split External and not
external more accuratly in initializeCluster.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han 300e9c35e6 ceph: remove redundant call
saveMonConfig already calls WriteConnectionConfig so there is no need to
call WriteConnectionConfig again after saveMonConfig is done.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han 0785962e09 ceph: update mon configmap for external cluster
With this change, the admin can specify a single mon and the operator
will add any other mons to both ClusterInfo and the configmap of mon
endpoints.

It will periodically check for changes too and update both ClusterInfo
and the configmap accordingly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han 18bf541c00 ceph: remove redundant debug log
GetMonStatus is called by checkHealth in health.go and is already
printing GetMonStatus's response so there is no need to print it twice.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han 2d24065ddb ceph: add check for external cluster spec
Before attempting to do anything let's just make sure the spec is
correctly fulfilled.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han 1c50b30e0e ceph: fix condition
If the secret is not found, we create it, but once it was created we
were actually returning an error. The failure for getting the config
secret must be if the error is not that the secret is not found.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han 25158d3d2b ceph: purge external cluster metadata
Add code to remove configmap and secret injected and used by Rook to
connect to the external cluster.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han c7174b6b8e ceph: allow deployment of crds on external cluster
We can now deploy all the other Rook's CRDs. They will be deployed in
Kubernetes but will consume the external cluster storage.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han 062a885a98 ceph: health check populate cluster spec
When running external clusters we need to populate the cluster spec to
the health methods.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han 033a664b56 ceph: controller: enhance external cluster
We now do multiple things:

* write ceph config and key to the operator
* check for the ceph verion and compare it
* set the cluster status

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han e3b2ae5278 ceph: controller rename crd to cr
We are talking about CR ressources (instanciation of CRD) so let's use
the correct word.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han 7f98b77b99 ceph: controller: populate clusterInfo
For external clusters, clusterInfo must be populating so that the
heatlh checker can run correctly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han 8c8c48e0ac ceph: mon: export 'cluster'
By exporting cluster to Cluster we can now reach it from the controller
health check so that it can be populated with 'cluster' data, see the
next commit for better understanding.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han c776d6d86e ceph: type omit some mon specs for external cluster
We need to ignore some monitor specs for the external cluster use case
otherwise the cluster will never start.
For an external cluster, the mon count and other values don't make sense
and don't need to be set. Basically we don't fail if there are not
present.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
Sébastien Han 46cdf15936 ceph: config: apply the correct msgr2 prefix
External clusters might only listen on msgr2, so we must acknowledge
that and set the correct prefix to 'v2:' instead of 'v1:' on the
operator's ceph config file.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:33 +02:00
travisn 0885af771f ceph: handle the external mon status
Signed-off-by: travisn <tnielsen@redhat.com>
2019-08-22 17:19:32 +02:00
travisn 70e4c0ac19 ceph: skip local setup for an external ceph cluster
When configuring an external cluster the orchestration of discover and all the ceph
daemons will be skipped. The operator will still watch for the creation of
crds for this namespace. When a filesystem, object, object user, or
ganesha crd are created, the operator will simply print an error
to the log.

Signed-off-by: travisn <tnielsen@redhat.com>
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:32 +02:00
travisn 12979f4259 ceph: wait for external mon connection info
Signed-off-by: travisn <tnielsen@redhat.com>
2019-08-22 17:19:32 +02:00
travisn 7ab689ee8e ceph: skip local setup for an external ceph cluster
When configuring an external cluster the orchestration of discover and all the ceph
daemons will be skipped. The operator will still watch for the creation of
crds for this namespace. When a filesystem, object, object user, or
ganesha crd are created, the operator will simply print an error
to the log.

Signed-off-by: travisn <tnielsen@redhat.com>
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-08-22 17:19:32 +02:00
Sébastien Han a5cb65b6ea Merge pull request #3630 from ethan-daocloud/patch-5
types.go: fix bug in struct definition
2019-08-22 11:51:08 +02:00
Guangming Wang 4f0c92a7d1 types.go: fix bug in struct definition
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-22 00:29:44 +08:00
Travis Nielsen 1d28489c4a Merge pull request #3633 from ashishranjan738/fixsds
fix(storageClassDeviceSet): fixes resource limits and placements not getting applied to osds
2019-08-20 17:38:47 -06:00
Ashish Ranjan 8d852359b9 fix ceph cluster namespace not showing in the logs
This commit fixes cluster namespace not showing in the rook operator logs.

Signed-off-by: Ashish Ranjan <aranjan@redhat.com>
2019-08-20 17:30:17 +05:30
Travis Nielsen 27cad9d008 Merge pull request #3606 from sp98/sed_to_golang
Replace "sed" commands with native golang file handling
2019-08-19 12:03:43 -06:00
Travis Nielsen 73fa38ff75 Merge pull request #3586 from mvollman/fix-per-osd-md
ceph: fix per osd metadata support
2019-08-19 10:41:19 -06:00
Alexander Trost f09441f1e4 Merge pull request #3645 from galexrt/fix_3136
mgr: set public-addr flag for MGR
2019-08-19 18:26:52 +02:00
Alexander Trost 6daf4087c7 mgr: set public-addr flag for MGR
This fixes that the MGR is binding to the gateway IP instead of the
actual Pod IP, as seen in #3136.
When hostNetwork: true is set the public-addrr is not set so custom
network configs can be used.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2019-08-19 15:59:45 +02:00
Sébastien Han d11e051163 Merge pull request #3641 from odinuge/delete-mds-deploy
ceph: properly propagate errors when deleting mds deployment
2019-08-19 15:30:18 +02:00
Santosh Pillai b1c9ad97ae replace "sed" commands with native golang file handling
- OSD backed by PVC required updating the lvm.conf file which was done by executing the 'sed' commands.
- This patch removes the 'sed' command and uses golang utlities to update the lvm.conf file.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2019-08-19 12:38:56 +05:30
Odin Ugedal 7bd1ff1049 ceph: remove duplicated code
Signed-off-by: Odin Ugedal <odin@ugedal.com>
2019-08-18 11:10:28 +02:00
Odin Ugedal 43baf63b86 ceph: properly propagate errors when deleting mds
When deleting mds deployment the error is logged, but not propagated
further down (it always returns nil). The two places using the function
checks the error, and acts upon it.

Signed-off-by: Odin Ugedal <odin@ugedal.com>
2019-08-17 14:48:17 +02:00
Odin Ugedal 0e73bbe2f3 ceph: set osd mem target correctly
Previously, the value was set to commonArgs, resulting in dead code,
since common arg isn't used after the append.

Signed-off-by: Odin Ugedal <odin@ugedal.com>
2019-08-16 17:29:38 +02:00
Dmitry Yusupov bfe867e16c Merge pull request #3628 from sabbot/useHostLocalTime
Add useHostLocalTime option
2019-08-15 14:33:03 -07:00
Ashish Ranjan a8827f3652 fix(storageClassDeviceSet): fixes resource limits and placements for osds
This commit fixes resource limits and placements not getting applied to osd pods provisioned using storageClassDeviceSets

Signed-off-by: Ashish Ranjan <aranjan@redhat.com>
2019-08-16 02:44:37 +05:30
Michael Vollman 46f8012268 ceph: fix per osd metadata support
When setting metadataDevice per OSD the check that c-v is properly using
the metadata device is failing because it is only looking at the global
md setting which is nil and not the per OSD setting.

Signed-off-by: Michael Vollman <michael.b.vollman@gmail.com>
2019-08-15 07:22:00 -04:00
Anton Skriptsov e99df703c5 Add useHostLocalTime option
Signed-off-by: Anton Skriptsov <sabbotagge@gmail.com>
2019-08-14 11:26:42 -07:00
Dmitry Yusupov d7e319af45 Merge pull request #3609 from ethan-daocloud/patch-4
edgefs: cleanup pod.go comment, fix typos
2019-08-14 10:17:51 -07:00
Travis Nielsen 1591ba843e Merge pull request #3607 from obnoxxx/logic-flow-createReplicationCrushRule
ceph:pools: polish logic flow a bit in createReplicationCrushRule()
2019-08-13 13:22:21 -06:00
travisn 9c73bfc603 ceph mds: properly trim the daemon name
The daemon name always needs to have the prefix rook-ceph-mds-
removed from the deployment name in order to translate to the
daemon name. The daemon name is not dependent on the namespace.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-08-13 07:23:00 -06:00
travisn 113da4a94f update the default ceph version from 14.2.1 to 14.2.2
The Nautilus v14.2.2 release was out last week. This is the new
default version for Rook in the documentation and manifests.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-08-13 07:23:00 -06:00
travisn be391de73c resolve changes from merge conflict in upgrade changes
The upgrade changes for #2901 added the check for the correct version
of the ceph image before continuing with an upgrade. This commit is
to refactor that change to work with the new code path to validate
the ceph version.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-08-13 07:23:00 -06:00
travisn 98d0a59c91 ceph: create cluster during onUpdate event if needed
If the cluster is not successfully initialized during the onAdd event,
the cluster will not be in a properly initialized state. The admin
will likely need to update the CR, in which case the onUpdate event would
be triggered. In this case we need to call the same code path as the
onAdd event to properly initialize the cluster.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-08-13 07:23:00 -06:00
travisn 9a3dc52a11 ceph: minimum version allowed is mimic 13.2.4
With the 1.1 release we should not be creating bluestore OSDs
with rook's legacy partitioning scheme. All new bluestore OSDs
should be created with ceph-volume. Therefore, the miminum
version allowed is a version of mimic supporting ceph-volume.

This commit also adds consistent version checking between
the Add and Update methods for the operator handling the
CR events.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-08-13 07:22:59 -06:00
travisn 258a66554f ceph: remove unnecessary CR validation
Range checks for CR values are done statically in the CRD
for the number of mons. There is no need to check in the code
if the mon count is out of range.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-08-13 07:17:38 -06:00
Guangming Wang adf975c3c2 edgefs: cleanup pod.go comment, fix typos
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-13 21:00:54 +08:00
Michael Adam 9c2c3c5d55 ceph:pools: polish logic flow a bit in createReplicationCrushRule()
This is not changing the behavior of the code but making the
flow of logic in the createReplicationCrushRule() function consistent
by removing an else branch. This was just a reflex when I was reading
the code.

Signed-off-by: Michael Adam <obnox@redhat.com>
2019-08-13 13:50:20 +02:00
John Mulligan 521680d100 ceph csi: disable csi if server version is too low
Previously, if csi was not supported by the k8s version the csi set-up
code was skipped but csi was "left on". This change ensures that if
csi is not supported the csi enablement flags are set to false so
that other code that needs csi support will not run.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2019-08-13 06:42:22 -04:00
John Mulligan 55b871060f ceph csi: add additional error handling for csi related functions
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2019-08-13 06:42:22 -04:00