Commit Graph
1610 Commits
Author SHA1 Message Date
Blaine Gardner cb6881e401 Merge pull request #5909 from SUSE/ceph-add-daemon-type-label
ceph: add ceph_daemon_type label to Ceph daemon pods
2020-07-31 09:40:48 -06:00
Jiffin Tony Thottan 091679cbeb ceph: use deleteOBCResourceLogError instead of deleteOBCResource
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-07-31 15:41:35 +05:30
Jiffin Tony Thottan 59f1e8364e ceph: fix up deleteOBCResourceLogError
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-07-31 15:41:31 +05:30
Travis Nielsen e0ea87a353 Merge pull request #5674 from thotz/quotaobc
ceph: adding support for quota in object bucket claims
2020-07-30 22:51:58 -06:00
Blaine Gardner dcf8ae2526 ceph: rename pod labels function for more clarity
Rename PodLabels function to CephDaemonAppLabels for more clarity about
what the function's purpose is.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-07-30 11:16:30 -06:00
Blaine Gardner 6ceaef8610 ceph: add new "ceph_daemon_type" label to nfs pods
Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-07-30 11:16:29 -06:00
Blaine Gardner 62cbaaec02 ceph: add new "ceph_daemon_type" label to osd pods
Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-07-30 11:16:26 -06:00
Blaine Gardner 9b6114c192 ceph: add 'ceph_daemon_type' label to pod labels
This can help users identify the daemon type similarly to how
'ceph_daemon_id' helps identify the daemon ID. This also makes it so
scripts users create don't have to parse "app=rook-ceph-<daemonType>"
into "<daemonType>" if they desire that bit of info.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-07-30 11:16:22 -06:00
subhamkrai 0279025e9e ceph: handling all the gosec errors
a few of the gosec errors were left. so
this commit will resolve all the errors.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-07-30 08:19:55 +05:30
Travis Nielsen 704e80d1b5 Merge pull request #5912 from rohantmp/rohantmp-patch-1
Core: Add comment warning to keep k8sutil hashing consistent for name…
2020-07-28 10:41:47 -06:00
Travis Nielsen 1ee29b9c63 Merge pull request #5895 from subhamkrai/nosec-error
ceph: suppress gosec errors for g204,g304,g101
2020-07-28 08:25:58 -06:00
Travis Nielsen 9e6429b4c8 Merge pull request #5893 from subhamkrai/gosec-error-G601
ceph: handling gosec error code g601
2020-07-28 08:25:00 -06:00
Travis Nielsen f6b7aac3b6 Merge pull request #5908 from leseb/split-osd-files
ceph: split osd code in files
2020-07-28 07:37:46 -06:00
Rohan Joseph 82b062f91d core: add comment warning to keep k8sutil hashing consistent
The name generation utils need to provide consistent outputs across
versions so that names generated based on values are consistent and
older generated keys are not lost.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2020-07-28 12:51:54 +05:30
Jiffin Tony Thottan f4240cb31d ceph: add quota support for obc
Closes: #5274
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-07-28 12:00:11 +05:30
Jiffin Tony Thottan 96a53389b1 ceph: adding new quota apis
Adding new apis such as EnableUserQuota() for enabling quota,
SetQuotaUserObjectMax() and SetQuotaUserMaxSize() for setting user specific quotas
for objects and size respectively. Please note the size is quota is determined in GBs.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-07-28 12:00:04 +05:30
Jiffin Tony Thottan 5a6cafcdfc ceph: add missing explaination for apis in user.go
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-07-28 11:59:57 +05:30
Jiffin Tony Thottan cf61966205 ceph: remove rgwerrno from setuserquota
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-07-28 11:59:51 +05:30
subhamkrai 465a0f0aec ceph: handling gosec error code g601
this commit handles all the gosec g601
error code (i.e Implicit memory aliasing
of items from a range statement).

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-07-28 11:34:49 +05:30
subhamkrai bcd7faed4e ceph: suppress gosec errors for g204, g304, g101
this commit suppress the gosec errors for

