Commit Graph
1196 Commits
Author SHA1 Message Date
Travis Nielsen e3256c07fe Merge pull request #10523 from leseb/fix-stuck-reconciler
core: fix stuck reconciler (more checkpoints for cancelled context)
2022-07-18 08:58:07 -06:00
Eng Zer Jun 8a25b1d903 test: use T.Setenv to set env vars in tests
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-07-15 23:07:19 +08:00
Travis Nielsen fc541764f1 Merge pull request #10484 from jsoref/spelling
core: fix spelling
2022-07-15 08:31:41 -06:00
Travis Nielsen b8dac76d18 mgr: skip updating service if there is no selector
When the mgr services are updated by the operator to set the
active mgr properly, skip services that do not currently
have a selector set.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-07-12 16:30:20 -06:00
Sébastien Han a6036074db core: more checkpoint for context cancelled
Some context canceled were missed and not reported correctly. We had
multiple reconcilers running in //. Since they all run in goroutine then
will continue to run until they timeout (if timeout is available,
    otherwise would run forever until the op is restarted).

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-07-12 12:07:59 +02:00
Sébastien Han 247d725aac core: let IsInitialized return errors
Let's return an error instead of a bool so we can better parse it and
decide what to do with it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-07-12 12:07:57 +02:00
Josh Soref 6e7b8767f3 core: fix spelling
* another
* are
* availability
* available
* bootstrap
* boundaries
* ceph
* certificate
* class
* codifies
* consuming
* corrupted
* createor
* csi
* deployments
* exceeded
* execute
* filesystem
* healthiness
* heuristics
* immediately
* insecure
* installed
* isolated
* maintained
* maximum
* minute
* monitor
* new
* nginx
* nonexistent
* not
* occurs
* omitempty
* operator
* orchestration
* persistentvolumes
* placement
* preexisting
* prometheus
* protecting
* provisioner
* purposes
* reconcile
* regex
* related
* requests
* returns
* rubbish
* running
* schedulable
* schedule
* serviceaccount
* simulating
* snapshots
* statement
* static
* tenants
* the
* unavailable
* volumeattachment
* waiting
* with
* wrapper
* zonegroup

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-07-07 18:10:47 -04:00
Travis Nielsen dad97f3425 core: remove support for ceph octopus
With octopus coming to end of life, we remove support from
Rook for deploying Ceph Octopus and assume a min version of
Pacific v16. Any checks for octopus or earlier are removed
from the reconciles since they are obsolete.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-07-07 15:03:26 -06:00
Travis Nielsen 28957b3ff1 mon: disable insecure global ids for new deployments
In new deployments we always want to disable the insecure global id.
If the mgr deployment is newly created, we know it's a new cluster
and the mons are in quorum, so we can go ahead and disable the
insecure global IDs.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-06-24 12:26:00 -06:00
Travis Nielsen ecbc438d7a mon: fix typo in log message for msgr2
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-06-24 11:55:14 -06:00
subhamkrai 196f5da635 core: delete v1beta1 cronjob only when v1 not found
earlier we're deleting v1beta1 always before creating
v1 job. Now, we delete only when k8s version is
latest(which supports v1  job) and v1 job is not created
which means this is the first time and this is the only time we'll
delete v1beta1.

Signed-off-by: subhamkrai <srai@redhat.com>
2022-06-23 12:27:43 +05:30
Sébastien Han 1bcb884571 osd: add lvm flag for lvm osd activate
Ancient OSDs based on LVM and activated by the Rook binary are still in
production. They fail on the deactivation of the VolumeGroup due to
incorrect filter. Setting the OSD as LVM adjusts the filter and make the
deactivate call working.

Repro without and with the correct filter:

