Commit Graph
13292 Commits
Author SHA1 Message Date
Ben Grabham 25c3b868fd ceph: fix helm chart to allow multiple filesystems
Fix helm chart to allow multiple filesystems. This isn't required for Pacific but when upgrading from 1.5.x this is usually still set.

Signed-off-by: Ben Grabham <git@chillichef.com>
2021-05-22 13:36:43 +01:00
Travis Nielsen 2a9c81ec55 Merge pull request #7951 from BlaineEXE/scan-disks-in-init-container-for-raw-osds-on-node
ceph: scan raw OSDs on nodes in OSD init container
2021-05-20 13:01:32 -06:00
Blaine Gardner 8f7f24b1fc ceph: scan raw OSDs on nodes in OSD init container
The 'ceph-volume raw list' command used to list OSDs on nodes by the
rook-ceph-osd-prepare- jobs return user-friendly device names (e.g.,
/dev/sda) rather than persistent device names. Friendly device names
often change when systems reboot, and even persistent device names can
change under certain circumstances (e.g., a disk controller is replaced
with a different one). To prevent OSD Pods created for raw OSDs on
nodes from crashing repeatedly if the device it was created with is
renamed, scan the list of OSDs on the host with 'ceph-volume raw list'
to find the right OSD to activate in the OSD pod's OSD activation init
container.

Fixes #7918

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-05-20 12:35:53 -06:00
Blaine Gardner 24d5eb7767 Merge pull request #7952 from synarete/partprobe-after-zapdevice
docs: call partprobe after zapping device
2021-05-20 10:42:06 -06:00
Sébastien Han c9f28b85cf Merge pull request #7948 from subhamkrai/nfs-action
nfs: add github action for NFS integration test
2021-05-20 17:37:04 +02:00
Sébastien Han ea97c62954 Merge pull request #7953 from leseb/fix-python-failure-prometheus
ci: wait a bit for the python script to succeed
2021-05-20 15:35:46 +02:00
Sébastien Han 003e2535b5 ci: wait a bit for the python script to succeed
We still see the CI failing with:

