Commit Graph
5036 Commits
Author SHA1 Message Date
Travis Nielsen 84b8cdcf75 exec: simplify the exec package from unused methods and logging
The methods and arguments to the exec methods are not all used anymore.
This cleans up the methods to only what is necessary to improve
the readability and maintainability.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-19 07:49:53 -06:00
Travis Nielsen 18b0e7d295 ceph: scrub ceph commands to write actions to the log
The ceph commands are now only written to the log in debug mode.
For commands that change the system state we now ensure that
a useful log entry is written. If all the details of the ceph
commands are needed, debug logging should still be enabled.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-19 07:49:53 -06:00
Travis Nielsen 7d2811bfb6 ceph: remove obsolete ipv4 command line flags
Long ago the ipv4 flags were renamed to public-ip and private-ip
so we can go ahead and remove the obsolete flags.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-19 07:49:53 -06:00
Travis Nielsen 0344074c82 ceph: remove dead code for process management
Rook no longer relies on its own process management, now we can rely
completely on Kubernetes to manage the pod lifecycle. The code
to check for running processes and replacement them hasn't been
used for a long while.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-19 07:49:53 -06:00
Kristoffer Grönlund f49ad5ad33 ceph: Make error unique when OSD on PVC fails to initialize
To make debugging easier, make sure each error path has
a unique message.

Signed-off-by: Kristoffer Grönlund <kgronlund@suse.com>
2020-03-19 09:46:13 +01:00
Sébastien Han 26999b7fe4 Merge pull request #5042 from leseb/size-1-pacific
ceph: allow size option on pacific only
2020-03-18 16:37:07 +01:00
Sébastien Han 31fa13c824 Merge pull request #4530 from rajatsingh25aug/cephObjectStore
Ceph: ObjectStore replica size will not change
2020-03-18 15:18:59 +01:00
Sébastien Han 66b561e45b ceph: allow size option on pacific only
This flag only exists in Pacific, not Octopus.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-18 15:12:06 +01:00
Sébastien Han f268c897e9 ceph: Convert the Ceph ObjectStore controller to the controller-runtime
The CRD watcher has been replaced by the new controller-runtime
framework.
This brings robustness in our operator, meaning that any resources that
are modified will be reconciled into the desired state.

Closes: https://github.com/rook/rook/issues/4937
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-17 15:12:41 -06:00
Sébastien Han 711ec6095b ceph: controllers just log status error
Let's return the original error instead and just log the status change
error.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-17 15:12:15 -06:00
Sébastien Han b3a61bf4b9 ceph: more precise watcher object user controller
Only watch and react on resources that are matching the Kind of
CephObjectStoreUser.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-17 15:12:15 -06:00
RAJAT SINGH 3d6d14ea73 cephObjectstore: Replica size will not change
The pool size for cephObjectStore (object.yaml), was not getting updated in the cluster upon changing.The reason being that there was an "else" case missing to update  the replica size if the pools already existed. That will fix this issue.

Signed-off-by: RAJAT SINGH <rajasing@redhat.com>
2020-03-17 19:23:28 +05:30
moricho 7d0215d820 ci: switch to use go.mod.check target
This switches to use `go.mod.check` target instead of `go.vendor.check` target.

Signed-off-by: moricho <ikeda.morito@gmail.com>
2020-03-17 16:48:43 +09:00
moricho 437a0b1d9b go: versionup sig-storage-lib-external-provisioner/controller
version up sig-storage-lib-external-provisioner/controller to v4.1.0 and
modify related files

Signed-off-by: moricho <ikeda.morito@gmail.com>
2020-03-17 16:47:55 +09:00
moricho 8907e220ea apis: regenerate files & modify k8sutil tests
This regenerate files with code-generator/deepcopy-gen and modify the related tests.

Signed-off-by: moricho <ikeda.morito@gmail.com>
2020-03-17 16:47:53 +09:00
moricho 2beb731a7e go: move to gomodules
This switches Rook to use `go mod` instead of `dep` for
dependencies management.