```
[root@ca862389706c /]# vgchange -an -vv ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d
  global/use_lvmpolld not found in config: defaulting to 1
  devices/sysfs_scan not found in config: defaulting to 1
  devices/scan_lvs not found in config: defaulting to 0
  devices/multipath_component_detection not found in config: defaulting to 1
  devices/md_component_detection not found in config: defaulting to 1
  devices/fw_raid_component_detection not found in config: defaulting to 0
  devices/ignore_suspended_devices not found in config: defaulting to 0
  devices/ignore_lvm_mirrors not found in config: defaulting to 1
  devices/scan_lvs not found in config: defaulting to 0
  devices/allow_mixed_block_sizes not found in config: defaulting to 0
  devices/hints not found in config: defaulting to "all"
  activation/activation_mode not found in config: defaulting to "degraded"
  metadata/record_lvs_history not found in config: defaulting to 0
  devices/search_for_devnames not found in config: defaulting to "auto"
  activation/monitoring not found in config: defaulting to 1
  global/locking_type not found in config: defaulting to 1
  global/wait_for_locks not found in config: defaulting to 1
  global/prioritise_write_locks not found in config: defaulting to 1
  global/locking_dir not found in config: defaulting to "/run/lock/lvm"
  devices/md_component_detection not found in config: defaulting to 1
  devices/md_component_checks not found in config: defaulting to "auto"
  devices/multipath_wwids_file not found in config: defaulting to "/etc/multipath/wwids"
  global/use_lvmlockd not found in config: defaulting to 0
  report/output_format not found in config: defaulting to "basic"
  log/report_command_log not found in config: defaulting to 0
  devices/use_devicesfile not found in config: defaulting to 0
  /dev/log: stat failed: No such file or directory
  devices/global_filter not found in config: defaulting to global_filter = [ "a|.*|" ]
  Setting devices/filter to filter = [ "a|^/mnt/.*|", "r|.*|" ]
  devices/global_filter not found in config: defaulting to global_filter = [ "a|.*|" ]
  Setting devices/filter to filter = [ "a|^/mnt/.*|", "r|.*|" ]
  devices/devicesfile not found in config: defaulting to "system.devices"
  Obtaining the complete list of VGs to process
  VG name on command line not found in list of VGs: ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d
  Processing VG ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d
  Locking /run/lock/lvm/V_ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d WB
  Unlocking /run/lock/lvm/V_ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d
  Volume group "ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d" not found
  Cannot process volume group ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d
  global/notify_dbus not found in config: defaulting to 1
[root@ca862389706c /]# echo $?
5
[root@ca862389706c /]# vi /etc/lvm/lvm.conf
[root@ca862389706c /]# vgchange -an -vv ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d
  global/use_lvmpolld not found in config: defaulting to 1
  devices/sysfs_scan not found in config: defaulting to 1
  devices/scan_lvs not found in config: defaulting to 0
  devices/multipath_component_detection not found in config: defaulting to 1
  devices/md_component_detection not found in config: defaulting to 1
  devices/fw_raid_component_detection not found in config: defaulting to 0
  devices/ignore_suspended_devices not found in config: defaulting to 0
  devices/ignore_lvm_mirrors not found in config: defaulting to 1
  devices/scan_lvs not found in config: defaulting to 0
  devices/allow_mixed_block_sizes not found in config: defaulting to 0
  devices/hints not found in config: defaulting to "all"
  activation/activation_mode not found in config: defaulting to "degraded"
  metadata/record_lvs_history not found in config: defaulting to 0
  devices/search_for_devnames not found in config: defaulting to "auto"
  activation/monitoring not found in config: defaulting to 1
  global/locking_type not found in config: defaulting to 1
  global/wait_for_locks not found in config: defaulting to 1
  global/prioritise_write_locks not found in config: defaulting to 1
  global/locking_dir not found in config: defaulting to "/run/lock/lvm"
  devices/md_component_detection not found in config: defaulting to 1
  devices/md_component_checks not found in config: defaulting to "auto"
  devices/multipath_wwids_file not found in config: defaulting to "/etc/multipath/wwids"
  global/use_lvmlockd not found in config: defaulting to 0
  report/output_format not found in config: defaulting to "basic"
  log/report_command_log not found in config: defaulting to 0
  devices/use_devicesfile not found in config: defaulting to 0
  /dev/log: stat failed: No such file or directory
  /dev/block/7:0: size is 2097152 sectors
  /dev/nbd0: size is 0 sectors
  /dev/nbd8: size is 0 sectors
  /dev/vda: size is 83886080 sectors
  /dev/block/7:1: size is 0 sectors
  /dev/vda1: size is 83883999 sectors
  /dev/block/7:2: size is 0 sectors
  /dev/block/7:3: size is 0 sectors
  /dev/block/7:4: size is 0 sectors
  /dev/block/7:5: size is 0 sectors
  /dev/block/7:6: size is 0 sectors
  /dev/block/7:7: size is 0 sectors
  /dev/vdb: size is 83886080 sectors
  /dev/nbd1: size is 0 sectors
  /dev/nbd9: size is 0 sectors
  /dev/vdc: size is 83886080 sectors
  /dev/vdd: size is 83886080 sectors
  /dev/nbd2: size is 0 sectors
  /dev/nbd10: size is 0 sectors
  /dev/nbd3: size is 0 sectors
  /dev/nbd11: size is 0 sectors
  /dev/nbd4: size is 0 sectors
  /dev/nbd12: size is 0 sectors
  /dev/nbd5: size is 0 sectors
  /dev/nbd13: size is 0 sectors
  /dev/nbd6: size is 0 sectors
  /dev/nbd14: size is 0 sectors
  /dev/nbd7: size is 0 sectors
  /dev/nbd15: size is 0 sectors
  devices/global_filter not found in config: defaulting to global_filter = [ "a|.*|" ]
  Setting devices/filter to filter = [ "a|^/mnt/.*|", "r|^/dev/loop.*|", "a|^/dev/.*|", "r|.*|" ]
  /dev/block/7:0: using cached size 2097152 sectors
  /dev/block/7:0: using cached size 2097152 sectors
  /dev/block/7:0: No lvm label detected
  /dev/vda: using cached size 83886080 sectors
  /dev/vda1: using cached size 83883999 sectors
  /dev/vda1: using cached size 83883999 sectors
  /dev/vda1: No lvm label detected
  /dev/vdb: using cached size 83886080 sectors
  /dev/vdb: using cached size 83886080 sectors
  /dev/vdc: using cached size 83886080 sectors
  /dev/vdc: using cached size 83886080 sectors
  /dev/vdd: using cached size 83886080 sectors
  /dev/vdd: using cached size 83886080 sectors
  devices/global_filter not found in config: defaulting to global_filter = [ "a|.*|" ]
  Setting devices/filter to filter = [ "a|^/mnt/.*|", "r|^/dev/loop.*|", "a|^/dev/.*|", "r|.*|" ]
  devices/devicesfile not found in config: defaulting to "system.devices"
  /dev/block/7:0: using cached size 2097152 sectors
  /dev/nbd0: using cached size 0 sectors
  /dev/nbd8: using cached size 0 sectors
  /dev/vda: using cached size 83886080 sectors
  /dev/block/7:1: using cached size 0 sectors
  /dev/vda1: using cached size 83883999 sectors
  /dev/block/7:2: using cached size 0 sectors
  /dev/block/7:3: using cached size 0 sectors
  /dev/block/7:4: using cached size 0 sectors
  /dev/block/7:5: using cached size 0 sectors
  /dev/block/7:6: using cached size 0 sectors
  /dev/block/7:7: using cached size 0 sectors
  /dev/vdb: using cached size 83886080 sectors
  /dev/nbd1: using cached size 0 sectors
  /dev/nbd9: using cached size 0 sectors
  /dev/vdc: using cached size 83886080 sectors
  /dev/vdd: using cached size 83886080 sectors
  /dev/nbd2: using cached size 0 sectors
  /dev/nbd10: using cached size 0 sectors
  /dev/nbd3: using cached size 0 sectors
  /dev/nbd11: using cached size 0 sectors
  /dev/nbd4: using cached size 0 sectors
  /dev/nbd12: using cached size 0 sectors
  /dev/nbd5: using cached size 0 sectors
  /dev/nbd13: using cached size 0 sectors
  /dev/nbd6: using cached size 0 sectors
  /dev/nbd14: using cached size 0 sectors
  /dev/nbd7: using cached size 0 sectors
  /dev/nbd15: using cached size 0 sectors
  Obtaining the complete list of VGs to process
  Processing VG ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d VxbTWs-fMrC-KErD-Pc2l-NBs6-xffp-7n1qab
  Locking /run/lock/lvm/V_ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d WB
  metadata/lvs_history_retention_time not found in config: defaulting to 0
  /dev/vdd: using cached size 83886080 sectors
  Running command for VG ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d VxbTWs-fMrC-KErD-Pc2l-NBs6-xffp-7n1qab
  Deactivating logical volume ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d/osd-block-058f4926-6ee7-4165-9a55-db5a1fd22d2f.
  activation/verify_udev_operations not found in config: defaulting to 0
  Getting driver version
  Removing ceph--a8ae9f01--a440--4a0e--8e4d--592d3bce3a9d-osd--block--058f4926--6ee7--4165--9a55--db5a1fd22d2f (252:2)
  Deactivated 1 logical volumes in volume group ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d.
  0 logical volume(s) in volume group "ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d" now active
  Unlocking /run/lock/lvm/V_ceph-a8ae9f01-a440-4a0e-8e4d-592d3bce3a9d
  global/notify_dbus not found in config: defaulting to 1
[root@ca862389706c /]# echo $?
0
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-06-15 16:10:16 +02:00
Satoru Takeuchi 66f745f11f osd: bypass ceph-conf validation failure in osd activation
"ceph.conf" must have the "fsid" global configuration to activate encrypted OSDs
after the following Ceph's PR is merged.

https://github.com/ceph/ceph/commit/25655e5a8829e001adf467511a6bde8142b0a575

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2022-06-08 20:41:00 +00:00
Travis Nielsen fe989ad773 core: report basic cluster and version telemetry
For the ceph telemetry report the csi version, k8s version,
and metrics from the desired state in the cephcluster CR such
as mon count, stretch cluster, number of device sets, and
so on.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-06-07 12:13:51 -06:00
Cheng XU 9b03d0759b osd: ignore the region label when it is the same as zone label in topology
Ceph requires all topology label being unique. And it is quite common to
have topology.kubernetes.io/region and topology.kubernetes.io/zone being set
to the same value. In this case, let's just ignore the region label.

See https://github.com/rook/rook/issues/9419#issuecomment-1144311818

Signed-off-by: Cheng XU <git@xuc.me>
2022-06-03 10:13:22 -07:00
Sébastien Han f79de7d69a osd: remove broken argument
During the tini's binary removal you overlooked that scenario and
introduced a bug in the OSD startup line.
We were passing the binary path as an argument, which is obviously wrong
and makes the OSD crash at boot.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-05-23 16:44:10 +02:00
Blaine Gardner 6888d545d2 operator: rename telemetry rook-version to rook/version
The Rook and Ceph teams settled on using slashes to separate Rook
telemetry items into a hierarchy in https://github.com/rook/rook/pull/10254.
Rename the config-key used to `rook/version`, and create a `telemetry`
package to define the telemetry key constants.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-05-18 15:09:02 -06:00
Travis Nielsen c75e834da0 Merge pull request #10246 from leseb/blk-mapper-message
osd: exit immediately if pvc block has not changed
2022-05-12 11:51:35 -06:00
Travis Nielsen 929bc9720f Merge pull request #10161 from BlaineEXE/identify-rook-clusters-via-mon-kv-field
operator: set 'rook-version' in mon k/v store
2022-05-12 10:48:48 -06:00
Blaine Gardner 94b622c302 operator: set 'rook-version' in mon k/v store
Ceph upstream telemetry (which Rook users could optionally enable via
Ceph CLI or Dashboard) does not easily identify if a cluster is managed
by Rook. Identifying Rook clusters is possible only if users also enable
the rook mgr module, which is optional and not often used.

To get better upstream insights into Ceph clusters managed by Rook, set
a new 'rook-version' field in Ceph's generic k/v store. This field can
be used to determine if a cluster is managed by Rook by its presence.
It additionally provides information about the Rook version used to
manage the cluster, which is another piece of potentially useful
information.

Regarding Ceph cluster identification via telemetry:
Ceph telemetry is anonymous and uses a different ID from the Ceph
cluster ID. Identifying the Rook version in telemetry does not add
directly identifying information. Therefore, there should be little
risk that adding the Rook version field will decrease anonymity of Ceph
clusters via telemetry.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-05-12 09:31:13 -06:00
Sébastien Han 4234216db8 osd: exit immediately if pvc block has not changed
We don't need to run any `cp` command since a destination path already
exists. Using `--no-clobber` is not needed and it results in a noop
anyways.
Instead, let's print the reason why we exit the container.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-05-11 15:02:18 +02:00
Travis Nielsen fe3c024e8d Merge pull request #10172 from fengjiankui121/mon_health_improve
mon: quorumStatus.MonMap.Mons changed to quorumStatus.Quorum
2022-05-04 09:26:04 -06:00
Sébastien Han 6ef491d9fc osd: close the encrypted disk after cleanup is done
Once we are done cleaning up the content of the encrypted osd, let's
close the main LUKS device.
This avoids having dm devices on the system after the cleanup.

Closes: https://github.com/rook/rook/issues/10181
Signed-off-by: Sébastien Han <seb@redhat.com>
2022-05-03 16:47:59 +02:00
FengJiankui d335dc59eb mon: quorumStatus.MonMap.Mons changed to quorumStatus.Quorum
The path use quorum instead of monMap to determine if there is enough mon. (bug #10165).

Signed-off-by: FengJiankui <fengjiankui@inspur.com>
2022-04-29 09:46:21 +08:00
Sébastien Han ed3121defd Merge pull request #9925 from leseb/multus-plugin-restart-fix
core: fix csi-cephfsplugin pod restart on non-hostnetworking env
2022-04-27 11:41:59 +02:00
Sébastien Han 73b1347675 core: fix csi-cephfsplugin pod restart on non-hostnetworking env
Implementation of the design proposed in
https://github.com/rook/rook/pull/9903.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-04-26 17:53:01 +02:00
Sébastien Han 583791c45c core: move clusterInfo code to the controller package
The CSI package needs to load clusterInfo, today this code is in the mon
package which makes the call of LoadClusterInfo impossible without
having a circular import.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-04-26 11:05:02 +02:00
Travis Nielsen d26b6cf403 build: update min version to k8s 1.17
Support is removed for k8s for various limitations such as
priority classes not working and csi driver feature
incompleteness and missing snapshots. Documentation is updated
with the new min version of k8s 1.17 and also the tests are
updated to run on the min version of 1.17.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-04-25 15:32:09 -06:00
Alexander Trost 8686296e17 core: remove double imported packages
This removes double package imports. Example:
```
"github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
```
Only one is now being used as shown in go-staticcheck ST1019

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2022-04-25 13:51:45 +02:00
Madhu Rajanna 8ab17e3b83 csi: add/remove mon IP from csi config
If a mon is added or removed in a ceph
cluster all the CSI clusterID's belongs
to the ceph cluster should also gets updated.

Added a new cluster identifier to the csi configmap,
i.e ceph clusterNamespace which helps to identify
the clusterID's belongs to that ceph cluster.

Note:- to support the upgraded clusters,we
can ask users to update the mon IP's for the
problamatic clusterID as it wont be updated
by the operator.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-04-22 22:26:06 +05:30
Travis Nielsen 03b0546fec osd: enable quincy osd release version
After all OSDs are updated to each major release of Ceph, the
require-osd-release version is set to that release so all the latest
functionality for osds can be enabled by Ceph. In Quincy there is
a warning if all osds are on Quincy and this flag is not set, so
this will resolve the health warning.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-04-14 12:37:29 -06:00
Madhu Rajanna b0fc7c9b92 namespace: add new CRD
This introduces a new CRD to add the ability
to create rados namespace for a given
ceph block pool. Typically the name of the pool
is the name of the blockpool created by rook.

Closes: #7035

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-04-05 10:10:04 +05:30
subhamkrai 24802c559e core: fix golangci linter
fix golangci linter

Signed-off-by: subhamkrai <srai@redhat.com>
2022-04-04 20:59:31 +05:30
Sébastien Han 05506e7a68 core: reload go routine after CR is edited
Previously, the struct maintaining the list of cluster was still
initialized with a cluster item. Then the monitoring check will see that
the cluster is part of the struct already and thus won't run the
monitoring go routine again.
Now each time we cancel the context, we also remove the cluster item
from the map so that when the controller runs again, the monitoring
struct is re-populated and the go routine runs and statuses are updated.

Closes: https://github.com/rook/rook/issues/9911
Signed-off-by: Sébastien Han <seb@redhat.com>
2022-03-31 08:49:42 +02:00
Travis Nielsen 6c50530737 Merge pull request #9685 from weirdwiz/context-remove
Remove context.TODO and add context parameter
2022-03-30 12:20:30 -05:00
Divyansh Kamboj 9008409f87 core: add context parameter to functions
This commit adds context parameter to various functions, and remove the
usage of context.TODO.

Closes: https://github.com/rook/rook/issues/8701
Signed-off-by: Divyansh Kamboj <dkamboj@redhat.com>
2022-03-22 08:19:07 +05:30
Travis Nielsen 4edcff04f7 monitoring: create prometheus rules with helm chart
The prometheus rules had been previously created if the cephcluster CR
setting monitoring.enabled was set to true. The rules were not customizable
and therefore not flexible enough. Now the rules are installed by the helm
chart. To customize the rules, a post-processor can be applied to the helm
chart.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-21 14:47:52 -06:00
Travis Nielsen 86eebc7486 mon: set the msgr1 port by default for csi driver
Older kernels still fail to connect for rbd/cephfs with
the msgr2 port due to a difference in http protocol expected.
For now, we keep the default port as msgr1 for the csi driver
and other client connections, unless msgr2 is strictly required
for encryption or compression.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-17 16:34:13 -06:00
Sébastien Han 18b19de639 Merge pull request #9687 from parth-gr/observedGeneration
core: add observedGeneration to CR status
2022-03-17 10:36:11 +01:00
Travis Nielsen 48be000b4f core: add quincy to the supported versions
Ceph Quincy is now supported as of Rook v1.9.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-16 14:26:20 -06:00
parth-gr 2dfd64a97c core: add observedGeneration to CR status
adding observedGeneration field in the cephcluster cr
status for having better control on reconciling,
as observedGeneration field will be updated by the controller

Closes: https://github.com/rook/rook/issues/9673

Signed-off-by: parth-gr <paarora@redhat.com>
2022-03-16 19:58:35 +05:30
subhamkrai 6a9ff434d2 core: add k8s events in controller reconciler
adding k8s event in controller reconciler when
1. when reconciler starts
2. when deletion reconcile triggered.

Closes: https://github.com/rook/rook/issues/9462
Signed-off-by: subhamkrai <srai@redhat.com>
2022-03-14 18:55:26 +05:30
Blaine Gardner afd38a57c5 Merge pull request #9873 from BlaineEXE/report-reconcile-rework
core: rework usage of ReportReconcileResult
2022-03-11 10:02:30 -07:00
Travis Nielsen c580e8f09c Merge pull request #9118 from travisn/network-encryption
mon: Options for enabling msgr2 encryption and compression
2022-03-11 09:49:55 -07:00
Blaine Gardner c92c6fbc36 core: rework usage of ReportReconcileResult
ReportReconcileResult should never be given an object that is nil. It is
impossible to force compile-time checking for this because the object's
type is an interface. We can't force this, but we can rework the
function definition to handle more cases where the object may not be
returned fully-complete, and we can rework callers to return structs
(not pointers-to-structs) so it is less likely a caller will pass nil
to the function.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-03-10 16:53:25 -07:00
Travis Nielsen 22dea0a1ef mon: disable startup probe on canary pods
The canary pods are very short-lived pods and are not
running ceph in any form. The startup probe was mistakenly
enabled for the canary pod, which could cause the pod
to fail unexpectedly if the startup probe was triggered
after the delay timeout.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-10 12:19:55 -07:00
Travis Nielsen 03c7164b15 mon: options for enabling msgr2 encryption and compression
msgr2 allows for encryption and/or compression across the wire.
Settings for enabling the encryption and compression are now
available in the cluster CR to that ceph will be automatically
configured with these settings when desired.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-10 11:50:42 -07:00
Travis Nielsen 9f6804515c mon: enable msgr2 by default for new mons
New mons all support msgr2, so there is no need to keep the default
msgr1 port for new mons.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-10 11:48:47 -07:00
Travis Nielsen 2b2231eb0c mon: no need to enable msgr2 since nautilus
Since Nautilus, mgr2 is already enabled by default. No longer
does the operator need to enable msgr2 after the mons are
configured or upgraded.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-10 11:48:47 -07:00
parth-gr 2e89ff0fd9 core: sync ceph fsid on cephcluster status
FSID will be updated with cephcluster CR status
when monitoring check get start

Signed-off-by: parth-gr <paarora@redhat.com>
2022-03-09 21:57:37 +05:30