Commit Graph
6935 Commits
Author SHA1 Message Date
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
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
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
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
Sébastien Han e06c36dbc9 Merge pull request #7875 from leseb/external-active-mgr-change
ceph: actively update the service endpoint for external mgr
2021-05-12 09:15:34 +02:00
subhamkrai e0206c56d5 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-12 12:23:11 +05:30
Satoru Takeuchi 6af014b798 ceph: fix hostpath of osd to avoid data corruption
A directory is created under dataDirHostPath for each OSD. In host-based cluster,
its name is constructed from kernel device name like _dev_sdb though user specifies
udev persistent device name. We should use unique name among all OSDs.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-05-12 01:31:46 +00:00
Sébastien Han 4f63e88ad5 Merge pull request #7877 from Rakshith-R/cleanup/csi-sts-dep
ceph: remove redundant csi statefulset template path vars
2021-05-11 18:00:57 +02:00
Sébastien Han 0bdbb944bf ceph: simplify external mode setup
The preparation script does not require any manual inputs anymore. The
cluster/examples/kubernetes/ceph/create-external-cluster-resources.sh
will create and set the env variable needed for the import script.
Hopefully this will reduce the friction in some installation, especially
for the mon ports.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-11 16:08:46 +02:00
Sébastien Han 5e1e9f4c92 ceph: actively update the service endpoint for external mgr
If the cluster is external we want to periodically rehydrate the mgr
endpoint. This handles the scenarion where the active manager changes,
 so we need to update the endpoint with the new IP address.
The create-external-cluster-resources.py script now requires an extra
permission to query the manager service so Rook can discover the active
one and its IP.

Testing:

```
[leseb@tarox~/go/src/github.com/rook/rook][external-active-mgr-change] minikube kubectl -- exec -n rook-ceph deploy/rook-ceph-tools -ti -- ceph mgr stat
{
    "epoch": 37,
    "available": true,
    "active_name": "b",
    "num_standby": 1
}

[leseb@tarox~/go/src/github.com/rook/rook][external-active-mgr-change] kubectl -n rook-ceph-external get ep
NAME                     ENDPOINTS          AGE
rook-ceph-mgr-external   172.17.0.12:9283   3m10s

[leseb@tarox~/go/src/github.com/rook/rook][external-active-mgr-change] k scale --replicas=0 deployment rook-ceph-mgr-b
deployment.apps/rook-ceph-mgr-b scaled

[leseb@tarox~/go/src/github.com/rook/rook][external-active-mgr-change] minikube kubectl -- exec -n rook-ceph deploy/rook-ceph-tools -ti -- ceph mgr stat
{
    "epoch": 40,
    "available": true,
    "active_name": "a",
    "num_standby": 0
}

[leseb@tarox~/go/src/github.com/rook/rook][external-active-mgr-change] kubectl -n rook-ceph-external get ep
NAME                     ENDPOINTS          AGE
rook-ceph-mgr-external   172.17.0.13:9283   3m55s
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-11 16:08:40 +02:00
Travis Nielsen 169b225be5 Merge pull request #7867 from subhamkrai/crash-collector
ceph: create crash collector pods after secret created
2021-05-11 07:18:42 -06:00