Signed-off-by: moricho <ikeda.morito@gmail.com>
2020-03-17 16:47:53 +09:00
Travis Nielsen 017a560db3 Merge pull request #5021 from samkulkarni20/yb-mem-limits
YugabyteDB: Add resource limits to YugabyteDB pods
2020-03-16 11:12:07 -06:00
Sébastien Han a459a2e220 Merge pull request #5030 from leseb/no-full-err
ceph: remove dead code
2020-03-16 15:19:49 +01:00
Sébastien Han f44583b2b9 ceph: remove dead code
As part of the transition to support Ceph release **as of** Nautilus, we
left over that portion of code.
We don't need it anymore.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-16 14:01:24 +01:00
Sameer Kulkarni 909770a346 YugabyteDB: Add resource limits to YugabyteDB pods
Current YugabyteDB operator code creates Master and TServer pods without any resource requests/limits (specifically CPU and memory).
This causes the operator to run into soft/hard memory limit issue. The fix adds recommended resource requests and limits as defaults to the pods it creates.

Closes: https://github.com/yugabyte/yugabyte-db/issues/3884
Signed-off-by: Sameer Kulkarni <samkulkarni20@gmail.com>
2020-03-14 12:23:14 +05:30
Travis Nielsen 783507588e Merge pull request #5023 from leseb/allow-size-1
ceph: allow setting pool size 1 on octopus
2020-03-13 10:17:41 -06:00
Sébastien Han 99f6402563 ceph: allow setting pool size 1 on octopus
Left from https://github.com/rook/rook/pull/4895
Also more cleanup on the ceph.conf since we config is in the mon store.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-13 15:48:08 +01:00
Sébastien Han 1edc3adc58 ceph: add missing 'rook_cluster' label to crash
The crash deployment was missing the 'rook_cluster' label to indicate
which ceph cluster it is part of.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-12 11:43:20 +01:00
Sébastien Han 723671f58c ceph: run osd initContainer in priv mode
To access a special block device the container must run privileged.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-11 19:33:14 +01:00
Sébastien Han 14cb46ae39 ceph: bump to 14.2.8
Ceph 14.2.8 just got released so let's use it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-11 19:32:48 +01:00
Sébastien Han 619f301eb7 ceph: osd re-add udev bindmount
The OSD needs to talk to the udev socket to get information about a device.
like serial, vendor etc. So that it can populate the output of:
`ceph osd metadata $n` correctly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-11 18:35:47 +01:00
Sébastien Han 04979f8c60 Merge pull request #4909 from umangachapagain/config-watcher
Ceph: adds watch to rook-ceph-operator-config ConfigMap
2020-03-11 09:34:16 +01:00
Travis Nielsen fd89d0dfb3 ceph: remove dead code for finding valid nodes
There are no longer callers of the helper to find nodes in a list
of Rook nodes.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-10 12:06:34 -06:00
Travis Nielsen ba07a63033 ceph: properly lookup the K8s topology labels for OSDs
The OSDs pick up on several topology labels for CRUSH hierarchy.
The GA label topology.kubernetes.io was partially implemented, but
not picked up by the OSDs. Now the OSDs will pick up both the topology
labels from pre-1.17 such as failure-domain.beta.kubernetes.io/zone
and topology.kubernetes.io/zone.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-10 12:06:34 -06:00
Umanga Chapagain c54c0d16cf Ceph: adds watch to rook-ceph-operator-config ConfigMap
watches the rook-ceph-operator-config ConfigMap and updates
CSI driver

Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-03-10 12:46:54 +05:30
Umanga Chapagain 06ba93e629 Ceph: refactor GetOperatorSetting for reuse
Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-03-09 21:41:56 +05:30
Sébastien Han c580e6b496 Merge pull request #4977 from leseb/orchestrator-mod-name
ceph: orchestrator cli name change
2020-03-06 18:04:47 +01:00
Sébastien Han 8b0fdf31a9 ceph: orchestrator cli name change
With https://github.com/ceph/ceph/pull/33131, the CLI has been rename
'orch' instead of 'orchestrator'.
Octopus only.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-06 17:01:16 +01:00
Sébastien Han 9feb8401e1 ceph: only delete pool if exists
We have seen cases where the pool is already gone and a deletion
timestamp is set on the CephBlockPool CR.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-06 14:35:23 +01:00
Sébastien Han d963311dfe Merge pull request #4926 from leseb/object-store-user-crd-controller-runtime
ceph: separate controller for CephObjectStoreUser CRD
2020-03-06 14:15:37 +01:00
Sébastien Han 025131c115 Merge pull request #4972 from travisn/osd-status-update
OSD prepare pod was not signaling completion when zero OSDs configured
2020-03-06 13:42:44 +01:00
Sébastien Han 9f2867e12a ceph: separate controller for CephObjectStoreUser CRD
Now, the CephObjectStoreUser CRD is managed with the controller-runtime.
So the watcher is outside of the main controller reconciliation loop of
CephCluster which brings numerous benefit such as:

