Commit Graph
6296 Commits
Author SHA1 Message Date
Sébastien Han 7c928f4196 ceph: return an error if PVC is not clean
With 5f57b6fd3a, we introduced a
regression in the validation code.
If the OSD PV comes from another cluster, GetCephVolumeRawOSDs must
return an error.
The prepare job will crash loop but at least with a useful and
comprehensive message.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-09 11:28:08 +01:00
Sébastien Han 5966f09376 Merge pull request #7160 from leseb/rm-crash-pod-when-ceph-pods-are-gone
ceph: remove crash collector if ceph pod moved
2021-02-09 10:08:16 +01:00
Sébastien Han b9e91b600d ceph: remove crash collector if ceph pod moved
If Ceph pods were evicted onto other nodes, there is no reason for the
crash collector to remain on those nodes. So let's remove it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-09 09:48:16 +01:00
Travis Nielsen 19627a7498 Merge pull request #7179 from varshar16/fs-not-reqd-nfs-deployments
ceph: filesystem is not required for nfs server deployment
2021-02-08 12:15:24 -07:00
Varsha Rao baa79cf4c3 ceph: filesystem is not required for nfs server deployment
nfs server requires valid pool for storing nfs-ganesha recovery objects. Only
when filesystem exports are created, filesystem should be configured first.

Signed-off-by: Varsha Rao <varao@redhat.com>
2021-02-08 20:13:14 +05:30
Sébastien Han 09b72e4c4a Merge pull request #7169 from travisn/remove-yugabytedb
build: Remove YugabyteDB operator
2021-02-08 09:08:37 +01:00
Travis Nielsen 043f947321 build: remove yugabytedb operator
The YugabyteDB team has decided to move support of their operator
to a new repo at https://github.com/yugabyte/yugabyte-operator.
The operator in Rook is no longer needed. Further usage of
the YugabyteDB operator is recommended at the new location.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-06 00:03:41 -07:00
Travis Nielsen a1b3682d9d Merge pull request #7162 from onedr0p/patch-1
ceph: add helm resource-policy keep annotation for CRDs in helm chart
2021-02-04 12:48:47 -07:00
Travis Nielsen 7282505c48 Merge pull request #7152 from travisn/ceph-dashboard-init
ceph: Remove obsolete init containers from mgr that were used to init the binding addresses
2021-02-04 11:05:29 -07:00
ᗪєνιη ᗷυнʟ 64a0fbc91c ceph: set helm resource policy keep annotation on CRDs in Helm chart
When uninstalling the helm chart do not remove the CRDs, instead
document the way to remove the CRDs after the user uninstalls
the chart.

Closes: https://github.com/rook/rook/issues/6617
Signed-off-by: Devin Buhl <devin.kray@gmail.com>
2021-02-04 12:26:46 -05:00
Travis Nielsen f1b37db67d Merge pull request #7158 from varshar16/fix-dashboard-doc-url
ceph: update dashboard doc url to latest
2021-02-04 10:00:02 -07:00
Travis Nielsen 7dc36e0f46 ceph: use localhost for the mgr endpoint binding instead of podIP
The pod IP address is no longer needed for port binding for the dashboard
and prometheus endpoints anymore in the mgr modules. The default binding
to localhost will be sufficient. This will allow the endpoints to be more
reliable in some environments where today the podIP is not working.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-04 08:44:05 -07:00
Travis Nielsen 3399d2fb9c Merge pull request #7151 from travisn/mgr-bind-local
ceph: Bind mgr modules to all interfaces instead of pod ip
2021-02-04 07:50:34 -07:00
Travis Nielsen b3129fd5cf ceph: bind mgr modules to all interfaces instead of pod ip
Binding the dashboard and prometheus to all interfaces instead of the pod ip
will ensure that they are listening properly. Binding to the pod ip was only
a short term solution that was intended to be removed with Nautilus, which
is already Rook's min supported version.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-04 07:08:59 -07:00
Varsha Rao 380f87b0b4 ceph: update dashboard doc url to latest
ceph dashboard doc url in the doc is of older version. This patch updates it
with the latest doc url.

