Commit Graph
5240 Commits
Author SHA1 Message Date
Sébastien Han 44cd526fff Merge pull request #5883 from leseb/rm-sc-external
ceph: remove storageclass-bucket-retain-external.yaml
2020-07-27 11:50:58 +02:00
Sébastien Han 11df9994b5 Merge pull request #5891 from travisn/codegen-sync
ceph: Update codegen for recent changes
2020-07-27 11:38:06 +02:00
Travis Nielsen 6f3582b651 ci: update codegen for recent changes
make codegen hadn't been run for some recent changes,
now the generated code is in sync.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-24 12:21:51 -06:00
Travis Nielsen e68e52b917 Merge pull request #5866 from subhamkrai/gosec-error
ceph: handling gosec errors that are not checked
2020-07-24 10:13:50 -06:00
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
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
Jared Watts 52ef5ba81f Merge pull request #5854 from prksu/nfs-openshift-doc
doc: update nfs openshift scc documentation
2020-07-23 16:33:59 +02:00
Alexander Trost 0795204b1d Merge pull request #5872 from cloudical-io/cassandra_update
cassandra: use latest 3.11.6 version in examples
2020-07-23 15:26:36 +02: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 dc643bfca2 ceph: remove storageclass-bucket-retain-external.yaml
The new CephObjectStore code now has an external property and we won't
require the endpoint to be set manually anymore on the SC. The
lib-bucket code will detect it through the name of the object store.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-22 18:37:49 +02:00
Sébastien Han e517ac96aa ceph: fail if the pool fails to be deleted
Let's assert if the pool is still present.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-22 17:25:15 +02:00
Sébastien Han 5a621a1591 ceph: use infof
We need infof since we pass a variable.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-22 17:25:15 +02:00
Sébastien Han 17e9f1a890 ceph: remove unexisting function
Leftover from a previous patch, this function does not exist anymore.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-22 17:25:15 +02: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 66d81230ac Merge pull request #5870 from Madhu-1/remove-metaflag
ceph: remove unwanted metadatastore and mountcache flag
2020-07-22 09:00:23 -06: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
Alexander Trost 29e51cb1e9 cassandra: use latest 3.11.6 version in examples
This also updates the cassandra version in the tests.
This is to provide safe and secure defaults to users running Cassandra.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-07-22 13:18:43 +02:00
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
Madhu Rajanna 73e1ee41c3 ceph: remove unwanted metadatastore and mountcache flag
metadatastore and mountcache are required for cephcsi v1.0.0

as rook doesnot used ceph-csi v1.+ version
we can remove this flag. Removing these flags doesnot
affect the functionality of anything.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-22 14:36:11 +05:30
Sébastien Han 68bcc18a1c Merge pull request #5853 from cybozu-go/fix-parameter-fields-of-crds
ceph: fix the parameters fields of cephfilesystem crd and cephblockpool crd
2020-07-22 09:11:47 +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 9dd0ea894a ceph: documentation for pulling a realm for multisite
This commit adds design revisions, examples, and
documentation for object multisite.

Changes to the CephObjectRealm to pull a realm
from another cluster, and the zone for creating
pools are amongst the larger changes

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2020-07-21 16:46:18 -04:00
Travis Nielsen eaca35e7af Merge pull request #5855 from caffeinism/patch-2
ceph: change command to add 3300 port for monmap
2020-07-21 13:12:56 -06: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 632818bab9 Merge pull request #5861 from SUSE/docs-fix-requiresafereplicasize-placement
docs: fix placement of param in Ceph Pool CRD
2020-07-21 17:43:20 +02:00
Blaine Gardner 0a08480c3a docs: fix placement of param in ceph pool crd
`requireSafeReplicaSize` is now a sub-param of `replicated` and not of
Ceph's `parameters`.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-07-21 09:37:59 -06: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
Sébastien Han 698f46e978 ci: purge after flexsuite
If we don't the mgr tests cannot verify the osd creation and will fail
with:

```
--- FAIL: TestCephMgrSuite (169.32s)
    --- FAIL: TestCephMgrSuite/TestCreateOSD (1.65s)
        ceph_mgr_test.go:217:
            	Error Trace:	ceph_mgr_test.go:217
            	Error:      	Should not be: ""
            	Test:       	TestCephMgrSuite/TestCreateOSD
            	Messages:   	No devices available to create test OSD
        ceph_mgr_test.go:218:
            	Error Trace:	ceph_mgr_test.go:218
            	Error:      	Should not be: ""
            	Test:       	TestCephMgrSuite/TestCreateOSD
            	Messages:   	No nodes available to create test OSD
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-21 17:10:28 +02:00
Sébastien Han bc4875a5eb ci: only apply cleanup policy on converged cluster
There is no point of asking for a cleanup when the cluster is external,
also the cleanup pod will never exist and the CI will fail waiting for
it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-21 17:10:28 +02:00
Sébastien Han 6444675d4d ci: debug cleanup job logs
Add logs of the cleanup jobs on success.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-21 17:10:26 +02:00
Sébastien Han 10ed662bdb ceph: enhancement disk sanitize options
Now, we can not only cleanup monitor data, logs and crashes but the
disks too. As part of the cleanupPolicy CR spec, we have a new setting
called sanitizeDisk which holds more details:

* method: indicates if the entire disk should be sanitized or simply ceph's metadata.
Possible choices are 'complete' or 'quick' (default)
* dataSource: indicate where to get random bytes from to write on the disk.
Possible choices are 'zero' (default) or 'random'
Using random sources will consume entropy from the system and will take much more time then the zero source
* iteration: overwrite N times instead of the default (1). Takes an integer value

See the documentation for more details.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-21 14:07:11 +02:00
Hiroshi Muraoka 478ee124ee ceph: run make codegen
Signed-off-by: Hiroshi Muraoka <h.muraoka714@gmail.com>
2020-07-21 10:34:54 +00:00
Hiroshi Muraoka 5f4e9cf38b ceph: fix the parameters fields of crds
CephBlockPool: remove the duplicated field
CephFilesystem: change the nesting level

Related to #5779

Signed-off-by: Hiroshi Muraoka <h.muraoka714@gmail.com>
2020-07-21 10:34:54 +00:00
Sébastien Han a343c597f6 Merge pull request #5857 from travisn/more-clusterinfo
ceph: Additional clusterInfo cleanup for user creds
2020-07-21 12:16:44 +02:00