Commit Graph
16 Commits
Author SHA1 Message Date
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
Sébastien Han db40a31bb2 ci: change yq path to /usr/local/bin/yq
So it will override any existing installation.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-21 14:15:07 +02:00
Sébastien Han 741dd25efb Merge pull request #8278 from leseb/retry-ci
ci: retry on network errors
2021-07-08 08:52:28 +02:00
Sébastien Han ff8d24a296 ci: retry on network errors
Seen today in https://github.com/rook/rook/pull/8272/checks?check_run_id=3010477951

```
github.com/rook/rook/pkg/apis/ceph.rook.io/v1 imports
	github.com/hashicorp/vault/api: github.com/hashicorp/vault@v1.4.2: reading https://proxy.golang.org/github.com/hashicorp/vault/@v/v1.4.2.zip: 503 Service Unavailable
	server response: Service Unavailable
github.com/rook/rook/pkg/daemon/ceph/osd/kms imports
	github.com/libopenstorage/secrets/vault imports
	github.com/hashicorp/vault/command/agent/auth: github.com/hashicorp/vault@v1.4.2: reading https://proxy.golang.org/github.com/hashicorp/vault/@v/v1.4.2.zip: 503 Service Unavailable
	server response: Service Unavailable
github.com/rook/rook/pkg/daemon/ceph/osd/kms imports
	github.com/libopenstorage/secrets/vault imports
	github.com/hashicorp/vault/command/agent/auth/kubernetes: github.com/hashicorp/vault@v1.4.2: reading https://proxy.golang.org/github.com/hashicorp/vault/@v/v1.4.2.zip: 503 Service Unavailable
	server response: Service Unavailable
make: *** [go.mod.check] Error 1
```

Also https://github.com/rook/rook/pull/8272/checks?check_run_id=3010482113

```
go get: sigs.k8s.io/controller-tools@v0.4.1 updating to
	sigs.k8s.io/controller-tools@v0.5.1-0.20210420220833-f284e2e8098c requires
	k8s.io/apimachinery@v0.20.2 requires
	github.com/json-iterator/go@v1.1.10: verifying go.mod: github.com/json-iterator/go@v1.1.10/go.mod: reading https://sum.golang.org/tile/8/0/x005/043: stream error: stream ID 1099; INTERNAL_ERROR
make[3]: *** [/home/runner/work/rook/rook/.cache/tools/linux_amd64/controller-gen-f284e2e8098cb0193c2b0c7c1c651ae75496539b] Error 1
make[2]: *** [generate-csv-ceph-templates] Error 1
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-07 18:00:01 +02:00
Sébastien Han 830b36c039 Merge pull request #7920 from thotz/tlscitest
test: ci test for TLS objectstore
2021-07-05 11:23:40 +02:00
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
Jiffin Tony Thottan 9e3cf68d04 test: ci test for TLS objectstore
Extend the object store smoke test to include TLS configurations.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-07-01 18:50:27 +05:30
Sébastien Han 9738131010 ci: retry on network build failures
We have seen cases where the build might fail due to a small network
hiccup so let's retry up to 3 times if this is the case.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-06-29 09:18:56 +02:00
Sébastien Han e6734304cd ci: format helper using standard 2 spaces indent
Bash common indent is 2 spaces so let's use it.
See: https://google.github.io/styleguide/shellguide.html

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-06-29 09:18:56 +02:00
Travis Nielsen 054004ba76 Merge pull request #7946 from leseb/ci-arm64-run
ci: add arm64 runner
2021-06-02 10:13:31 -06:00
Sébastien Han b178c8ae2c ci: add arm64 hosted runner
Thanks to @xin3liang we now have 2 hosted runners on ARM64. So let's add
a small integration test for it.
The action will run every day at midnight.

Successful run: https://github.com/rook/rook/pull/7946/checks?check_run_id=2726403458

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-06-02 11:54:43 +02:00
Sébastien Han 0004869f66 ceph: add ceph cluster fsid to LUKS header
When configuring encrypted on-pvc clusters we now set the cluster fsid
in the LUKS header. If needed we can then determine if the encrypted
block is part of our cluster or not. We also attach the pvc_name in case
it might become useful.

Closes: https://github.com/rook/rook/issues/7991
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-31 15:01:52 +02:00
Sébastien Han 0c806588d2 Merge pull request #7790 from leseb/retry-vg
ci: retry vgcreate on failure
2021-04-29 19:01:35 +02:00
Sébastien Han c63a42a661 ci: retry vgcreate on failure
Try to mitigate the following error from the CI:

```
+ sudo vgcreate test-rook-vg /dev/sdb
  Can't open /dev/sdb exclusively.  Mounted filesystem?
Error: Process completed with exit code 5.

```

Now we retry up to 3 times to create the volume group.

Closes: https://github.com/rook/rook/issues/7487
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-29 18:24:48 +02:00
Sébastien Han 0f7128ece9 build: fix parallel build
We now the generate the CRDs as well as the CSV on a single GOARCH only:
amd64. This helps us avoiding builds colliding with each others.

Closes: https://github.com/rook/rook/issues/7655
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-29 17:31:22 +02:00
subhamkrai 7974d46b20 ci: improve github action writing
we have lots of duplicate codes for
github action. this commit refactor
them to a bash script which will minimize
duplicate codes.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-04-27 20:15:52 +05:30