Commit Graph
5036 Commits
Author SHA1 Message Date
Travis Nielsen dbae36b2bb ceph: update to the latest octopus release
Update the base operator image and cluster examples to use the latest
octopus release v15.2.4. Also cleanup some old examples and unit tests
that were still based on mimic.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-06 12:11:47 -06:00
subhamkrai 7f9f1690d2 ceph: remove csi drivers when disable
remove csi drivers and delete k8s
services that drivers create,when
the default setting of drivers changed
to false.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-07-06 13:33:52 +05:30
Ahmad Nurus S 441e5edc33 nfs: add controller unit-test
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-07-03 14:34:55 +07:00
Ahmad Nurus S d324f15ec4 nfs: add kubebuilder marker and fix some documentation
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-07-03 14:33:36 +07:00
Ahmad Nurus S 90da5ec7b9 nfs: add validation admission webhook using controller-runtime
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-07-03 14:33:36 +07:00
Ahmad Nurus S f7f8270f58 nfs: rewrite nfs operator controller to use controller-runtime
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-07-03 14:33:25 +07:00
Sébastien Han e4eaa91ede ceph: add rgw endpoint healthcheck
We have introduced a new goroutine to check the state of the rgw
endpoint. It will run every minute and perform operations on a bucket.
The success or failure will be reported as part of the status field of
the CephObjectStore CR.

A good status will look like:

status:
  endpointStatus:
    lastChanged: "2020-06-25T13:47:45Z"
    lastChecked: "2020-06-25T13:48:46Z"
  phase: Connected

A failed status:

status:
  endpointStatus:
    details: |-
      error creating bucket "rook-ceph-internal-s3-bucket-checker": RequestError: send request failed
      caused by: Put http://rook-ceph-rgw-my-store.rook-ceph:8080/rook-ceph-internal-s3-bucket-checker: dial tcp 10.108.189.148:8080: connect: connection refused
    health: ERROR

This check works for both converged and external modes. Note that the
CephObjectStore CRD has a new field called "externalRgwEndpoints" which
allows you to define a list of IP addresses pointing to rgws.

Closes: https://github.com/rook/rook/issues/5692
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-02 16:34:10 +02:00
Madhu Rajanna 3f46b437c6 ceph: remove CSI_ENABLE_SNAPSHOTTER from CSI config
removed CSI_ENABLE_SNAPSHOTTER from the configuration
to enable or disable csi-snapshotter as snapshot
is moved to beta and enabled by default in kubernetes
1.17+

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-01 07:20:04 +05:30
Madhu Rajanna 54f396ca0e ceph: add check for snapshotter deployment
as we need kubernetes v1.17+ for snapshotter
to work,Added code changes to disable snapshotter
sidecar deployment by default if the kubernetes version
is less than v1.17+

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-01 07:20:04 +05:30
Madhu Rajanna 6699dba25a ceph: update sidecar images version
updated snapshotter from v1.x to v2.x
as its supports snapshot beta, the required
provisioner version to support snapshot beta
is v1.5.x+.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-01 07:20:04 +05:30
Travis Nielsen 99f17d3a33 ceph: force delete stuck mons in every reconcile
The stuck mons were only being force deleted in the mon health checker.
After an operator restart, the health check may not be executed
for 20 minutes until after the timeout during the main reconcile
which is holding onto a lock for mon reconcile. Now the stuck mon
will be deleted during the reconcile as well.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-06-29 10:38:16 -06:00
Sébastien Han 1efd490900 ceph: fix GetUser
Stop check for the output, but read it instead.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-29 16:08:35 +02:00
Travis Nielsen c37d8c9c2a Merge pull request #5702 from vbnrh/cleanup
ceph: removes unused rgw functions and constants from rook.io/v1 pkg
2020-06-26 16:30:59 -06:00
Travis Nielsen fcffc10a7b Merge pull request #5698 from travisn/remove-mon-pvc
ceph: During mon failover remove the backing pvc
2020-06-25 11:39:11 -06:00
Sébastien Han eedd43dea1 Merge pull request #5696 from leseb/fix-exec-output
ceph: fix exec output
2020-06-25 19:23:35 +02:00
Vineet Badrinath e544b5c2f6 ceph: removes unused funcs and const from rook.io/v1 pkg
Signed-off-by: Vineet Badrinath <vbadrina@redhat.com>
2020-06-25 21:33:54 +05:30
Sébastien Han fa32f5323d ceph: fix exec output
The previous code was overriding the content of `out`, now we just
return after the error.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-25 17:05:07 +02:00
Travis Nielsen 1d370b1314 ceph: during mon failover remove the backing pvc
If the mon is backed by a pvc, ensure the pvc is deleted when
the mon is failed over. The pvc is being left in a bound state
even though it will no longer be used in the cluster.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-06-24 15:37:42 -06:00
Travis Nielsen 0be6fdfa2d ceph: save mon config even if failed to remove dead mon
During mon failover if the mon fails to be removed, the new mon
config was not being saved. The mon removal anyway is not retried
if it fails, so it should make a best effort to remove all the
resources related to the mon, and then always update the mon
config after the failover.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-06-24 15:37:42 -06:00
Vineet Badrinath ce1003aef8 ceph: adds scripts and components to support admission controllers
adds deploy.sh script to deploy validatingwebhookconfiguration and create secrets.
adds new command ceph admission-controller to start webhook servers.
adds validation for various rook custom resources

