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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
This commit fixes resource limits and placements not getting applied to osd pods provisioned using storageClassDeviceSets
Signed-off-by: Ashish Ranjan <aranjan@redhat.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>