this skips orchestration when the device configmap receives an update
but the cluster hasn't been fully configured, which may leave some state
undefined and cause nil pointer dereferences accessing the cluster info
structure.
fixes: #3001
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
this is an attempt to reduce the number of false positive config map
updates used to trigger orchestration for hotplugging.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>
This commit removes one to one mapping of NFS provisioner and adds a dedicated provisioner for nfs.
Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>
This commit moves claimPath information from annotation to parameters and adds option to enable/disable storageclass creation.
This commits fixes the upgrade for cluster running on 0.9.x and thus
have monitors listening on 6790.
The only downside is that the new messengers 2 protocol can not be
enabled because Ceph expects monitors to listen on 6789.
In order to enable messengers 2 your monitors will have to failover so
they can pick up both 6789 and 3300 ports, then and only then messenger
2 can be enabled.
Fixes: https://github.com/rook/rook/issues/3048 and
https://github.com/rook/rook/issues/3049
Signed-off-by: Sébastien Han <seb@redhat.com>
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>
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>
this adds a new operator environment variable that allows automatic
orchestration triggered by device discovery to be disabled.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
The CephCluster CR contains settings that are needed by other
CRs to configure the Ceph daemons. When the CephCluster CR
is updated, the updates will now be passed on to each of the
CR controllers to ensure the daemons are updated properly
without requiring an operator restart.
When calling the controllers from another controller,
we ensure that only a single goroutine is handling
CRs at any given time to prevent contention across
multiple CRs of the same type.
Signed-off-by: travisn <tnielsen@redhat.com>
Add a 'ceph-version' label to application controllers in the same manner
as the prior 'rook-version' label to help with upgrades.
Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
This code path is no longer necessary, and removing it allows removing
the `replicasets` RBAC permission for the operator.
Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
As per https://github.com/ceph/ceph/pull/26856 Ceph tunes the value of
osd-memory-target when running the OSD process so there is no need to
enforce it.
We also set a safety factor to that value which has been calculated by
the Ceph eng/perf team. Without this factor, the OSD will get OOM killed
since it is consuming memory for other purposes too.
Signed-off-by: Sébastien Han <seb@redhat.com>
Allow the user to set annotations in the CRDs of the following operators which will then be set on
the resulting Pods (Deployments, StatefulSets and so on).
Operators:
* Cassandra
* Ceph
* CockroachDB
* EdgeFS
* Minio
* NFS
The Annotations related structures have been added to the
rook.io/v1alpha2 pkg.
Signed-off-by: Alexander Trost <galexrt@googlemail.com>
When Ceph OSD spins up using ceph-volume, `ceph-volume lvm activate
--no-systemd --bluestore...` runs `lvs` which can cause significant
delays when /run/udev is not mounted from the host.
Before:
[root@rook-ceph-osd-0-858f49b5-md4t9 /]# time lvs
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
WARNING: Device /dev/sda not initialized in udev database even after waiting 10000000 microseconds.
...
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
osd-data-729c1fb6-440f-434c-be49-f199fa59f1c0 ceph-3bf7823b-6db3-42b6-bf8f-c36301e85238 -wi-ao---- <10.00g
real 1m30.545s
After:
[root@rook-ceph-osd-0-d8c4698b8-5vqnk /]# time lvs
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
osd-data-6c7249cc-cbd1-4f3b-9027-03725886bb30 ceph-9808319f-8567-4930-803a-41f70e537c1f -wi-ao---- <10.00g
real 0m0.043s
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
the k8s Node add/update events can fire before a cluster is fully
configured, which may leave some state undefined. skip orchestration
when the cluster is in this state.
fixes: #3001
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Because the deployment update-and-wait function waits for the deployment
to be ready, and that cannot happen due to the keyring not
having been updated yet. The keyring has its
owner set to the deployment so that no special keyring handling must
be done, but it must be created after the deployment UID is known.
Change the order of operations so that the existing deployment's UID can
be retrieved if it exists and the keyring created/updated before the
update-and-wait function is called.
This order-of-operations issue currently only applies to the mds. Other
daemons whose keyrings are owned by the replication controller do not
use the update-and-wait function.
Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
We must expose the ceph version to the osd pod so that we can generate
the proper ceph configuration file. If we don't do this all the version
check will assume they run the opposite of the desired version and the
formatting of the `ceph.conf` will be wrong.
Signed-off-by: Sébastien Han <seb@redhat.com>
Let's return the expected pattern so that can be consumed by
ExtractCephVersion later. We don't modify the built-in String() so we
can more easily remove that once we switch the osd to be configured from
the operator.
Signed-off-by: Sébastien Han <seb@redhat.com>