Commit Graph
2620 Commits
Author SHA1 Message Date
Sébastien Han 8fb6fdff94 Merge pull request #7370 from leseb/fix-7359
ceph: do not duplicate osd info
2021-03-09 15:54:16 +01:00
Sébastien Han 504e9aa806 ceph: do not duplicate osd info
When c-v runs after the end of the prepare sequence, it will look for
lvm and raw-based OSDs. The raw mode detects LVM OSDs so we must trim
the list of OSD, only to report the LVM ones if their ID exists.

Closes: https://github.com/rook/rook/issues/7359
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-09 15:17:32 +01:00
Sébastien Han 2a035b2f99 Merge pull request #7333 from subhamkrai/port-check
ceph: webhook check if one of port or securePort are non-zero
2021-03-09 09:33:11 +01:00
subhamkrai 40a99a20ff ceph: webhook check if one of port or securePort are non-zero
this commit adds new crd to admission webhooks to check
if one of the port or securePort are set to non-zero
value in objectstore crd.

If both are set to 0 in crd we'll see error like
```
Error from server (invalid create: either of port or securePort
fields should be not be zero): error when creating "object-test.yaml":
admission webhook
"cephobjectstore-wh-rook-ceph-admission-controller-rook-ceph.rook.io"
denied the request: invalid create: either of port or securePort fields
should be not be zero.
```

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-03 21:22:04 +05:30
Sébastien Han 3dde2609fa ceph: add raw mode for non-pvc osd
For simple OSD scenario that don't require the following:

* an encrypted osd
* an osd with a backing device
* multiple osd on the same block device

The OSD will be prepared using the ceph-volume raw mode which does
not use LVM on non-pvc case.

Closes: https://github.com/rook/rook/issues/4768
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-03 14:11:26 +01:00
Sébastien Han 06810b9700 ceph: fix iteration
block if not defined was used with osdInfo.Device so not empty anymore
in the loop, which means it will have the same value for all OSDs in the
loop.
This is only called when running on PVC, where a single device is
present so the loop has a single iteration, so not a big issue.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-03 14:06:19 +01:00
Sébastien Han c28fdfa371 Merge pull request #7307 from leseb/ceph-multi-fs
ceph: rework multiple filesystem support
2021-03-03 07:57:40 +01:00
Travis Nielsen 15d0537cec ceph: only raise conditions that represent current state
The conditions on the cephcluster CR were being set to false
when not in progress, which is misleading to the purpose of
conditions. The conditions will now always represent current
state of the cluster. Transient conditions that show progress of
a reconcile will be removed from the status.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-03-02 14:15:47 -07:00
Travis Nielsen ddedecabac Merge pull request #7334 from thotz/livenessprobergwsslenabled
ceph: handle ssl cases for RGW's livenessprobe
2021-03-02 11:42:06 -07:00
Sébastien Han 8dfa99e01d ceph: rework multiple filesystem support
The upcoming Rook release 1.6 will support Ceph Pacific which introduces
stable support for multiple Ceph Filesystems in the same cluster. So we
now allow the creation of multiple Filesystem if the release is Pacific.

Also, we remove the Operator config flag which was not necessary.

Here I have 2 filesystems:

```
[root@rook-ceph-tools-6b4889fdfd-vncck /]# ceph fs ls
name: myfs, metadata pool: myfs-metadata, data pools: [myfs-data0 ]
name: myfs2, metadata pool: myfs2-metadata, data pools: [myfs2-data0 ]
```

