Commit Graph
6253 Commits
Author SHA1 Message Date
Sébastien Han 8b65eb6126 ceph: do not enable ShareProcessNamespace if HostPID
If HostPID is enabled, this means the Ceph version is older than Octopus
and we are still running OSD with HostPID due to an internal
inter-process check.
If the log collector is enabled we need to enable ShareProcessNamespace
**only** if HostIPC is disabled.

Both HostPID and ShareProcessNamespace cannot be enabled.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-01 18:23:19 +01:00
Sébastien Han efefb557a8 Merge pull request #7111 from leseb/fix-1922108
ceph: do not enable ShareProcessNamespace if HostIPC
2021-02-01 17:18:58 +01:00
Sébastien Han f910bcd942 Merge pull request #7110 from leseb/fix-codegen-again
ceph: fix codegen (again)
2021-02-01 17:17:59 +01:00
Travis Nielsen 661b8c7336 Merge pull request #7075 from sp98/timeout-radosgw-admin-cmd
ceph: timeout `radosgw-admin` cli commands
2021-02-01 09:10:18 -07:00
Sébastien Han c463153b61 Merge pull request #7105 from travisn/no-log-mon-pdb
ceph: Skip logging error for mon pdbs if single mon
2021-02-01 16:38:07 +01:00
Sébastien Han 8ea9b6b80f ceph: fix CephFNS plurial
Introducing the new flag to get the correct plurial version of CephNFS,
if not overriden the generator will be CephNFSs instead of CephNFSes.

We run deepcopy and client,lister,informer generations separetly so we can use the flag "--plural-exceptions"
which is only known by client,lister,informer binary and not the deepcopy binary.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-01 16:36:56 +01:00
Travis Nielsen d150980241 ceph: skip logging error for mon pdbs if single mon
If there is a single mon, we don't expect the PDBs to be created
and neither do we need to log that it is an error condition.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-01 07:57:53 -07:00
Sébastien Han 260274cdb3 ceph: do not enable ShareProcessNamespace if HostIPC
If HostIPC is enabled, this means the Ceph version is older than Octopus
and we are still running OSD with HostIPC due to an internal
inter-process check.
If the log collector is enabled we need to enable ShareProcessNamespace
**only** if HostIPC is disabled.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-01 15:50:16 +01:00
Sébastien Han 685e0a7a55 ceph: fail of any codegen files are found
If any files are found after running `make codegen` we fail.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-01 15:13:37 +01:00
Sébastien Han 3d556115ce ceph: fix code generation
Somehow, I had things mixed up in the previous patch. Now the code
generation ends up in the right directorty.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-01 15:13:37 +01:00
Sébastien Han 7ad4902bb4 Merge pull request #7108 from subhamkrai/update-canary-test
ci: update canary-integration-test
2021-02-01 15:13:07 +01:00
Sébastien Han d8dd66a21a Merge pull request #7106 from travisn/remove-ozone
docs: Remove stale ozone design doc
2021-02-01 09:22:26 +01:00
subhamkrai 6d66f0a6f2 ci: update canary-integration-test
this commit update canary-integration-test
to remove `object-openshift.yaml` file from
`dry-run`.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-02-01 13:51:16 +05:30
Santosh Pillai 113376f1ab ceph: timeout radosgw-admin cli commands
When creating object store, `radosgw-admin realm get ..` command is stuck forever when required number of OSDs are not available. Because of this the uninstall of object store is also stuck. User has to manually remove the finalizer to delete the object store.This PR uses `ExecuteCommandWithTimeout` for running `radosgw-admin` command. Timeout during installation will be reconciled. Cleanup will be treated as best effort. Any errors during uninstalling of single site object store will only be logged.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-02-01 10:57:04 +05:30
Travis Nielsen 1f2346a988 docs: remove stale ozone design doc
The ozone operator was proposed over a year ago and then
was not implemented. Removing the design doc to clean up
since there was no further community support.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-29 15:48:35 -07:00
Blaine Gardner 1761874da2 Merge pull request #6999 from rohan47/clean_terminating_pods
ceph: clean pods stuck in terminating state on a failed node
2021-01-29 13:15:36 -07:00
Blaine Gardner deec85cd1d Merge pull request #7092 from subhamkrai/route
ceph: create a route for ceph-rgw
2021-01-29 13:14:10 -07:00
Travis Nielsen bc5be15bb3 Merge pull request #7100 from subhamkrai/disable-adm-controller
ceph: disable admission controller for helm suite
2021-01-29 09:22:33 -07:00
Travis Nielsen 0a1bfe575c Merge pull request #7062 from leseb/cephfs-mirror
ceph: add cephfs mirroring support
2021-01-29 09:09:56 -07:00
subhamkrai beff403c89 ceph: create a route for ceph-rgw
this commit ceph: create a route as
a part of example in `object-openshift.yaml`.
Route is a feature of OpenShift so, changes
are only for object-openshift.yaml.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-01-29 14:09:31 +05:30
subhamkrai 75030316ca ceph: disable admission controller for helm suite
disable admission controller for helm suite.
v1 version of admissionregistration.k8s.io/v1
require minimum v1.16.0 of k8s. All other suite
was disabled earlier this was left.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-01-29 12:53:03 +05:30
Sébastien Han ae82c86241 Merge pull request #6701 from sp98/update-mds-command-args
ceph: add --public-addr args to ceph mds command
2021-01-28 21:02:05 +01:00
Santosh Pillai 5831c0f0d0 ceph: add --public-addr args to ceph mds command
add --public-addr=<podIP> args to ceph mds command when host network is not enabled.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-01-28 12:40:42 -07:00
Travis Nielsen 4f7250298c Merge pull request #7084 from travisn/maxmonid-commit
ceph: Only commit the maxmonid after starting a mon daemon
2021-01-28 11:30:10 -07:00
Sébastien Han c0123cf182 ceph: add cephfs mirroring support
With Ceph Pacific, Rook can now deploy the cephfs-mirror daemon.
This initial commit covers the deployment of a single daemon only.
Multiple mirror daemons is currently untested.
Only a single mirror daemon is recommended.

