This test:
- starts up 2 minikube clusters
- create 2 ceph clusters
- creates object multisite CRDs on each cluster and
syncs the clusters
- writes an object to cluster 1 and reads it on
cluster 2
This commit also adds new functions in
github-action-helper.sh that aid in the multisite
test and the multi cluster mirroring test.
Signed-off-by: Ali Maredia <amaredia@redhat.com>
Kubernetes 1.22 version didn't support
certificates.k8s.io v1beta1 version
reverting the k8s 1.22 version to 1.21
till the certificates.k8s.io #8364 Pr
didn't get completed
so the CI can run successfully
Signed-off-by: parth-gr <paarora@redhat.com>
since we moved to github action for the release,
we maunally have to push the tag to build image.
with this change,
first, this action will set some
environment variable which will be consume by
the script to print release notes.
then,
it will ask for 1 input from
github UI(in Action tab)
tag: where we'll give the tag for the release
after creating tag it will run the script and
print release notes.
**NOTE** please verify the environment var
and release notes after the successful action run.
.
Signed-off-by: subhamkrai <srai@redhat.com>
They are scenarios where the mirroring information want to be shared
between clusters prior to creating pool. Because the bootstrap peer
import command needs a pool name to operate this is not suitable. So
additionally now each time the cluster is reconciled and on any new
clusters a new secret will be created that contains a boostrap peer
token. It can be exchanged with another cluster.
Signed-off-by: Sébastien Han <seb@redhat.com>
The CI test for mirroring now runs on stable v16 tag. Internally our
code has a minimum version of 16.2.5 for cephfs mirroring since it's
available.
Signed-off-by: Sébastien Han <seb@redhat.com>
Rook will now auto detect the kv version of the vault server. This
allows users not having to pass the VAULT_BACKEND configuration in the
CephCluster CR.
Signed-off-by: Sébastien Han <seb@redhat.com>
The build version should be detected with the git describe
command, but if the VERSION var is already set, it will be
used instead of being detected from git. During the official
builds or even local builds, we just want to let the makefile
detect the git version.
The full git history is added to enable proper detection of the
version. Without the full history only a hash is returned for
the version, which then results in an invalid semantic version
error for the helm chart.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
Instead of having the RBDMirroringPeerSpec in the RBDMirror CRD we want
to move it on the CephBlockPool CRD so that each pool can have its own peer.
This enables pool to re-use an existing peer secret if it points to the
same cluster peer.So we don't need to duplicate secret peer anymore.
Signed-off-by: Santosh Pillai <sapillai@redhat.com>
The unshallow step in the action is replaced now with the
fetch-depth: 0 option on the checkout@v2 action.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit c6d8df931f)
The tagged builds will run git checkout on the correct tag,
though the publish and promote actions expect a branch name
to be available due to internal build assumptions. Now the
publish looks up the branch name from the tag and passes
it to the publish command as expected.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit d8c5f459de)
The integration test actions were not running on the release branch
or tags due to an incorrect condition.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 1052abac30)
The minimum K8s version for v1 CRDs is 1.16. Since support for
v1beta1 cassandra and nfs was removed and only v1 is supported,
the CI will now only run back to 1.16 for those providers.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The CRDs v1 requires the full schema for all settings, so we now
generate the CRDs for nfs for full fidelity of all settings.
Co-authored-by: Nicolaj Græsholt <figaw@hotmail.com>
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The CRDs v1 requires the full schema for all settings, so we now
generate the CRDs for cassandra for full fidelity of all the
settings.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
Similarly to block volume replication, Ceph is capable of replicating the
content of a Ceph Filesystem from one cluster to another.
For this, during the 1.6 cycle, we introduced a new CRD called
CephFilesystemMirror which effectively deploys a cephfs-mirror daemon.
However, configuring peers to enable replication between two clusters
had to be done manually.
Also various bug fix made it in Ceph eventually and the minimum required
version for this to work is to run on Ceph Pacific 16.2.5 at least.
So the automatic configuration of Ceph Filesystem peers is now possible.
By editing the CephFilesystem CRD, you can now turn on mirroring:
```yaml
mirroring:
enabled: false
# list of Kubernetes Secrets containing the peer token
# for more details see: https://docs.ceph.com/en/latest/dev/cephfs-mirroring/#bootstrap-peers
peers:
secretNames:
- secondary-cluster-peer
```
Also, the mirroring status is displayed in the CR status:
```
status:
info:
fsMirrorBootstrapPeerSecretName: fs-peer-token-myfs
mirroringStatus:
daemonsStatus:
- daemon_id: 4186
filesystems:
- filesystem_id: 2
name: myfs
lastChecked: "2021-07-01T14:16:29Z"
phase: Ready
snapshotScheduleStatus:
lastChecked: "2021-07-01T14:16:29Z"
snapshotSchedules:
- fs: myfs
path: /
rel_path: /
retention: {}
schedule: 24h
```
Closes: https://github.com/rook/rook/issues/7063
Signed-off-by: Sébastien Han <seb@redhat.com>
For all Rook-maintained GH actions, use a default shell that has xtrace
enabled to help debug any errors.
Enable xtrace on all actions except these that use only external tools:
- codespell
- commitlint (wagoid/commitlint)
- golangci-lint
- helm-lint (chart-testing)
- stale
- yamllint
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
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>
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>