Commit Graph
7961 Commits
Author SHA1 Message Date
Blaine Gardner 825f1e3eb2 ceph: support device names with special chars
Pass desired devices to the OSD provisioning container by
JSON-marshalling/-unmarshalling a disk ID with StorageConfig settings.
This will allow disks to be specified that contain special characters.
Notably, this will support /dev/disk/by-path/pci-HHHH:HH:HH.H devices
that were unsupported previously due to the format which separated
devices from params with colons (:).

Fixes #5056
Fixes #5535

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-07-17 09:44:26 -06:00
Sébastien Han 0e684460bd Merge pull request #5642 from leseb/monitoring-endpoint
ceph: add external prometheus endpoint
2020-07-17 16:20:51 +02:00
Sébastien Han 17f8ac614d Merge pull request #5834 from leseb/disable-orch-module
ceph: do not enable the 'rook' module by default
2020-07-17 16:06:29 +02:00
Sébastien Han 94c8546d31 ceph: fix some mgr test
Fail if the orch status never gets ready.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-17 14:03:58 +02:00
Anmol Sachan 6bf3aa9a9a ceph: added prometheus rule file for alerting on external cluster
Signed-off-by: Anmol Sachan <anmol13694@gmail.com>
2020-07-17 11:29:51 +02:00
Sébastien Han 34ccb84aa3 ceph: add external prometheus endpoint
We can now connect an external prometheus exporter to Rook to collect
metrics and generate alerts from Prometheus.
Just enable this in the CephCluster CR:

```
spec:
  external:
    enable: true
   monitoring:
    enabled: true
    rulesNamespace: rook-ceph
    externalMgrEndpoints:
    - ip: 192.168.39.182
```

Closes: https://github.com/rook/rook/issues/5516
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-17 11:29:48 +02:00
Sébastien Han 90787daef7 ceph: do not enable the 'rook' module by default
We currently don't use the module, so let's speed up the bootstrap
progress as well as the reconcile by not always enabling it.
It can always be enabled via the spec mgr section.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-17 10:37:28 +02:00
Sébastien Han 1bdb369cb4 ceph: do not enable orchestrator_cli
orchestrator_cli is always-on so we don't need to do anything.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-17 10:36:59 +02:00
Sébastien Han 88434ceb51 Merge pull request #5746 from travisn/ceph-cred-refactor
ceph: Refactor clusterInfo passed by the operator throughout the controllers
2020-07-17 10:34:06 +02:00
Travis Nielsen 76028f66ab ceph: load external creds from deprecated secret
The external creds have been loaded from their own key. For
backward compatibility we need to check that key if the
new key is not found.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-16 15:54:54 -06:00
Travis Nielsen 30e0cb53d2 ceph: debug logging for the rgw health check
Health checks should log to debug rather than info
or else the operator log fills with messages as the health
checks trigger periodically.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-16 15:54:54 -06:00
Travis Nielsen e74c7eaef8 ceph: refactor context and clusterInfo passed to the ceph commands
To provide more context for executing commands in a ceph cluster,
the full clusterInfo is now passed to the ceph execution commands.
All information about the cluster will now be available throughout
all the areas of the operator. The namespace, ceph credentials,
mon endpoints, and other info is a core part of that cluster info.

Arguments passed through the controllers are also simplified for
mons, mgr, osds, and other daemons where the parameters had
become too complex.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-16 15:54:54 -06:00
Travis Nielsen 4681f9e73d ceph: consolidate ceph config and client packages
The ceph config and client packages are conceptually the same.
To avoid circular dependencies in some cases, we simplify by combining
the packages into the client package.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-16 15:54:43 -06:00
Travis Nielsen 631b13b906 ceph: refactor creds used by operator
The operator should only connect to ceph with a single set of creds.
In a converged cluster this will be the admin creds and in an external
cluster it will be lower-privileged creds. Independent clusters were
implemented with a separate set of creds. To simplify the code these
are now merged to a single set.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-16 15:54:42 -06:00
Sébastien Han c4f89361ee Merge pull request #5813 from thotz/updatingdispnamecepbobjectuser
ceph: display name updation for existing ceph object store users
2020-07-16 17:49:11 +02:00
Jiffin Tony Thottan e37a6ee122 ceph: display name updation for existing ceph object stores users
Closes: #5713
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-07-16 16:14:34 +05:30
Sébastien Han 0f33bc2b62 Merge pull request #5820 from cybozu-go/detect-version-placement
ceph: update detect-version's placement to ignore mon's PodAntiAffinity
2020-07-16 11:49:43 +02:00
Hiroshi Muraoka e2b1a2230d ceph: ignore PodAntiAffinity for detect-version placement
When a PodAntiAffinity is set to mon, detect-version may not be scheduled because detect-version has the same PodAntiAffinity with mon.
This commit fixes this issue.