g204: Audit use of command execution.
g304: File path provided as taint input.
g101: Look for hard coded credentials.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-07-28 11:10:48 +05:30
Sébastien Han 71dff530d3 ceph: split osd code in files
Makes the code more readable and decoupled into files.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-27 23:21:14 +02:00
Travis Nielsen 22ba4591f3 Merge pull request #5888 from Madhu-1/csi-v3.0.0
ceph: update ceph-csi to v3.0.0 release
2020-07-27 14:05:29 -06:00
Madhu Rajanna cc3b4e6906 ceph: remove check for kubernetes version
as we are going to deploy snapshotter by
default we are going to remove the kubernetes
version check.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-27 13:45:56 +05:30
Madhu Rajanna 026c5ac28a ceph: update version check for v3.0.0 release
added v3.0.0 as supported release of cephcsi.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-27 13:30:44 +05:30
subhamkrai acc4ed5df9 ceph: handling gosec errors that are not checked
this commit handles all the gosec g104
i.e audit errors not checked inside pkg.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-07-24 20:02:06 +05:30
Travis Nielsen e1f296e34a Merge pull request #5880 from Madhu-1/fix-csi-ver
ceph: skip csi version detect if allowunsupported is set
2020-07-23 23:18:57 -06:00
Madhu Rajanna 031e3145a5 ceph: update cephcsi to v3.0.0
update cephcsi to latest available release

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-24 10:21:59 +05:30
Travis Nielsen 195a241833 Merge pull request #5881 from Madhu-1/tol-for-csi-ver
ceph: add provisioner toleration for csi version check job
2020-07-23 12:44:34 -06:00
Sébastien Han dcadf10f0c Merge pull request #5837 from leseb/external-connection
ceph: let the healthcheck set the status phase
2020-07-23 09:24:58 +02:00
Sébastien Han cf28b16b68 Merge pull request #5836 from subhamkrai/objectstore-liveness
ceph: ability to configure livenessprobe for cephobjectstore crd
2020-07-23 09:14:34 +02:00
Madhu Rajanna d6b2ad142d ceph: add provisioner toleration for csi version check job
Added a provisioner toleration to the csi version
check job, so that we can schedule the csi version
check on the node where the nodes are tainted.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-23 08:49:18 +05:30
Madhu Rajanna 51d3a52c80 ceph: skip csi version detect if allowunsupported is set
If the AllowUnsupported flag is set to true we should
not check the csi version as it will be kind of no-op
as even incase of failure we continue. if we disable
the version check in this case,the deployment will
be little faster as we dont wait for version check
to complete to start CSI pods.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-23 08:30:14 +05:30
Travis Nielsen 77e787b00e Merge pull request #5805 from kesavanvt/add_device_class
ceph: Adding deviceClasses info to CephCluster CR
2020-07-22 16:00:18 -06:00
Travis Nielsen 3e30b6fbdf Merge pull request #5869 from travisn/init-mon-spec
ceph: Require the cluster spec for initialization of the mons to avoid removing a healthy mon
2020-07-22 10:46:42 -06:00
Sébastien Han 9b9141ee84 ceph: stop monitoring health on cluster deletion
Stop the go routines on cluster deletion.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-22 17:25:15 +02:00
Sébastien Han 39931b1edf ceph: fix conditions not being applied
Somehow, the client.Update was not updating the cluster object, using
client.Status().Update actually fixed it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-22 17:25:15 +02:00
Sébastien Han 8729a206f3 ceph: let the healthcheck set the status phase
Instead of setting the Phase of the CR once the reconcile is done, let's
actually set in from the healthcheck so it is more accurate.