Signed-off-by: Vineet Badrinath <vbadrina@redhat.com>
2020-06-24 14:59:00 +05:30
Travis Nielsen 675c9673ca Merge pull request #5628 from cybozu-go/wip-fix-5504
ceph: fix ignoring device specification with non-kname
2020-06-23 12:21:31 -06:00
Satoru Takeuchi f65bb923ed ceph: fix ignoring device specification with non-kname
Partition's DevLinks are empty in osd-prepare-pod. So, the device
specification with non-kname, for example devicePathFilter, doesn't
work.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-06-22 21:37:05 +09:00
Satoru Takeuchi e2df534abe ceph: fix the test of OSD
Fix the following bugs.

- CephVersion is not back to Octopus
- `cephadm' here is called with three arguments,
  "info --query=property <devname>". We should use 'args[2]' instead.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-06-22 05:32:58 +09:00
binoue 57b944abfb ceph: fix an argument name
This commit fixes an argument of the CreateCrashCollectorSecret function as
it is expected to be the namespace of the cluster.

Signed-off-by: binoue <banji-inoue@cybozu.co.jp>
2020-06-21 20:27:34 +09:00
Sébastien Han aca541803b Merge pull request #5664 from leseb/ceph-object-user-external
ceph: add external support for object store user
2020-06-18 20:10:05 +02:00
Sébastien Han 5f74e493ef ceph: small user delete refactor
Do not return error code, interpret it directly, put the error as part
of the output on failures.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-18 18:49:03 +02:00
Sébastien Han 6eae9b0c5f Merge pull request #5668 from travisn/max-mon-id
ceph: Update maxMonId if incorrect
2020-06-18 17:22:07 +02:00
Sébastien Han 84d1e28c99 ceph: add external support for objectstoreuser
Now, the object store user is capable of creating s3 users on an
external Ceph cluster.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-18 16:34:01 +02:00
Sébastien Han 1e4a4b477a Merge pull request #5111 from leseb/lang-neutral-ceph
ceph: use octopus base image
2020-06-18 10:46:54 +02:00
Travis Nielsen 0e4c5e1d58 ceph: update maxMonId if incorrect
When the operator loads the mons and checks for a valid maxMonId
the check of the id against the currently running mons was outdated
from legacy mon ids. The check now has to parse the new id which is
just the letter instead of having a number from legacy mon ids.
Without this fix, the maxMonId would stay incorrect if it was somehow
corrupted.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-06-17 17:44:58 -06:00
Sébastien Han 68e62836c5 ceph: use newer octopus time format
radosgw-admin as of Octopus uses a different time format, it uses
"2006-01-02T15:04:05.999999999Z". It's close from RFC3339 but not quite
the same. This change is needed in order for the operator image (with a
Ceph Octopus based image) to perform radosgw-admin call correctly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-17 23:00:17 +02:00
Sébastien Han c7f255a0e8 ceph: add the ability to set any pool property
We can now explicitly set any property on a given pool by using the new
Property field in the CephBlockPool Spec.

Also, this fixes the case where both `CephBlockPool` and `CephCluster`
are created at the same time. When Rook creates the pool, the cluster is
still being bootstrapped and the global option
`osd_pool_default_pg_autoscale_mode` has not bee set yet. So the pool
gets created but its `pg_autoscale_mode` property is set to `warn`
instead of `on`.

Closes: https://github.com/rook/rook/issues/5608V
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-17 10:08:00 +02:00
Alexander Trost 1a072be677 core: fix info log for discovered devices
Fix the info log statement to log the discovered devices as their string
representation instead of pointers.
This changes the info log to only be the device names and the debug log
to be the whole disk struct as well.

Resolves #5625

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-06-16 09:37:33 +02:00
UMEZAWA Takeshi 6085ff3223 ceph: add schedulerName property to storageClassDeviceSet
Support schdulerName to use another scheduler for OSD pod placement.

Closes: https://github.com/rook/rook/issues/5536
Signed-off-by: UMEZAWA Takeshi <takeshi-umezawa@cybozu.co.jp>
Signed-off-by: Masayuki Ishii <masa213f@gmail.com>
2020-06-12 11:53:28 +09:00
Jared Watts 00ca9beb78 Merge pull request #5637 from aberfeldy/aberfeldy/master
nfs: changing the loglevel into INFO
2020-06-11 09:57:08 -07:00
Travis Nielsen 5a02de5621 ceph: metadata pvcs use a map instead of slice index
The volume sources for an OSD on PVC were relying on the ordering
of the volume sources slice. While this was working, it was causing
headaches and potential future developer error when being
interpreted incorrectly. The addition of the wal pvc device
would make the issue even more pronounced. Now each PVC used
for the OSD will be identified in a map by name such as data
 and metadata.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-06-11 08:58:53 -06:00
Sébastien Han 70cd4e0e4d Merge pull request #5509 from thotz/deleteuserorbucket
ceph: obc clean up resources incase of failure
2020-06-11 11:52:10 +02:00
Travis Nielsen 955dcb930e Merge pull request #5377 from alimaredia/wip-object-store-multisite
Foundation for Object Store Multisite CRs
2020-06-10 16:07:53 -06:00
Andreas Feldmann 05cfbf3dda nfs: changing the loglevel into INFO
Signed-off-by: Andreas Feldmann <an.feldmann@googlemail.com>
2020-06-10 18:23:26 +02:00
Jiffin Tony Thottan 96e3d1529e ceph: remove unlinking user in revoke api for obc
UnlinkUser works if bucket owner is obc user, otherwise it result in mismatch.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-06-10 18:30:21 +05:30
Jiffin Tony Thottan c0e23e0e16 ceph: clean up resources incase of failure
When obc creation fails in Grant() or Provision() the resources such as rgw user or bucket
created while provisioning need to remove.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-06-10 18:30:16 +05:30
Jiffin Tony Thottan 07f5aa7a19 ceph: remove deleteCephUser() and deleteBucket()
Replacing deleteCephUser() and deleteBucket() with deleteOBCResource()
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-06-10 18:30:12 +05:30
Jiffin Tony Thottan 9fccfb0e6f ceph: introduce new function for cleaning resources
Combining DeleteUser() and DeleteBucket() into single function
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-06-10 18:30:06 +05:30
Ali Maredia fc579f4520 ceph: initial commit for ceph rgw multisite resources
This commit contains CR implementations for:
CephObjectRealm
CephObjectZoneGroup
CephObjectZone

Also there are changes made to the objectstore
to add rgws in the object-store to zones and
zone groups in a multisite configuration and
the removal of the --default parameter for any
realms/zonegroups/zones that are created.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2020-06-09 16:28:53 -04:00
Sébastien Han 993af443a4 ceph: always turn on balancer on octopus
When running Octopus, we still need to turn on the balancer module. The
distinction is tricky, the module is "enabled" but it has to be "turned
on" and configured.

This was only working when the `pg_autoscaler` module was explicitly
listed in the CephCluster spec mgr section module section but not
automatically configured when running Octopus (the `pg_autoscaler`
module is already enabled).

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-09 15:42:15 +02:00
Sébastien Han 2749035315 ceph: do not activate crash module
The mgr crash module is always enabled so we don't need to run the
command again. It saves some orchestration time.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-09 15:37:04 +02:00
Travis Nielsen 282a2a3741 ceph: increase osd size when pvc template increases
When the PVC template increases in size for the storageClassDeviceSet
in the cluster CR, we need to increase the size of the PVC and restart
the OSD. The OSD is restarted by changing a variable on the pod spec
that indicates the desired size of the OSD.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-06-08 14:34:43 -06:00
Travis Nielsen daeb9b56b0 ceph: remove dead osd code
The completeProvisionSkipOSDStart function is no longer used.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-06-08 14:34:43 -06:00
Sébastien Han 887836586a Merge pull request #5595 from afflom/port-naming-work
Configurable Service Port Names
2020-06-08 12:57:01 +02:00
Alex Flom 9a4d535f09 ceph: hardcode service port and container port names
When integrating rook with istio, service port names need to be prefixed by their protocol.
Trying to fix this by removing static port names in favor of configurable names.

Closes: #5587

add protocol prefix to service port names, hardcoded as discussed. renamed container ports

Signed-off-by: Alex Flom <alexander.flom@gmail.com>
2020-06-06 21:58:23 -04:00