Closes #5810

Signed-off-by: Hiroshi Muraoka <h.muraoka714@gmail.com>
2020-07-16 04:27:06 +00:00
Travis Nielsen 2514699ccd Merge pull request #5817 from travisn/enable-mgr-test
Re-enable the Ceph Mgr integration test that runs against Ceph master
2020-07-15 15:09:38 -06:00
Sébastien Han e669e903b3 Merge pull request #5828 from leseb/fix-reconcile
ceph: fix CRs not reconciling on updates
2020-07-15 23:08:10 +02:00
Sébastien Han d047e8bf8a Merge pull request #5833 from leseb/http-check-external
ceph: add http dial to verify external endpoint
2020-07-15 22:41:13 +02:00
Sébastien Han 83e1ff102d ceph: add http dial to verify external endpoint
If there is a typo in the rgw endpoint, then the user will be notified
that the gateway is not accessible or does not return the 200 HTTP code.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-15 22:15:42 +02:00
Sébastien Han 536310de1a Merge pull request #5739 from subhamkrai/report-secret
ceph: report secret in cephobjectstoreuser status field
2020-07-15 17:21:57 +02:00
Sébastien Han 9b900f17c7 Merge pull request #5819 from vasukulkarni/wip-hostname-toolbox
ceph: Fix toolbox when mon hosts can contain numbers and hype
2020-07-15 15:16:32 +02:00
Sébastien Han b6939c100d ceph: add missing header
The Rook header was missing.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-15 12:30:37 +02:00
Sébastien Han 56954d5cc8 ceph: fix CRs not reconciling on updates
Most of the CRs expect CephCluster and CephBlockPool were not
reconciling on updates. The predicate must return true on CR diff.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-15 11:15:33 +02:00
subhamkrai 3e33fc55a3 ceph: report secret in cephobjectstoreuser status field
adding method to generate secret name in
cephobjectstoreuser status field in order
to programmatically retrieve the secret name
generated by the cephobjectstoreuser crd.
Also added unit test for the method.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-07-15 14:27:23 +05:30
Travis Nielsen 4a72875089 Merge pull request #5824 from travisn/no-log-bucket-policy-output
ceph: Skip logging output of bucket policy change
2020-07-14 21:41:05 -06:00
Blaine Gardner f2bc23c33e Merge pull request #4916 from SUSE/drive-groups
Ceph: provision OSDs using Drive Groups
2020-07-14 18:08:45 -06:00
Vasu Kulkarni 33bd58e072 ceph: fix mon endpoints split when using external ceph hosts
When hostname has hypen and/or numbers, the mon_endpoints is incorrectly
split and can point to invalid monitor names inside toolbox, Add fix to
split the hostname/ip that can include hypen, underscore or numbers.

Signed-off-by: Vasu Kulkarni <vasu@redhat.com>