```
Traceback (most recent call last):
  File "/etc/ceph/create-external-cluster-resources.py", line 801, in <module>
    raise err
  File "/etc/ceph/create-external-cluster-resources.py", line 798, in <module>
    rjObj.main()
  File "/etc/ceph/create-external-cluster-resources.py", line 779, in main
    generated_output = self.gen_json_out()
  File "/etc/ceph/create-external-cluster-resources.py", line 613, in gen_json_out
    self._gen_output_map()
  File "/etc/ceph/create-external-cluster-resources.py", line 598, in _gen_output_map
    self.out_map['MONITORING_ENDPOINT_PORT'] = self.get_active_and_standby_mgrs()
  File "/etc/ceph/create-external-cluster-resources.py", line 389, in get_active_and_standby_mgrs
    self.endpoint_dial(monitoring_endpoint)
  File "/etc/ceph/create-external-cluster-resources.py", line 245, in endpoint_dial
    "unable to connect to endpoint: {}".format(endpoint_str))
__main__.ExecutionFailureException: unable to connect to endpoint: 172.17.0.7:9283
command terminated with exit code 1
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-20 09:44:49 +02:00
Shachar Sharon 4509958bab docs: call partprobe after zapping device
Play safe: after zapping devices, issue a call to 'partprobe' to inform
the OS on partition table changes. This may assists users who face
voodoo partition creation, as described in those ROOK issues:

https://github.com/rook/rook/issues/7734
https://github.com/rook/rook/issues/7940

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
2021-05-20 10:00:01 +03:00
Sébastien Han dc0985c7f6 ceph: rehydrate the bootstrap peer token secret on monitor changes
If the monitors addresses change, we must update the peer secret with
the new addresses. For this, each time the configmap
"rook-ceph-mon-endpoints" is updated, we trigger a reconcile on the
CephBlockPool CRs, which will update the token secret.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-20 08:50:22 +02:00
subhamkrai a19a7f90e1 nfs: add github action for NFS integration test
this commit add github action for NFS
integration test.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-20 10:53:14 +05:30
Travis Nielsen 162fd1b442 Merge pull request #7912 from travisn/consolidate-rookv1
build: Refactor to consolidate the rook.io/v1 package
2021-05-19 13:33:32 -06:00
Sébastien Han a34cb1977a Merge pull request #7949 from Madhu-1/mirror/fix-yaml
ceph: correct component in mirroring yaml
2021-05-19 17:13:42 +02:00
Madhu Rajanna 57abd19a12 ceph: correct component in mirroring yaml
corrected the component in mirroring yaml and added
appropriate mirroring related affinity example.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-05-19 20:03:49 +05:30
Travis Nielsen b37e620549 Merge pull request #7942 from subhamkrai/disable-fork-action
ci: restrict push image build action to run on fork
2021-05-19 07:55:30 -06:00
Travis Nielsen 4456a5ae99 Merge pull request #7910 from travisn/roadmap-1.7
docs: Update roadmap for v1.7
2021-05-19 07:08:47 -06:00
subhamkrai de96a14e31 ci: restrict push image build action to run on fork
this commit restrict push image build action to run on
fork repo.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-19 13:37:35 +05:30
subhamkrai bf7b4609b1 build: bump to golang version 1.16
this commit bump to golang version 1.16.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-19 13:35:20 +05:30
Sébastien Han cfcdcac56e Merge pull request #7222 from iamniting/events
ceph: generate cephCluster reconcile result as events
2021-05-19 08:50:42 +02:00
Travis Nielsen b0a63711f5 build: refactor to consolidate the rook.io/v1 package
The rook.io/v1 package was only an internal implementation detail and
does not have any CRDs that rely on it. The CRD deserialization should
handle the change in internal types without any issue. This separation
gives more flexibility for the storage providers to implement exactly
what is needed for their storage provider instead of forcing to use the
same types and risk affecting another storage provider.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-05-18 19:55:37 -06:00
Travis Nielsen 4f4fe918d0 Merge pull request #7933 from travisn/extensionsv1-doc
ceph: Updated dashboard ingress example for v1
2021-05-18 16:31:48 -06:00
Travis Nielsen 93c8b73df9 Merge pull request #7936 from travisn/revert-disable-push
Revert restriction to push image build action to run on fork as it also disabled master pushes
2021-05-18 12:09:42 -06:00
Travis Nielsen f61083bb2b Revert "ci: restrict push image build action to run on fork"
This reverts commit e0206c56d5.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-05-18 11:39:58 -06:00
Sébastien Han 0459a20173 ceph: stop using the namespace in the site's name
Removing the site's name helps us reducing the size of the rbd-mirror
socket path which under certain circumstances could exceed the system
limit.
Also, the namespace information is not that relevant, the cluster FSID
is.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-18 19:36:53 +02:00
Sébastien Han 2793750146 ceph: silence harmless errors when the operator is not initialized
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-05-18 19:35:07 +02:00
Travis Nielsen 142c3fd891 ceph: updated dashboard ingress example for v1
The ingress kind is found in apiversion networking.k8s.io/v1 since K8s
1.19. We now update the examples to use v1 instead of v1beta1.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-05-18 11:20:13 -06:00
Travis Nielsen c1818cb681 Merge pull request #7923 from subhamkrai/add-tag-master-build
ci: add missing tag in master push images
2021-05-18 11:10:27 -06:00
Travis Nielsen e46dc1cd17 Merge pull request #7928 from leseb/fix-7927
ci: retry when fetching online manifests
2021-05-18 10:52:47 -06:00
Sébastien Han f1f3416f49 ci: retry when fetching online manifests
We now retry up to 3 times if the manifest fails to be fetched online.

Closes: https://github.com/rook/rook/issues/7927
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-18 17:22:12 +02:00
Travis Nielsen e214a5574f docs: update roadmap for v1.7
With the v1.6 release completed, we now update the roadmap
for v1.7.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-05-18 09:18:38 -06:00
Travis Nielsen bbf29dbe70 Merge pull request #7922 from leseb/doc-fix
doc: fix patch command
2021-05-18 07:41:48 -06:00
Nitin Goyal 25d2df4018 ceph: generate cephCluster reconcile result as events
Generate cephCluster reconcile result as an k8s event if it is not
already present on the cluster

Signed-off-by: Nitin Goyal <nigoyal@redhat.com>
2021-05-18 18:27:52 +05:30
Nitin Goyal e3fffdc711 core: add eventutils in the k8sutil package
eventutils will allow operator to limit events count of same event
and prevents from spaming apiserver

Signed-off-by: Nitin Goyal <nigoyal@redhat.com>
2021-05-18 17:01:37 +05:30
Sébastien Han bcdc7f8616 docs: fix patch command
The JSON was invalid.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-18 10:26:55 +02:00
Sébastien Han f15bb5d480 Merge pull request #7919 from cybozu-go/remove-missing-field-in-crd
ceph: remove an missing field in crd
2021-05-18 10:10:17 +02:00
subhamkrai 9d8853d49a ci: add missing tag in master push images
tags are missing in master pushed images
to shallow problem. this commit add command
to unshallow.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-18 12:14:17 +05:30
Sébastien Han e368c3e389 Merge pull request #7546 from rohan47/multus_cluster_nw
ceph: support specifying only public network or only cluster network or both
2021-05-17 15:03:33 +02:00
rohan47 f3d2ae5405 ceph: support specifying only public network or only cluster network
With this change, the Rook ceph cluster can have only a public network or
only a cluster network or both can be specified. Prior to this commit if
only a public network was specified, it was copied to the cluster network.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2021-05-17 17:54:08 +05:30
Satoru Takeuchi c2adbdd8a8 ceph: remove an missing field in crd
`CephObjectStore->gateway->type` is not used. Rook has only supported s3-like
interface and hasn't had no code which handles `type` field.

In addition, this field was removed from CRD in the following commit.

ceph: auto-gen crds
31db03fece

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-05-17 07:51:13 +00:00
Travis Nielsen 166ee6c1df Merge pull request #7911 from travisn/obsolete-rbac-setting
ceph: Remove obsolete operator setting for enabling rbac
2021-05-14 17:39:37 -06:00
Travis Nielsen 386801586d ceph: remove obsolete operator setting for enabling rbac
Enabling rbac is a legacy setting from way back when the operator
was creating the rbac internally, instead of declaring it explicitly
in the common.yaml. There is no need for this setting now.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-05-14 15:51:51 -06:00
Travis Nielsen 6a405b8070 Merge pull request #7898 from RyuunoAelia/fix_okd_operator_metadata
build: rook-ceph Operator deployment for OKD should be the same as OCP for it to work
2021-05-13 08:52:27 -06:00
Travis Nielsen 6ba6b1c3b1 Merge pull request #7886 from cybozu-go/ceph-fix-hostpath-of-osd-to-avoid-data-corruption
ceph: fix hostpath of osd to avoid data corruption
2021-05-13 08:49:24 -06:00
Diego Abelenda a58bc4982e build: okd operator metadata should be the same as OCP
Signed-off-by: Diego Abelenda <diego.abelenda@gmail.com>
2021-05-13 09:27:45 +02:00
Travis Nielsen 081e2fd9c8 Merge pull request #7884 from travisn/mon-failover-window
ceph: Persist expected mon endpoints immediately during mon failover
2021-05-12 10:42:28 -06:00
Travis Nielsen bb4191a8a7 ceph: persist expected mon endpoints immediately during mon failover
After mon failover is initiated, there was a time window where if the operator
was restarted, the new mon is started and has joined quorum, but the operator
does not believe the mon should be in quorum after the operator restart.
The operator was mistakenly removing the extra mon prematurely, sometimes
causing quorum to be lost if another mon was also down at the same time.
If the mon does not come back online, steps to recover quroum would need
to be followed from the disaster guide. Now the expected list of mons
will be updated immediately during mon failover if the operator successfully
created the new mon deployment, thus removing the window where restarting
the operator can cause quorum loss.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-05-12 09:44:04 -06:00
Sébastien Han ffd263c539 Merge pull request #7891 from leseb/wait-for-prom
ceph: wait for the prometheus module to be ready
2021-05-12 17:22:45 +02:00
Sébastien Han 866fc0a590 Merge pull request #7889 from leseb/fix-7842
ceph: do not overwrite the probe handler
2021-05-12 16:58:55 +02:00
Travis Nielsen 11adc1b2bf Merge pull request #7887 from subhamkrai/restrict-fork-build
ci: restrict push image build action to run on fork
2021-05-12 08:37:25 -06:00
Sébastien Han cc763df671 ceph: wait for the prometheus module to be ready
Before running the external script test let's make sure the prometheus
exporter is loaded. We often see in the CI errors like:

```
  kubectl -n rook-ceph exec $(kubectl get pod -l app=rook-ceph-tools -n rook-ceph -o jsonpath='{.items[0].metadata.name}') -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool
  shell: /bin/bash -e {0}
  env:
    GOROOT: /opt/hostedtoolcache/go/1.16.4/x64
    MINIKUBE_HOME: /home/runner/work/_temp