Signed-off-by: Varsha Rao <varao@redhat.com>
2021-02-04 18:45:37 +05:30
Sébastien Han 3a2e618ec4 Merge pull request #7112 from sp98/check-orchestration-cancellation
ceph: check for orchestration cancellation while waiting for all OSDs  to start.
2021-02-04 11:36:04 +01:00
Santosh Pillai f5808185e0 ceph: check for orchestration cancellation while OSDs are pending
completeOSDsForAllNodes() method waits for 20 minutes for all the OSDs to start on all the nodes. This PR checks if
cluster deletion request was sent while waiting for OSDs to start. If yes, then completeOSDsForAllNodes() method will returnwithout waiting for 20 minutes.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-02-04 14:49:37 +05:30
Sébastien Han bdb7b1eb05 Merge pull request #7123 from subhamkrai/intermittent-test-failures
ceph: Intermittent integration test failures due to admission controller
2021-02-04 09:48:21 +01:00
subhamkrai 9be70baf5f ci: intermittent integration test failures due to admission controller
integration test was failing frequently due to some
intermittent failures.
```
Error from server (InternalError): error when creating
"STDIN": Internal error occurred: failed calling webhook.
```
(This error is not coming from us most probably)
This is kind of workaround so we get green build
as we still don't know the root cause.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-02-04 09:42:29 +05:30
Travis Nielsen fd8bab8b62 Merge pull request #7128 from sp98/skip-pdb-reconcile
ceph: skip reconcile on PDBs are created, deleted and when on different namespace
2021-02-03 12:09:07 -07:00
Santosh Pillai b780e5b5c0 ceph: skip pdb reconcile on create and delete events
This PR makes create and delete events on pdb a no-op. Update event only triggers reconcile if its the main OSD pdb and allowed disruptions is 0.
This prevents controller to reconcile on pdb events namespaces outside rook ceph.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-02-03 22:43:20 +05:30
Travis Nielsen 2e8482dada Merge pull request #7056 from leseb/silence-hamless-errors
ceph: silence harmless errors when the operator is not initialized
2021-02-03 09:59:24 -07:00
Sébastien Han 27c63c587a Merge pull request #7147 from Madhu-1/fix-csi-enc
ceph: Add new cmd argument and RBAC for csi rbd provisioner
2021-02-03 17:35:32 +01:00
Sébastien Han 2d75135579 ceph: embed the buffer in the error
Somehow the combined output does not contain the stderr in the errorn
only in the buffer.
For example:

err = "error exit 1"
buf = "Error EBUSY: not enough monitors would be available () after stopping mons [a]"

So we now embed the buf in the error so that the caller does not need to
print the buffer as well as the error.
Also, the caller can more easily decide to ignore the error by
instropecting the string.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-03 17:28:47 +01:00
Sébastien Han b189e91bfe ceph: use errors pkg instead of fmt
This one was a leftover.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-03 17:28:47 +01:00
Sébastien Han 8d033efb5a ceph: silence harmless errors
If the ceph cli outputs an error with "error calling conf_read_file"
this means that the operator has not written its ceph configuration
file. Thus ceph cli commands will fail, so we can just ignore that since
the operator will soon write this file in its initialization sequence.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-03 17:28:44 +01:00
Madhu Rajanna 81248f1dce ceph: add configmap get RBAC for rbd provisioner
rbd provisioner need to access the configmap
in different namespaces.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-02-03 21:28:00 +05:30
Madhu Rajanna 3cf9f7147e ceph: pass extra-create-metadata to csi-provisioner
when extra-create-metadata is passed to csi-provisioner
it passes few information like namespace name,pvc
name to the cephcsi driver which is required for
rbd encryption.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-02-03 21:27:37 +05:30
Sébastien Han 2bc5fbf84f Merge pull request #7142 from leseb/unit-test-ouside-gopath
ceph: do not force go path in unit tests
2021-02-03 09:11:15 +01:00
Sébastien Han dea3273eaf ceph: do not force go path in unit tests
Do not force unit tests to be run while the rook repo is in the GOPATH.
Now that Rook uses go modules, this is no longer necessary. Allow this
by creating a helper function that unit tests can use that return the
on-host path to the `rook` project root.