Fixes

Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
2020-07-14 11:21:10 -07:00
Travis Nielsen 4b45048557 ceph: skip logging output of bucket policy change
The output of the bucket policy change should not be logged in case
there is sensitive information in the output.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-14 11:50:16 -06:00
Travis Nielsen 3d3986ee02 Merge pull request #5785 from prksu/fix-nfs-on-openshift
nfs: fix nfs issue on openshift
2020-07-14 11:06:47 -06:00
Blaine Gardner 7117fc12b7 ceph: osd: add drive groups spec to cluster CR
Add the ability to provision Ceph OSDs with Drive Groups.
This adds Drive Groups to the CephCluster CRD, and it sets code
in place for propagating this config to the OSD provisioning pod.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-07-14 09:43:03 -06:00
Travis Nielsen 215758bfea Merge pull request #5795 from cybozu-go/ceph-fix-the-wrong-description-of-mon-placement
ceph: remove an outdated document of mon placement
2020-07-14 07:30:43 -06:00
Ahmad Nurus S 1659687d37 nfs: fix nfs issue on openshift
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-07-14 18:11:39 +07:00
Satoru Takeuchi 63d077ffde ceph: remove an outdated document of mon placement
Although the document describes we can't set Pod{,Anti}Affinity
to mon's placement, the current implementation permits to do so.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-07-14 07:42:16 +00:00
Travis Nielsen 7dcd64f1a2 Merge pull request #5761 from vbnrh/rook-ac-controller-runtime
ceph: implement controller-runtime for admission controllers
2020-07-13 16:31:23 -06:00
Travis Nielsen cb8111c042 ci: check for official build string properly
The version of Jenkins has changed such that setting the official build env
var is no longer comparing correctly. Now we will only assume the env
var is set by the PR to false, therefore the tests need to compare
against false instead of true.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-13 13:53:57 -06:00
Travis Nielsen c375ef487f ceph: reenable the cephmgr test against Ceph master
The OSD creation has been fixed in Ceph master, therefore we can
reenable the Ceph mgr test that runs against master.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-13 13:51:31 -06:00
Vineet Badrinath 98874ccf4d ceph: implement controller-runtime for admission controllers
moves the admission-controller server to use controller-runtime library for better support, maintainibility of code.

Signed-off-by: Vineet Badrinath <vbadrina@redhat.com>
2020-07-14 01:10:03 +05:30
Travis Nielsen d4c7d0278f Merge pull request #5789 from leseb/liveness-disable
ceph: configurable status checks and livenessprobe
2020-07-10 13:38:42 -06:00
Sébastien Han ccb52b84e6 ceph: configurable status checks and livenessprobe
This commit allows us to configure status check for each daemon:

* "mon": health check on the ceph monitors (quorum)
* "osd": health check on the ceph osds
* "status": ceph health status check

Each check is controlled by the following settings:

* disabled: whether to disable the check (default: false)
* internal: interval to run the check
* timeout: only valid for mons, is the timeout for unresponsive mon
before failling over.

Example to disable the status health check:

```yaml
healthCheck:
  daemonHealth:
    status:
      disabled: true
```

As part of that, pod's livenessprobe can now be configured via the
following settings:

* disabled: whether to enable or not
* probe: override the current probe in place by a new one

```yaml
healthCheck:
  livenessProbe:
    mon:
      disabled: true
```

Closes: https://github.com/rook/rook/issues/5772
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-10 19:21:59 +02:00
Blaine Gardner dc0e52bca4 Merge pull request #5808 from SUSE/manifest-octopus-support-note
ceph: fix manifest ceph version support comment
2020-07-10 10:49:13 -06:00
Blaine Gardner b8aea86ced ceph: fix manifest ceph version support comment
Adjust the comment for `cephVersion:allowUnsupported` in the
`cluster.yaml` manifest to correctly document that Nautilus and
Octopus are supported (not Mimic and Nautilus).

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-07-10 10:30:46 -06:00
Sébastien Han d097343001 Merge pull request #5774 from leseb/object-user-endpoint
ceph: add s3 endpoint to the rgw user cr
2020-07-10 17:22:22 +02:00
Sébastien Han 07c7dd457f ceph: expose endpoint in the CephObjectStoreUser
Now, when an S3 user gets created, Rook will add the S3 endpoint to the
Secret along with the credentials.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-10 15:59:47 +02:00
Sébastien Han 4d0856c297 Merge pull request #5762 from thotz/cleanupobjectcephusers
ceph: check for ceph object user cleanup
2020-07-10 14:56:57 +02:00
Sébastien Han 5c5008e27c ceph: add s3 endpoint to CephObjectStore CRD
For the CephObjectStore, the Status field of the CR has a new property
called "info", which contains a couple of information about the CR.
The first new addition is the endpoint of the object store.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-10 12:06:25 +02:00
Blaine Gardner f2d8524ccd Merge pull request #5803 from SUSE/doc-network-mode-change-not-allowed
docs: ceph: add no support for changing networking
2020-07-09 12:52:01 -06:00
Blaine Gardner 3678bd791a docs: ceph: add no support for changing networking
Clarify in the docs that changing networking modes after a Cpeh cluster
has been deployed is not supported and can result in a nonfunctional
cluster.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-07-09 12:17:27 -06:00