* having its own reconciliation loop
* won't block anything from the main CephCluster controller loop
* fast than waiting for CephCluster loop to completion

Partially close: https://github.com/rook/rook/issues/1981
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-06 11:53:40 +01:00
Travis Nielsen 69c9ed4206 ceph: storage warn iare specified but ignored
In the cluster CR the nodes element will be ignored under storage when
useAllNodes is true. The nodes will only be applied when useAllNodes is
false. It is a common usability problem that users can't figure out
why their nodes are not configured. At least this log entry can give
them a clue.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-05 18:26:32 -07:00
Travis Nielsen 0eee2b4dee ceph: always mount /dev in the osd prepare pod
The osd prepare job is now always working with devices so
we always need to mount /dev and run privileged. There is
no scenario for not mounting /dev since filestore support
was removed.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-05 18:15:58 -07:00
Travis Nielsen 3cef930fab ceph: report osd status when there are no devices
The OSD prepare pod must always update status on the status configmap
in order to alert the operator that the OSD configuration on the node
is completed. This fixes an issue where the status was not being reported
if no devices were configured.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-05 14:10:24 -07:00
Travis Nielsen a52948e7f7 ceph: continue orchestration even if osd status update fails
The communication between the operator and OSD prepare job
is done through updates to the configmap. If an update fails
to the configmap, we are anyway going to need to check the logs
for failure. So let's just log the error and make a best effort
to continue the orchestration. If the failure was temporary,
the next update to the status would succeed and likely continue
working as expected.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-05 14:08:58 -07:00
Sébastien Han a137b31e1a ceph: refactor controller helper
Clean and refactor code helper for controller-runtime.
Implement those into the block pool controller.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-05 12:37:44 -07:00
Nizamudeen 3296fc64a9 ceph: Follow up for adding the state variable
Changed back the status.State to the exact way it was implemented on the ceph cluster. Added the States as a Constant and used that constant to call the status.State.

Signed-off-by: Nizamudeen <nia@redhat.com>
2020-03-04 18:57:07 +05:30
Travis Nielsen 65f3f84ab0 tests: ensure pools are purged during integration tests
With a finalizer on the pools, the pools were not always being purged
during the integration tests. Now the multicluster suite will ensure
its pool is purged.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-03 19:44:23 -07:00
Nizamudeen 3b9456ed61 ceph: Adding status.state variable and assigned it to status.phase
Most of the OLM UI currently uses status.Phase to show the status of the cluster and in some case it uses status.State to show the information.
Having them both for now and slowly deprecating the uses of status.state is the most appropriate way to do now.

Signed-off-by: Nizamudeen <nia@redhat.com>
2020-03-03 11:13:03 +05:30
Elise Gafford 9a2e8f88e2 ceph: set BlockOwnerDeletion=false for csi driver ownerReference
As a safeguard against the error case described in #4934, this
change sets BlockOwnerDeletion to false on the ownerReference
of all Ceph CSI resources.

Signed-off-by: Elise Gafford <egafford@redhat.com>
2020-03-02 15:52:56 -05:00
Travis Nielsen f263a828ad Merge pull request #4935 from shaas/is4934
Ceph: Ceph CSI fails to start. #4934
2020-03-02 13:19:51 -07:00
Sébastien Han a3068dee0b ceph: separate controller for CephBlockPool CRD
Now, the CephBlockPool CRD is managed with the controller-runtime.
So the watcher is outside of the main controller reconciliation loop of
CephCluster which brings numerous benefit such as:

* having its own reconciliation loop
* won't block anything from the main CephCluster controller loop
* fast than waiting for CephCluster loop to completion

Partially close: https://github.com/rook/rook/issues/1981
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-02 17:31:03 +01:00
Stefan Haas 84cac45d2c Ceph: Ceph CSI fails to start. #4934
Signed-off-by: Stefan Haas <shaas@suse.com>
2020-03-02 16:27:59 +01:00
Sébastien Han acab9b0ead ceph: enable command debug when DEBUG
Only print command debugs if the operator log level is DEBUG.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-02 09:29:48 +01:00