Followup of https://github.com/rook/rook/pull/7119/commits/15a487cd5aa5d4dc59bc15ef610cb182257d9287

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-03 08:56:41 +01:00
Travis Nielsen 39059a32a2 Merge pull request #7133 from travisn/log-collector-name
ceph: Simplify the log-collector container name
2021-02-02 14:28:37 -07:00
Blaine Gardner d4c71ff46a Merge pull request #7132 from travisn/object-device-class
ceph: Add deviceClass to the object store schema
2021-02-02 14:15:57 -07:00
Travis Nielsen 5371c943ca ceph: simplify the log-collector container name
The log-collector container name was exceeding the 63-char limit
if the parent CR name was too long. The container name just needs
to be unique to the pod spec, so we simplify it to remove the parent
name and avoid hitting the limit in the pod spec.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-02 12:42:53 -07:00
Travis Nielsen 81b398f6b6 ceph: add deviceClass to the object store schema
The deviceClass was missing from the object store CRD schema,
disallowing the device class from being specified on
the object store pools.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-02 12:13:23 -07:00
Travis Nielsen 87ac8c8561 Merge pull request #7109 from varshar16/update-ceph-nfs-pool-recom
ceph: update nfs ganesha pool recommendation
2021-02-02 11:26:28 -07:00
Travis Nielsen ad66fbe4a7 Merge pull request #6866 from jshen28/do-not-detect-csi-version-if-disabled
ceph: skip csi detection if CSI is disabled
2021-02-02 10:09:55 -07:00
Sébastien Han 13bc3f3dea Merge pull request #7125 from leseb/shasum
build: try sha256sum if shasum is not present
2021-02-02 15:24:22 +01:00
Sébastien Han 1bdee1e512 build: try sha256sum if shasum is not present
shasum is not always available and sha256sum seems to exist more often
since it's part of coreutils where sha256sum comes with perl.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-02 14:43:52 +01:00
Varsha Rao 59084fbe06 ceph: update nfs ganesha pool recommendation
Add following don'ts note for storing ganesha recovery object:
* Don't use fs pool, it can cause this dashboard issue https://tracker.ceph.com/issues/46176
* Don't use erasure coded pool, it will not work due to ganesha's omap requirements

Signed-off-by: Varsha Rao <varao@redhat.com>
2021-02-02 17:04:18 +05:30
Travis Nielsen cb00e10130 Merge pull request #7119 from BlaineEXE/allow-unit-test-outside-of-gopath
ceph: do not force go path in unit tests
2021-02-01 21:53:59 -07:00
Blaine Gardner 15a487cd5a ceph: do not force go path in unit tests
Do not force unit tests to be run while the rook repo is in the GOPATH.
Now that Rook uses go modules, this is no longer necessary. Allow this
by creating a helper function that unit tests can use that return the
on-host path to the `rook` project root.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-02-01 18:28:36 -07:00
shenjiatong 2b63fff087 ceph: skip csi detection if CSI is disabled
Before this patch, csi detection will run whether or
not rbd and cephfs are all disabled. Run detection only
if it is necessary.

Signed-off-by: shenjiatong <yshxxsjt715@gmail.com>
2021-02-02 08:28:35 +08:00
Sébastien Han ba91f5d7f8 Merge pull request #7116 from leseb/fix-1922108-2
ceph: do not enable ShareProcessNamespace if HostPID
2021-02-01 18:49:34 +01:00
Sébastien Han 8b65eb6126 ceph: do not enable ShareProcessNamespace if HostPID
If HostPID is enabled, this means the Ceph version is older than Octopus
and we are still running OSD with HostPID due to an internal
inter-process check.
If the log collector is enabled we need to enable ShareProcessNamespace
**only** if HostIPC is disabled.

Both HostPID and ShareProcessNamespace cannot be enabled.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-01 18:23:19 +01:00
Sébastien Han efefb557a8 Merge pull request #7111 from leseb/fix-1922108
ceph: do not enable ShareProcessNamespace if HostIPC
2021-02-01 17:18:58 +01:00
Sébastien Han f910bcd942 Merge pull request #7110 from leseb/fix-codegen-again
ceph: fix codegen (again)
2021-02-01 17:17:59 +01:00
Travis Nielsen 661b8c7336 Merge pull request #7075 from sp98/timeout-radosgw-admin-cmd
ceph: timeout `radosgw-admin` cli commands
2021-02-01 09:10:18 -07:00
Sébastien Han c463153b61 Merge pull request #7105 from travisn/no-log-mon-pdb
ceph: Skip logging error for mon pdbs if single mon
2021-02-01 16:38:07 +01:00
Sébastien Han 8ea9b6b80f ceph: fix CephFNS plurial
Introducing the new flag to get the correct plurial version of CephNFS,
if not overriden the generator will be CephNFSs instead of CephNFSes.

We run deepcopy and client,lister,informer generations separetly so we can use the flag "--plural-exceptions"
which is only known by client,lister,informer binary and not the deepcopy binary.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-01 16:36:56 +01:00
Travis Nielsen d150980241 ceph: skip logging error for mon pdbs if single mon
If there is a single mon, we don't expect the PDBs to be created
and neither do we need to log that it is an error condition.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-01 07:57:53 -07:00