Closes: https://github.com/rook/rook/issues/5249
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-22 17:25:12 +02:00
Sébastien Han 89f815bf9b ceph: start rgw healthcheck immediately
When we run the goroutine, we should run start it immediately instead of
waiting for the configured interval to start. With that we can get the
Status Phase reported much faster in the CRD.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-22 17:10:17 +02:00
Sébastien Han 28c415636f ceph: remove unnecessary comment
This comment is not needed.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-22 17:10:17 +02:00
Sébastien Han 354c51e440 ceph: do not monitor osd on external mode
If the cluster is external, we must not run the osd healthcheck go
routine.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-22 17:10:17 +02:00
Travis Nielsen 234877e7c0 ceph: skip first mon health check at startup
At startup there is a race condition between the goroutine checking
for mon health and the first reconcile of the mons. There is a lock
that ensures only one of them will check the mon health at a time.
The issue is that if the wrong one gets there first, it will not
have the desired mon count initialized from the cluster CR as expected
and the healther checker will use a desired mon count of 0.
The desired count of 0 leads the health checker to remove
a mon since there are extra mons. Only one mon is allowed
to be removed at a time, and adjusting to fewer than two mons is
disallowed once there are at least two mons.

After the health checker is completed, the main reconcile of the mons
will proceed with the correct desired mon count of 3 and attempt
to restore to the real desired quorum size.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-22 08:23:09 -06:00
Travis Nielsen c1736844c9 ceph: require the mon spec for initialization
The mon was starting with a partial spec. There was a race condition
that was causing incorrect initialization in the health check goroutine
that could remove a mon upon operator restart. Now the mon will be
properly initialized with the full spec.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-22 08:23:09 -06:00
Sébastien Han 8f4e37b80a Merge pull request #5452 from leseb/osd-wipe
ceph: enhancement disk sanitize options
2020-07-22 16:11:35 +02:00
kesavan 453200045e ceph: adding deviceclasses info to cephcluster cr
The admin needs to start the toolbox and run a command such as ceph osd tree to see the device classes for each OSD. This PR simplifies it by storing the deviceclass info in the CephCluster CR status

closes: https://github.com/rook/rook/issues/5754
Signed-off-by: kesavan <kvellalo@redhat.com>
2020-07-22 17:46:51 +05:30
Sébastien Han 907c8bf85f Merge pull request #5719 from alimaredia/wip-object-store-multisite-enhancements
ceph: check for adding endpoints into zone group
2020-07-22 11:19:15 +02:00
Travis Nielsen e4026560c5 Merge pull request #5860 from travisn/edgefs-security-review
Error checking for EdgeFS related to the security review
2020-07-21 20:54:57 -06:00
Ali Maredia e6ed4ff8ea ceph: minor fixes + add realm/zg/zone to object context
- Add realm/zone group/zone to Object Context,
so that any call to runAdminCommand has the
same realm, zone group, and zone as the object
store that the call is going to.

- Also modify the delete code for the object-store
using multisite to remove the endpoints of an
object store from a zone instead of the normal
clean-up

- Added more debug logging all around the object-store
code related to multisite

- files generated by rerun of `make codegen`

- change back the edit on the Copyright in object.go

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2020-07-21 16:47:59 -04:00
Ali Maredia 0f7e55780c ceph: add pool creation for ceph-object-zone
When zones are created the ceph RGWs inside the
those zones should be using pools with the zones
name not the object-store's name

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2020-07-21 13:30:41 -04:00
Ali Maredia 5d9c2f09a9 ceph: enable the realm pull on ceph-object-realm
This commit:
- adds the pull section on the CephObjectRealm spec
to enables realms to be pulled instead of created.

- creates the system user and generates the access
key and secret key for the user and zones in a realm.

- adds "omitempty" to fields in multisite CRs that
are not required

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2020-07-21 13:30:19 -04:00
Sébastien Han 0a6cce43fb ceph: add clusterResourceDeleted flag
During the deletion sequence of the CR, we now set a success flag at the
end, right before removing the finalizer.
This avoids the case where we fail to remove the finalizer.

2020-07-21 13:29:46.334816 E | ceph-object-controller: failed to reconcile failed to remove finalizer: failed to remove finalizer "cephobjectstore.ceph.rook.io" on "teststore": Operation cannot be fulfilled on cephobjectstores.ceph.rook.io "teststore": the object has been modified; please apply your changes to the latest version and try again

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-21 17:11:29 +02:00