Commit Graph
174 Commits
Author SHA1 Message Date
Travis Nielsen 0591753673 docs: update master doc links to latest
With the renaming of master docs to latest, all the links also
need to be updated.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-09-22 12:41:32 -06:00
Sébastien Han f040c37ad1 ci: fix mirror test with v16.2.6
The new version v16.2.6 has a different behavior when it comes to the
number of cephfs-mirror socket files. Previous version had exactly 3 and
now has like way more...
So let's just check for the presence of more sockets.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-09-21 09:16:33 +02:00
Blaine Gardner c60bf241e1 test: make object e2e test its own test
The CephSmokeSuite is becoming quite large and long, and most of the
length is now related to the object e2e tests. Separate the full object
e2e test into CephObjectSuite, and only test the object 'lite' test in
the CephSmokeSuite.

Resolves #8714

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-09-17 15:27:27 -06:00
Travis Nielsen e2e3fc83fc Merge pull request #8673 from leseb/stale-bot
bot: change issue and pr stale days
2021-09-16 08:31:31 -06:00
Sébastien Han 875aec74cc bot: bump action to v4
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-09-16 10:04:56 +02:00
Sébastien Han 796abd7805 bot: change issue and pr stale days
Let's be a bit more aggressive to ensure a consistent amount of
in-progress PRs and issues.
So now PR will go stale after 30 days and issues after 60 days.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-09-16 10:04:46 +02:00
Sébastien Han 73c340ded7 ci: fix pod list
We should not use .items[0].metadata.name if the array length is 0. This
is the case when nothing has been initialized yet. Instead, we should
use .items[*].metadata.name, the wildcard ensures to always return 0
even if nothing is present yet.

Fixes: https://github.com/rook/rook/issues/8676
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-09-09 17:24:56 +02:00
Sébastien Han 53ad7c73a1 ci: add failfast go flag to stop tests sooner (optionnal)
With the -failfast flag the tests will not continue when one of them
fails. This allows us to log in the runner and observe the exact state
of any failure.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-09-08 11:24:58 +02:00
Blaine Gardner 61f6429ea4 test: remove NFS and Cassandra github actions
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-08-31 14:05:34 -06:00
Sébastien Han d4dd0577f9 Merge pull request #8529 from sp98/id-mapping
ceph: add ClusterID and PoolID mappings between local and peer cluster
2021-08-31 17:32:14 +02:00
Santosh Pillai 3f8abec403 ceph: add ClusterID and PoolID mappings between local and peer cluster
During disaster recovery/migration of a cluster, as part of the failover, the
kubernetes artifacts like deployment, PVC, PV, etc will be restored to a new
cluster by the admin. Even if the kubernetes objects are restored the
corresponding RBD/CephFS subvolume cannot be retrieved during CSI operations as
the clusterID and poolID are not the same in both clusters

This PR creates a mapping between Cluster ID and RBD Pool ID between
local cluster and peer cluster.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-08-31 20:08:56 +05:30
subhamkrai ebe21c8f68 ci: add action for shellcheck linter
we are adding new linter for shellcheck.
As we are writing more shell scripts this
will help maintain quality.

Also, doing all the changes required in
bash files to pass this shellcheck.

Closes: https://github.com/rook/rook/issues/8431
Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-26 10:03:32 +05:30
Sébastien Han 7c14b32435 ci: build on golang 1.16 and 1.17
The CI now runs the build test against Golang 1.16 and 1.17.
So 1.17 is been added as a supported version.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-24 11:18:51 +02:00
subhamkrai 029ab61348 ci: validate user before creating tag
we need to validate create tag action
so that only authorized users can trigger
that action.

[skip-ci]

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-19 20:47:05 +05:30
Travis Nielsen c00b290041 Merge pull request #8364 from parth-gr/update-certificates.k8s.io
ceph: update CSR from v1beta1 to v1
2021-08-18 08:00:01 -06:00
subhamkrai 94d8b9b2e6 ci: reduce tmate timeout to 60
reduce tmate timeout to 60 for the pull_request event.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-18 10:29:03 +05:30
subhamkrai 4233bb681e ci: validate user before creating tag
we need to validate create tag action
so that only authorized users can trigger
that action.

[skip-ci]

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-12 20:56:31 +05:30
parth-gr 88d907d9f6 ci: cephSmokeSuite test run on kubernetes 1.22
the CSR certificates k8s is updated to v1 version
so uprading the somkesuite test to run on 1.22 version