The configuration of peers will come in a later PR since the mgr module
is still pending upstream: https://github.com/ceph/ceph/pull/39050

The same goes for integration tests, they will get added later once we
start testing on Pacific.

Closes: https://github.com/rook/rook/issues/7002
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-28 19:21:18 +01:00
Travis Nielsen 81431f91a9 Merge pull request #7082 from travisn/enable-pdbs-by-default
ceph: Enable pod disruption budgets by default
2021-01-28 11:10:31 -07:00
rohan47 0876a20e7c ceph: clean pods stuck in terminating state
when a node fails some pods remains in terminating while other manage to
be rescheduled on another node successfully.
this commit adds code to clean up all the Rook and CSI pods that are stuck in terminating
state on a failed node.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2021-01-28 23:21:53 +05:30
Sébastien Han 725f96b468 Merge pull request #7094 from leseb/codegen-fix
ceph: fix code generation
2021-01-28 18:45:13 +01:00
Travis Nielsen 7472cfd9fa ceph: enable pod disruption budgets by default
The PDBs have been stabilizing for a good length of time now since
they were created in v1.1, and later redesigned in v1.5. The time
has come to enable the feature by default so everyone can enjoy
the stable Rook storage even while draining K8s nodes.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-28 10:25:33 -07:00
Sébastien Han 32f5bfd6bf ci: fix code generation
With the recent bump to Golang 1.15, the code generation was broken.
Changing the output-base to the main repo and not the vendor solves the
issue and feel more natural too. The command "go mod vendor" only
cherry-picks certain files for inclusion  in the vendor folder. I
suspect the upgrade to Golang 1.15 introduced that behavior. Previously
our vendir dir was full and now it has nothing (from rook) that's why
the code generator was removing all our interfaces.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-28 18:21:07 +01:00
Blaine Gardner 2caeb8bfe3 Merge pull request #6833 from sp98/configure-osd-upgrade-timeout
ceph: configure health check timeout for OSDs when upgrading
2021-01-28 09:46:12 -07:00
Sébastien Han 6936706d81 ci: use code-gen 1.20
Let's just the same version as our go.mod suggests. This workaround
seems old and not necessary anymore.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-28 17:06:09 +01:00
Sébastien Han 920381d677 Merge pull request #7077 from jshen28/fix-disable-mds-liveness-probe
ceph: fix mds liveness probe
2021-01-28 11:04:20 +01:00
Sébastien Han 742c25a559 Merge pull request #7086 from cybozu-go/update-lib-bucket-provisioner-for-206
ceph: update lib bucket provisioner
2021-01-28 11:01:32 +01:00
Satoru Takeuchi cf8f8bc851 Merge pull request #7089 from leseb/errorf
ceph: use errors package instead of fmt
2021-01-28 18:02:51 +09:00
Sébastien Han d7610b7e6f ceph: use errors package instead of fmt
Small fix since all the ceph codebase is using the errors package.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-28 08:51:48 +01:00
Sébastien Han f93a5bdac8 Merge pull request #7081 from travisn/remove-obsolete-doc
docs: Remove obsolete doc for handling rebooting nodes
2021-01-28 08:45:31 +01:00
Toshikuni Fukaya 79eaad43c5 ceph: update lib bucket provisioner
Update to latest lib-bucket-provisioner to fix issue
https://github.com/kube-object-storage/lib-bucket-provisioner/issues/206