```
  cluster:
    id:     cc747950-589a-4862-bad2-ff7de1217b1a
    health: HEALTH_WARN
            mons a,b,c are low on available space
            6 pool(s) have no replicas configured

  services:
    mon: 3 daemons, quorum a,b,c (age 2d)
    mgr: a(active, since 2d)
    mds: myfs:1 myfs2:1 {myfs2:0=myfs2-b=up:active,myfs:0=myfs-b=up:active} 2 up:standby-replay
    osd: 3 osds: 3 up (since 2m), 3 in (since 6d)

  data:
    pools:   6 pools, 717 pgs
    objects: 44 objects, 4.2 KiB
    usage:   46 MiB used, 90 GiB / 90 GiB avail
    pgs:     717 active+clean

  io:
    client:   1.8 KiB/s rd, 4 op/s rd, 0 op/s wr

  progress:
    Global Recovery Event (45s)
      [===========================.]
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-02 18:27:04 +01:00
Sébastien Han 0534b5a180 ceph: expose vault warnings better
If there is a warning coming from the Vault server we must catch it and
exit immediately to reflect it if no key was retrieved.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-02 10:49:19 +01:00
Sébastien Han a134d1df6e Merge pull request #7336 from leseb/revert-vault-backend
ceph: revert kms VAULT_KV_VERS to VAULT_BACKEND
2021-03-02 10:44:43 +01:00
Jiffin Tony Thottan 785aa5a322 ceph: handle ssl cases for RGW's livenessprobe
The livenessprobe for swift/health always check with RGW internal port if host network disabled,
but won't work if only secure port is configured

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-03-02 14:39:57 +05:30
Sébastien Han e4c3a4cef7 ceph: revert kms VAULT_KV_VERS to VAULT_BACKEND
The vault env variable VAULT_BACKEND is read by the secret library so we
must not change it. This is reverting
ee6a03dfb8 with a few extra fixes for the
rgw code.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-02 10:08:39 +01:00
Umanga Chapagain 9d42eb1642 ceph: unmanage labels of monitoring resources
Do not reconcile ServiceMonitor/PrometheusRule on label updates.
This allows users to add custom labels which can be used by
custom Prometheus instances for monitoring.

Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2021-03-01 14:21:48 +05:30
Blaine Gardner efa7d66d45 ceph: remove driveGroup support
Remove features and design that supports adding OSDs to Ceph clusters
via `spec:driveGroups`. Update the Ceph upgrade doc that informs users
who currently use Drive Groups (we believe there are none of these
users) how to migrate to using the `spec:storage` config.

Resolves https://github.com/rook/rook/issues/7275

Revert "ceph: fix drive group deployment failure"
This reverts commit 76f1d9944e.

Revert "ceph: osd: add drive groups spec to cluster CR"
This reverts commit 7117fc12b7.

Revert "design: ceph orchestrator module add/remove OSDs"
This reverts commit 178187d035.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-02-25 17:08:47 -07:00
Blaine Gardner bc2721c19f Merge pull request #7311 from BlaineEXE/use-go-test-V-flag
ceph: change osd on pvc unit test to use t.Log()
2021-02-25 14:16:53 -07:00
Travis Nielsen ade67eb7ce Merge pull request #7302 from BlaineEXE/update-to-ceph-15.2.9
ceph: update build and examples to use v15.2.9
2021-02-25 13:56:27 -07:00
Blaine Gardner d5983e8d4b ceph: change osd on pvc unit test to use t.Log()
Change the TestOSDsOnPVC unit test to use t.Log()/t.Logf() to avoid
having a special infof() function that was unnecessary since our unit
tests run with `go test -v` where the `-v` flag interleaves t.Log()
output.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-02-25 11:52:00 -07:00
Blaine Gardner 82941ff8fa Merge pull request #7304 from BlaineEXE/fix-flaky-pvc-unit-test
ceph: fix flaky OSD on PVC unit test
2021-02-25 11:25:29 -07:00
Travis Nielsen 65c410ee13 Merge pull request #7266 from rohan47/clean_terminating_pods
ceph: removed individual force delete pod code for mons and osds
2021-02-25 10:10:54 -07:00
Sébastien Han 447f9c97ff Merge pull request #7299 from jshen28/remove-generatekeyring-for-osd
ceph: remove unnecessary generate key for osd
2021-02-25 14:51:35 +01:00
shenjiatong fb33d87d33 ceph: remove generateKeyring for osd
After adopting `ceph-volume`, secret key for
user osd.x will be generated by `ceph-volume` and
thus method `generateKeyring` is not necessary
anymore.

Executing ceph command takes
extra half of second to complete, executing it
in serial is rather expensive, remove it for better
performance.

Signed-off-by: shenjiatong <yshxxsjt715@gmail.com>
2021-02-25 08:21:08 +08:00
Blaine Gardner 98466d4706 ceph: fix flaky OSD on PVC unit test
This was a race condition where the test would sometimes finish before a
deferred watcher.Stop() command was called and sometimes would not.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-02-24 15:43:21 -07:00
Blaine Gardner 818342cbfb ceph: update build and examples to use v15.2.9
There are still references to v15.2.7 in integration tests to allow
testing OSDs on partitions.

The newest dated Ceph image is ceph/ceph:v15.2.9-20210224

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-02-24 15:15:26 -07:00
Sébastien Han 4b8ec15b69 ceph: do not use curl ca-cert for signed certificates
cURL's ca-cert and Golang TLS config for ca-certs have a different
meaning, it seems that the Golang implementation will always lookup the
local certs first and then proceeds with the specificed cert, if the
system's certs works it will never go to the specificied certificate.
cURL however, does the opposite by strictly checking the specified cert.
If the certificate is signed we don't need to force a specific
certificate, thus by using capath instead we let cURL determine what's
best to validate against.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-24 11:49:56 +01:00
Sébastien Han e6b44cc386 Merge pull request #7286 from travisn/codegen-update
ceph: Codegen update for pool quotas
2021-02-23 17:44:02 +01:00
Sébastien Han dad4e4effa Merge pull request #7292 from leseb/bz-1931839
ceph: show error even in silent curl
2021-02-23 17:40:10 +01:00
Sébastien Han 069ff22d53 ceph: show error even in silent curl
The --silent option will remove the progress bar of the curl but also
silence any errors of stderr, so adding --show-error will display the
error even if --silent is used.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-23 17:15:31 +01:00
Sébastien Han 91343f4fdd Merge pull request #7283 from leseb/rm-index-cephfs-mirror
ceph: misc improvement for the ceph-fs-mirror implementation
2021-02-23 17:06:29 +01:00
rohan47 3e6d37cca1 ceph: added additional labels for pod filtering
Added some additional labels for pod filtering.
added missing field selector for node.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2021-02-23 20:49:23 +05:30
rohan47 79ff3218bf ceph: removed code for force delete mon and osd pods when stuck
removed the code for force delete pods when stuck in terminating state
for mons and osds as there is common code to delete pods for stuck components

Signed-off-by: rohan47 <rohgupta@redhat.com>
2021-02-23 20:49:23 +05:30
Sébastien Han 6bc028be2a ceph: pass correct fs-mirror type for upgrade check
We were passing rbd-mirorr where it's fs-mirror...

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-23 10:49:58 +01:00
Sébastien Han 8e8afe7a75 ceph: do not check ok-to-stop fs-mirror
The fs-mirror has no "ok-to-stop" command so let's skip it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-23 10:49:13 +01:00
Sébastien Han beb543b7bc ceph: fix fs-mirror collector logrotate
The sed from the log-collector pod was running incorrectly and the
rotation was not happening.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-23 10:45:53 +01:00
Sébastien Han 69b04057f1 ceph: do not use index for ceph-fs-mirror
When deploying the ceph-fs-mirror daemon we don't need to name the
deployment like "rook-ceph-fs-mirror-a", we can simply go with
"rook-ceph-fs-mirror". Today, in Pacific, the daemon only supports a
single replica. In the future, the Ceph Quincy release should support
mulitiple concurrent daemons, at this point Rook will introduce a
"count" field in the CephFilesystemMirror CRD specification. Internally,
this field will map with the "replica" value of the Deployment.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-23 10:45:45 +01:00
Travis Nielsen 9d15c104cc ceph: codegen update for pool quotas
The pool quotas were added in #7264, however the codegen CI
action did not catch that an update was needed until it
was backported.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-22 11:14:11 -07:00
Sébastien Han 0300111f73 ceph: fail if subfailure domains are identical
Both cannot be identical otherwise this will create placement issues.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-22 17:24:24 +01:00
Sébastien Han 288b0f6439 ceph: silence harmless error
Let's skip the reconcile and back-off if the operator is not ready.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-22 14:39:32 +01:00
Satoru Takeuchi c628a996c8 ceph: fix SIGSEGV when failing to get object store user
We shouldn't use `user.userID` if `GetUser()` failed.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-02-22 11:24:59 +00:00
Travis Nielsen 7404de7b38 Merge pull request #7264 from fritchie/pool-quotas
ceph: add ability to set pool quotas
2021-02-19 12:53:41 -07:00
Frank Ritchie a0488dac73 ceph: add ability to set pool quotas
This will allow setting ceph pool quotas in bytes and/or objects.

Ceph documentation: https://docs.ceph.com/en/latest/rados/operations/pools/#set-pool-quotas

Signed-off-by: Frank Ritchie <12985912+fritchie@users.noreply.github.com>
2021-02-19 13:49:25 -05:00
Travis Nielsen 291bf9e061 ceph: enforce portable osds in same topology as osd prepare job
The osd prepare job detects the failure domain for the OSD by querying
the node topology labels. This topology is then assigned to the OSD
daemon in the CRUSH map. Previously, the affinity was required to be
set in the cluster CR, but it was very difficult to get right. Now the
operator will enforce the correct topology label on the OSD daemon
nodeAffinity by setting the label of the lowest topology in the hierarcy.

For example, if there are region, zone, and rack labels, the rack label
would be used to set the node affinity for the OSD daemon. If an
OSD prepare job is run in rack1, the corresponding OSD daemon will
have node affinity to rack1 to ensure the same topology. Previously,
the OSD could have ended up in rack2 unless the storageClassDeviceSet
placement was very carefully crafted.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-18 12:49:37 -07:00
Sébastien Han f8ce9df5e3 Merge pull request #7001 from crombus/master
ceph: Add ceph archive cmd in osd removal
2021-02-18 17:09:52 +01:00
crombus 76ed166e86 ceph: add ceph archive cmd in osd removal
Add ceph archive cmd in osd removal for
Silencing the warning when osd is removed.

Signed-off-by: crombus <pkundra@redhat.com>
2021-02-18 21:08:16 +05:30
Sébastien Han 86de4f6fb3 Merge pull request #7238 from varshar16/rados-namespace-optional
ceph: rados pool namespace is optional for nfs deployments
2021-02-17 11:40:06 +01:00
subhamkrai b20a7f13ee ceph: update placement in osd with osdProps.placement
this commit update `osdProps.placement` instead
of `osdProps.getPreparePlacement()` in the osd.go
this was the copy paste issues coming from other pr.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-02-17 07:35:18 +05:30
Blaine Gardner 57f1ff7136 Merge pull request #7234 from travisn/cleanup-tolerations
ceph: Add tolerations for all daemons to the cleanup job
2021-02-16 17:49:26 -07:00
Travis Nielsen dfc24ddd24 Merge pull request #7240 from leseb/fix-vault-key-override
ceph: do not override existing keys
2021-02-16 16:09:34 -07:00
Sébastien Han 9a604640ac ceph: do not override existing keys
If the cluster was expanded we would iterate over the entire list of
OSDs again, create a new key and override in Vault... The Secret store
is not impacted since we have a handler for "already exist".

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-16 19:20:20 +01:00