Commit Graph
2025 Commits
Author SHA1 Message Date
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
Sébastien Han be04b1ac33 Merge pull request #5607 from leseb/fix-5492
ceph: increase liveness probe start delay on OSD
2020-06-05 17:24:18 +02:00
Sébastien Han 8592caed58 Merge pull request #5606 from leseb/fix-5521
ceph: fix osd number detection on upgrade
2020-06-05 17:12:38 +02:00
Sébastien Han c8de7009de ceph: increase liveness probe start delay on OSD
When the cluster is loaded and we restart an OSD, it will need some time
to respond to socket calls, basically more to be ready.
Increasing the initialDelaySeconds of the liveness probe fixes that
issue. For OSD, it waits for 45 sec, where other daemons 10 sec.

Closes: https://github.com/rook/rook/issues/5492
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-05 15:53:49 +02:00
Sébastien Han 3c7a252862 ceph: fix osd number detection on upgrade
If the cluster has 3 OSDs, during the upgrade when the OSD restarts it
will temporarily disappear from the "ceph versions" list so we need a
more robust way to list the number of OSDs and always returns the total
number of OSDs.

Closes: https://github.com/rook/rook/issues/5521
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-05 15:20:46 +02:00
Sébastien Han 5520ee35bb ceph: check if ok-to-stop even on failure
Even if we cannot determine wheter all the OSDs are running on the host,
we still need to perform the ok-to-stop check. It is far more common to
have more than 3 OSDs anyways.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-05 15:06:35 +02:00
Madhu Rajanna 09ccf55453 ceph: update cephcsi to v2.1.2
Cephcsi v2.1.2 is released with bug fixes,
refer https://github.com/ceph/ceph-csi/releases/tag/v2.1.2
for release details.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-06-05 14:43:05 +05:30
Travis Nielsen 872e6ff44a Merge pull request #5585 from ashangit/podAntiAffinity_rgw
ceph: fallback podAntiAffinity to preferredDuringSchedulingIgnoredDuringExecution on rgw
2020-06-04 13:28:14 -06:00
Sébastien Han bfa3b4daf4 ceph: do not use external node IP for mon endpoint
When the cluster is using HostNetworking, Rook was either picking up the
external or internal IP of the node. This resulted in mon endpoints have
public IP addresses. Those IP are not reachable from within the cluster
so OSD/CSI couldn't access the monitors from the configmap endpoint.

Also, exposing the cluster on a public network does not seem realistic,
so sticky with private/internal IP addresses is better.

Closes: https://github.com/rook/rook/issues/5495
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-04 14:12:45 +02:00
n.fraison c8df6c0faf ceph: add preferred pod anti-affinity on rgw if not host network
If host networking is not enabled add preferred pod anti-affinity on rgw pods to
improve spread of them

Signed-off-by: n.fraison <n.fraison@criteo.com>
2020-06-04 13:34:30 +02:00
Sébastien Han fc648970c4 Merge pull request #5511 from thotz/existingbucketsuserpolicy
obc: Do not delete user for retain policy if it is owner
2020-06-03 14:11:57 +02:00
Sébastien Han 5a36f335c0 Merge pull request #5276 from subhamkrai/osd-on-pvc
ceph: Updated initializeBlockPVC method and added unit tests.
2020-06-03 11:53:25 +02:00