The change avoids overwriting or erasing OBC labels or finalizer fields
which are added by other controllers.

Signed-off-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
2021-01-28 01:55:16 +00:00
Travis Nielsen 59cb2dc79f Merge pull request #7083 from travisn/host-network-crash
ceph: Prevent operator crash with host networking and node not found
2021-01-27 16:34:43 -07:00
Travis Nielsen 4fa3c04e44 ceph: only commit the maxmonid after starting a mon daemon
The maxMonId should only track the mons that have been committed to starting.
Currently the maxMonId was tracking all mon scheduling. If the reconcile
was aborted or failed, or the operator restarted in a reconcile, the
maxMonId was being reset by analyzing the mon deployments that existed.
This does not work for scenarios where mon quroum is lost and being
reset to a single mon. Now the maxMonId will only be incremented
when a mon daemon is started, and will never be decremented after
that to ensure that new mons will be incremented to the next id.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-27 16:33:36 -07:00
Travis Nielsen 5cf3338bcd ceph: prevent operator crash with host networking and mon not found
When the node is not found for mon assignment with host networking
enabled, the operator may crash. This change ensures the node is
not nil and returns an error instead of crashing.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-27 15:34:16 -07:00
Travis Nielsen c0fabef5c3 Merge pull request #7070 from travisn/friends-of-rook
docs: Replace friends of rook with community
2021-01-27 14:56:16 -07:00
Travis Nielsen ac6bbe5902 docs: remove obsolete doc for handling rebooting nodes
The approach to handle node restarts has been much improved since the
creation of this doc, with the new approach to drain nodes and
for the application to control the restarts with the pod disruption
budgets. We now remove this obsolete documentation and recommend
the PDBs to be configured.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-27 14:47:14 -07:00
Sébastien Han f841c1b211 Merge pull request #7071 from travisn/osd-args-ordering
ceph: Consistently order the osd args to avoid restarts
2021-01-27 16:47:36 +01:00
Travis Nielsen 475260de35 Merge pull request #6875 from Madhu-1/fix-6830
ceph: add option to set FSGroupPolicy for CSI PVC
2021-01-27 08:34:45 -07:00
ushen 9bd2150d5e ceph: fix mds liveness probe
Previous patchset does not work before, because
`ConfigureLivenessProbe` does not directly modifies
input variable.

Signed-off-by: ushen <yshxxsjt715@gmail.com>
2021-01-27 20:27:24 +08:00
Santosh Pillai 4237aa7ecc ceph: configure health check timeout for OSDs when upgrading
added waitTimeoutForHealthyOSD in the cluster crd that defines the time (in minutes) the operator would wait before an OSD can be stopped for
upgrade. This PR also removes the ok-to-continue logic for osds as its already handled by ok-to-stop. The default value is 10 minutes.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-01-27 11:13:05 +05:30
Travis Nielsen 570cba9b4e ceph: consistently order the osd args to avoid restarts
The settings for tuneDeviceClass and tuneFastDeviceClass were
stored as a map[string]string. When iterating over the map to
append the args, the args were being appended in an unpredictable
order. The order could change every reconcile, resulting in an
unnecessary OSD restart potentially every reconcile. Now we iterate
over a slice that will be ordered predictably and ensure OSDs
will not be restarted when not needed.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-26 17:23:01 -07:00
Travis Nielsen 31bcb60302 Merge pull request #6982 from travisn/osd-pvc-allow-removal
ceph: Allow removal of arbitrary osds on pvcs and simplify pvc names
2021-01-26 15:00:24 -07:00
Travis Nielsen 4b43e7afa5 ceph: allow removal of arbitrary osds on pvcs and simplify pvc names
OSDs on PVCs previously were always replaced with PVCs of a given name.
For on-prem scenarios where the OSDs might need to be removed instead
of replaced, the operator now allows holes to exist in the PVC index
names as long as there are a sufficient number of PVCs to meet the
criteria for the deviceSet.count.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-26 14:38:12 -07:00