Signed-off-by: parth-gr <paarora@redhat.com>
2021-08-12 20:27:17 +05:30
subhamkrai 14d0c402c8 ci: remove brackets when checking repo
having brackets around if is showing
errors. this commit removes the brackets.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-12 10:52:19 +05:30
Ali Maredia b6404ae2ab ceph: rgw multisite intgration testing
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>
2021-08-11 13:25:43 -04:00
Travis Nielsen 5f64f5eb15 Merge pull request #8513 from subhamkrai/reduce-tmate-time
ci: reduce tmate session time
2021-08-11 08:17:41 -06:00
subhamkrai ea4a705b1a ci: reduce tmate session time
reduce tmate session timeout to 60min for carnary test
and 30min when push/tag event.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-11 15:53:01 +05:30
parth-gr cad1c5320a ci: CephSmokeSuite test run on kubernetes 1.21
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>
2021-08-10 21:52:28 +05:30
Travis Nielsen 529ec0ff7e Merge pull request #8461 from subhamkrai/automate-release-action
ci: create tag and print release notes
2021-08-06 09:41:11 -06:00
subhamkrai 8572fdb58b ci: create tag and print release notes
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>
2021-08-06 16:00:25 +05:30
Sébastien Han 796f6d12c8 ci: test on kubernetes 1.22
1.22 just got released. We now bump our tests one version higher too.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-05 09:39:05 +02:00
Sébastien Han 412b3eaf5e Merge pull request #8447 from leseb/fix-8438
ceph: ignore errors when mirroring is not enabled on the filesystem
2021-08-03 16:06:16 +02:00
Sébastien Han 630c2f6a8b ceph: add an rbd-mirror bootstrap token on cluster creation
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>
2021-08-02 18:34:27 +02:00
Sébastien Han 082858bf53 ceph: use v16 for mirroring test in ci
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>
2021-07-30 16:17:08 +02:00
Sébastien Han 99e00dea1e ceph: auto detect vault k/v version
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>
2021-07-29 10:16:31 +02:00
Sébastien Han a62e7e75e7 Merge pull request #8380 from sp98/update-cephblockpool-cr
ceph: add mirroring peer specification to CephBlockPool CRD
2021-07-28 17:34:52 +02:00
Travis Nielsen 87596c6f8e build: detect git version instead of setting to 0
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>
2021-07-28 07:25:10 -06:00
Santosh Pillai 3b50f5fd00 ceph: add MirroringPeerSpec to CephBlockPool.Spec.Mirroring
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>
2021-07-28 17:47:36 +05:30
Travis Nielsen 0f797e74ca build: unshallow not needed with fetch-depth 0
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)
2021-07-26 17:34:19 -06:00
Travis Nielsen 67a3822e95 build: publish and promote with correct branch name
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)
2021-07-26 17:34:10 -06:00
Travis Nielsen b9b2391fe9 build: run integration tests on release branch and tags
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)
2021-07-23 15:46:03 -06:00
subhamkrai 492a8176e0 ci: action for release build
this commit adds github action for
release builds and also modify the
helper script `build-release.sh`.

Closes: https://github.com/rook/rook/issues/8041
Signed-off-by: subhamkrai <srai@redhat.com>
2021-07-23 13:09:30 +05:30
Travis Nielsen e7f44a8f3f build: min version for cassandra and nfs tests is k8s 1.16
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>
2021-07-20 15:40:15 -06:00
Travis NielsenandNicolaj Græsholt f114db952b nfs: generate the crds from types for v1
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>
2021-07-20 08:18:05 -06:00
Travis Nielsen 093cf6dbbd cassandra: generate the crds from types for v1
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>
2021-07-20 08:18:05 -06:00
subhamkrai bc1fabb6e4 ci: update helm version to 3.6.2
this commit update helm version to `3.6.2`

Signed-off-by: subhamkrai <srai@redhat.com>
2021-07-07 20:09:26 +05:30
Sébastien Han b578f916e7 ceph: add fs mirror config
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>
2021-07-01 17:35:19 +02:00
subhamkrai d3190c3755 ci: remove read access from kube config
this commit remove read access from kube
config file for group and others.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-06-28 21:37:11 +05:30
subhamkrai 279fbb0b93 ci: downgrade minikube version from helm suite
this commit downgrades minikube version
from release test for helm suite as
test are failing.

closes: https://github.com/rook/rook/issues/8202
Signed-off-by: subhamkrai <srai@redhat.com>
2021-06-28 10:51:56 +05:30
Sebastian Wagner a411aa015f ci: disable stale workflow on forks
Running the stale workflow is a waste of resources.

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-27 16:59:47 +02:00
subhamkrai f90050c5b2 ci: update versions in the gh action
this commit update the versions in the
action. example minikube, python, commitlint
and others.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-06-24 23:07:47 +05:30
Travis Nielsen 077ed3f444 Merge pull request #8183 from subhamkrai/timeout-tmate
ci: set tmate for 120min in case of ci failure
2021-06-23 10:52:28 -06:00
Sébastien Han ba04b3eeef ci: wait for the ceph-mgr IP to be available
The ceph-mgr needs some time to come up so we need to wait for an IP
address to be available.

Closes: https://github.com/rook/rook/issues/8126
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-06-23 09:39:12 +02:00
subhamkrai fb7f4ce33b ci: set tmate for 120min in case of ci failure
this commit enable tmate session for every ci failure
with 120min timeout.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-06-23 12:31:54 +05:30
Blaine Gardner 76e82e419a Merge pull request #8146 from BlaineEXE/debug-canary-integration
test: add xtrace logging to github actions
2021-06-22 11:55:08 -06:00