Execution Failed: unable to connect to endpoint: 172.17.0.10:9283
Traceback (most recent call last):
  File "/etc/ceph/create-external-cluster-resources.py", line 801, in <module>
    raise err
  File "/etc/ceph/create-external-cluster-resources.py", line 798, in <module>
    rjObj.main()
  File "/etc/ceph/create-external-cluster-resources.py", line 779, in main
    generated_output = self.gen_json_out()
  File "/etc/ceph/create-external-cluster-resources.py", line 613, in gen_json_out
    self._gen_output_map()
  File "/etc/ceph/create-external-cluster-resources.py", line 598, in _gen_output_map
    self.out_map['MONITORING_ENDPOINT_PORT'] = self.get_active_and_standby_mgrs()
  File "/etc/ceph/create-external-cluster-resources.py", line 389, in get_active_and_standby_mgrs
    self.endpoint_dial(monitoring_endpoint)
  File "/etc/ceph/create-external-cluster-resources.py", line 245, in endpoint_dial
    "unable to connect to endpoint: {}".format(endpoint_str))
__main__.ExecutionFailureException: unable to connect to endpoint: 172.17.0.10:9283
command terminated with exit code 1
```

but then when we log into the runner, we can see the command works.
So let's wait a little bit for the module to be up.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-12 14:59:57 +02:00
Sébastien Han 266a359a0e ceph: do not overwrite the probe handler
Changing the livenessprobe handler is not possible anymore for the
simple reason that it does not make sense. Practicly speaking we just
cannot change its value since it is propapaged to all the daemons. The
exec handler contains the socket name of the daemon, because daemons
have different names we cannot possibly make it generic since it will
apply to all.

Closes: https://github.com/rook/rook/issues/7842
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-12 14:06:24 +02:00