Skip to content

Commit

Permalink
Merge pull request #285 from red-hat-storage/sync_us--devel
Browse files Browse the repository at this point in the history
Syncing latest changes from upstream devel for ceph-csi
  • Loading branch information
openshift-merge-bot[bot] authored Apr 3, 2024
2 parents ab947bb + 5718053 commit b01dec5
Show file tree
Hide file tree
Showing 15 changed files with 87 additions and 106 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/pull-request-commentor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,14 @@ jobs:

strategy:
matrix:
branch: [release-v3.9, release-v3.10, devel]
k8s: ["1.25", "1.26", "1.27", "1.28", "1.29"]
branch: [release-v3.10, release-v3.11, devel]
k8s: ["1.26", "1.27", "1.28", "1.29"]
exclude:
# the next Ceph-CSI version will not be tested with old Kubernetes
- k8s: "1.26"
branch: "devel"
- k8s: "1.25"
branch: "devel"
- k8s: "1.25"
branch: "release-v3.10"

# Ceph-CSI <= 3.9 was released before Kubernetes 1.28
- k8s: "1.28"
branch: "release-v3.9"

# Ceph-CSI <= 3.10 was released before Kubernetes 1.29
- k8s: "1.29"
branch: "release-v3.9"
- k8s: "1.29"
branch: "release-v3.10"

Expand Down
51 changes: 30 additions & 21 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,25 @@ queue_rules:
- "status-success=ci/centos/upgrade-tests-cephfs"
- "status-success=ci/centos/upgrade-tests-rbd"
- and:
- base=release-v3.9
- base=release-v3.11
- "status-success=codespell"
- "status-success=multi-arch-build"
- "status-success=go-test"
- "status-success=golangci-lint"
- "status-success=mod-check"
- "status-success=lint-extras"
- "status-success=ci/centos/k8s-e2e-external-storage/1.25"
- "status-success=ci/centos/k8s-e2e-external-storage/1.26"
- "status-success=ci/centos/k8s-e2e-external-storage/1.27"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.25"
- "status-success=ci/centos/k8s-e2e-external-storage/1.28"
- "status-success=ci/centos/k8s-e2e-external-storage/1.29"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.26"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.27"
- "status-success=ci/centos/mini-e2e/k8s-1.25"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.28"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.29"
- "status-success=ci/centos/mini-e2e/k8s-1.26"
- "status-success=ci/centos/mini-e2e/k8s-1.27"
- "status-success=ci/centos/mini-e2e/k8s-1.28"
- "status-success=ci/centos/mini-e2e/k8s-1.29"
- "status-success=ci/centos/upgrade-tests-cephfs"
- "status-success=ci/centos/upgrade-tests-rbd"
- and:
Expand Down Expand Up @@ -162,15 +165,15 @@ pull_request_rules:
- "status-success=golangci-lint"
- "status-success=mod-check"
- "status-success=lint-extras"
- "status-success=ci/centos/k8s-e2e-external-storage/1.25"
- "status-success=ci/centos/k8s-e2e-external-storage/1.26"
- "status-success=ci/centos/k8s-e2e-external-storage/1.27"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.25"
- "status-success=ci/centos/k8s-e2e-external-storage/1.28"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.26"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.27"
- "status-success=ci/centos/mini-e2e/k8s-1.25"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.28"
- "status-success=ci/centos/mini-e2e/k8s-1.26"
- "status-success=ci/centos/mini-e2e/k8s-1.27"
- "status-success=ci/centos/mini-e2e/k8s-1.28"
- "status-success=ci/centos/upgrade-tests-cephfs"
- "status-success=ci/centos/upgrade-tests-rbd"
- "status-success=DCO"
Expand Down Expand Up @@ -246,7 +249,7 @@ pull_request_rules:
- "status-success=ci/centos/upgrade-tests-rbd"
- and:
- label!=DNM
- base=release-v3.10
- base=release-v3.11
- "#approved-reviews-by>=2"
- "#changes-requested-reviews-by=0"
- "approved-reviews-by=@ceph/ceph-csi-contributors"
Expand All @@ -262,17 +265,20 @@ pull_request_rules:
- "status-success=ci/centos/k8s-e2e-external-storage/1.26"
- "status-success=ci/centos/k8s-e2e-external-storage/1.27"
- "status-success=ci/centos/k8s-e2e-external-storage/1.28"
- "status-success=ci/centos/k8s-e2e-external-storage/1.29"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.26"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.27"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.28"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.29"
- "status-success=ci/centos/mini-e2e/k8s-1.26"
- "status-success=ci/centos/mini-e2e/k8s-1.27"
- "status-success=ci/centos/mini-e2e/k8s-1.28"
- "status-success=ci/centos/mini-e2e/k8s-1.29"
- "status-success=ci/centos/upgrade-tests-cephfs"
- "status-success=ci/centos/upgrade-tests-rbd"
- and:
- label!=DNM
- base=release-v3.9
- base=release-v3.10
- "#approved-reviews-by>=2"
- "#changes-requested-reviews-by=0"
- "approved-reviews-by=@ceph/ceph-csi-contributors"
Expand All @@ -284,15 +290,15 @@ pull_request_rules:
- "status-success=commitlint"
- "status-success=mod-check"
- "status-success=lint-extras"
- "status-success=ci/centos/k8s-e2e-external-storage/1.25"
- "status-success=ci/centos/k8s-e2e-external-storage/1.26"
- "status-success=ci/centos/k8s-e2e-external-storage/1.27"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.25"
- "status-success=ci/centos/k8s-e2e-external-storage/1.28"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.26"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.27"
- "status-success=ci/centos/mini-e2e/k8s-1.25"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.28"
- "status-success=ci/centos/mini-e2e/k8s-1.26"
- "status-success=ci/centos/mini-e2e/k8s-1.27"
- "status-success=ci/centos/mini-e2e/k8s-1.28"
- "status-success=ci/centos/upgrade-tests-cephfs"
- "status-success=ci/centos/upgrade-tests-rbd"
- "status-success=DCO"
Expand Down Expand Up @@ -343,15 +349,18 @@ pull_request_rules:
- "status-success=mod-check"
- "status-success=lint-extras"
- "#changes-requested-reviews-by=0"
- "status-success=ci/centos/k8s-e2e-external-storage/1.25"
- "status-success=ci/centos/k8s-e2e-external-storage/1.26"
- "status-success=ci/centos/k8s-e2e-external-storage/1.27"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.25"
- "status-success=ci/centos/k8s-e2e-external-storage/1.28"
- "status-success=ci/centos/k8s-e2e-external-storage/1.29"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.26"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.27"
- "status-success=ci/centos/mini-e2e/k8s-1.25"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.28"
- "status-success=ci/centos/mini-e2e-helm/k8s-1.29"
- "status-success=ci/centos/mini-e2e/k8s-1.26"
- "status-success=ci/centos/mini-e2e/k8s-1.27"
- "status-success=ci/centos/mini-e2e/k8s-1.28"
- "status-success=ci/centos/mini-e2e/k8s-1.29"
- "status-success=ci/centos/upgrade-tests-cephfs"
- "status-success=ci/centos/upgrade-tests-rbd"
- "status-success=DCO"
Expand Down Expand Up @@ -385,23 +394,23 @@ pull_request_rules:
name: default
delete_head_branch: {}

- name: backport patches to release-v3.9 branch
- name: backport patches to release-v3.10 branch
conditions:
- base=devel
- label=backport-to-release-v3.9
- label=backport-to-release-v3.10
actions:
backport:
branches:
- release-v3.9
- release-v3.10

- name: backport patches to release-v3.10 branch
- name: backport patches to release-v3.11 branch
conditions:
- base=devel
- label=backport-to-release-v3.10
- label=backport-to-release-v3.11
actions:
backport:
branches:
- release-v3.10
- release-v3.11

- name: remove outdated approvals on ci/centos
conditions:
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ environments.

| Ceph CSI Version | Container Orchestrator Name | Version Tested |
| -----------------| --------------------------- | -------------------|
| v3.11.0 | Kubernetes | v1.26, v1.27, v1.28, v1.29|
| v3.10.2 | Kubernetes | v1.26, v1.27, v1.28|
| v3.10.1 | Kubernetes | v1.26, v1.27, v1.28|
| v3.10.0 | Kubernetes | v1.26, v1.27, v1.28|
| v3.9.0 | Kubernetes | v1.25, v1.26, v1.27|

There is work in progress to make this CO-independent and thus
support other orchestration environments (Nomad, Mesos..etc).
Expand Down Expand Up @@ -128,11 +130,14 @@ in the Kubernetes documentation.
| Ceph CSI Release/Branch | Container image name | Image Tag |
| ----------------------- | ---------------------------- | --------- |
| devel (Branch) | quay.io/cephcsi/cephcsi | canary |
| v3.11.0 (Release) | quay.io/cephcsi/cephcsi | v3.11.0 |
| v3.10.2 (Release) | quay.io/cephcsi/cephcsi | v3.10.2 |
| v3.10.1 (Release) | quay.io/cephcsi/cephcsi | v3.10.1 |
| v3.10.0 (Release) | quay.io/cephcsi/cephcsi | v3.10.0 |
| v3.9.0 (Release) | quay.io/cephcsi/cephcsi | v3.9.0 |

| Deprecated Ceph CSI Release/Branch | Container image name | Image Tag |
| ----------------------- | --------------------------------| --------- |
| v3.9.0 (Release) | quay.io/cephcsi/cephcsi | v3.9.0 |
| v3.8.1 (Release) | quay.io/cephcsi/cephcsi | v3.8.1 |
| v3.8.0 (Release) | quay.io/cephcsi/cephcsi | v3.8.0 |
| v3.7.2 (Release) | quay.io/cephcsi/cephcsi | v3.7.2 |
Expand Down
2 changes: 1 addition & 1 deletion actions/retest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG WORK_DIR="/home/src"
ARG BASE_IMAGE="golang:1.18"
ARG BASE_IMAGE="golang:1.21"

FROM ${BASE_IMAGE} as builder

Expand Down
14 changes: 2 additions & 12 deletions actions/retest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"fmt"
"log"
"os"
"slices"
"strconv"
"strings"

Expand Down Expand Up @@ -145,7 +146,7 @@ func main() {
failedTestFound := false
for _, r := range statusList {
log.Printf("found context %s with status %s\n", r.GetContext(), r.GetState())
if contains([]string{"failed", "failure"}, r.GetState()) {
if slices.Contains([]string{"failed", "failure"}, r.GetState()) {
log.Printf("found failed test %s\n", r.GetContext())
failedTestFound = true
// rebase the pr if it is behind the devel branch.
Expand Down Expand Up @@ -253,17 +254,6 @@ func (c *retestConfig) checkRetestLimitReached(prNumber int, msg string) (bool,
return false, nil
}

// containers check if slice contains string.
func contains(s []string, e string) bool {
for _, a := range s {
if a == e {
return true
}
}

return false
}

// filterStatusesList returns list of unique and recently updated github RepoStatuses.
// Raw github RepoStatus list may contain duplicate and older statuses.
func filterStatusList(rawStatusList []*github.RepoStatus) []*github.RepoStatus {
Expand Down
24 changes: 13 additions & 11 deletions docs/ceph-csi-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- [Pre-upgrade considerations](#pre-upgrade-considerations)
- [Snapshot-controller and snapshot crd](#snapshot-controller-and-snapshot-crd)
- [Upgrading from previous releases](#upgrading-from-previous-releases)
- [Upgrading from v3.9 to v3.10](#upgrading-from-v39-to-v310)
- [Upgrading from v3.10 to v3.11](#upgrading-from-v310-to-v311)
- [Upgrading CephFS](#upgrading-cephfs)
- [1. Upgrade CephFS Provisioner resources](#1-upgrade-cephfs-provisioner-resources)
- [1.1 Update the CephFS Provisioner RBAC](#11-update-the-cephfs-provisioner-rbac)
Expand Down Expand Up @@ -49,7 +49,7 @@ To avoid this issue in future upgrades, we recommend that you do not use the
fuse client as of now.

This guide will walk you through the steps to upgrade the software in a cluster
from v3.9 to v3.10
from v3.10 to v3.11

### Snapshot-controller and snapshot crd

Expand Down Expand Up @@ -77,8 +77,10 @@ To upgrade from previous releases, refer to the following:
to upgrade from cephcsi v3.7 to v3.8
- [upgrade-from-v3.8-v3.9](https://github.com/ceph/ceph-csi/blob/v3.9.0/docs/ceph-csi-upgrade.md)
to upgrade from cephcsi v3.8 to v3.9
- [upgrade-from-v3.9-v3.10](https://github.com/ceph/ceph-csi/blob/v3.10.0/docs/ceph-csi-upgrade.md)
to upgrade from cephcsi v3.9 to v3.10

## Upgrading from v3.9 to v3.10
## Upgrading from v3.10 to v3.11

**Ceph-csi releases from devel are expressly unsupported.** It is strongly
recommended that you use [official
Expand All @@ -88,19 +90,19 @@ that will not be supported in the official releases. Builds from the devel
branch can have functionality changed and even removed at any time without
compatibility support and without prior notice.

**Also, we do not recommend any direct upgrades to 3.10 except from 3.9 to 3.10.**
For example, upgrading from 3.8 to 3.10 is not recommended.
**Also, we do not recommend any direct upgrades to 3.11 except from 3.10 to 3.11.**
For example, upgrading from 3.8 to 3.11 is not recommended.

**Refer to the Breaking Changes Section in the
[release notes](https://github.com/ceph/ceph-csi/releases/tag/v3.10.0) before
[release notes](https://github.com/ceph/ceph-csi/releases/tag/v3.11.0) before
proceeding further.**

git checkout v3.10.0 tag
git checkout v3.11.0 tag

```bash
git clone https://github.com/ceph/ceph-csi.git
cd ./ceph-csi
git checkout v3.10.0
git checkout v3.11.0
```

```console
Expand Down Expand Up @@ -222,7 +224,7 @@ For each node:
- The pod deletion causes the pods to be restarted and updated automatically
on the node.

we have successfully upgraded cephfs csi from v3.9 to v3.10
we have successfully upgraded cephfs csi from v3.10 to v3.11

### Upgrading RBD

Expand Down Expand Up @@ -286,7 +288,7 @@ daemonset.apps/csi-rbdplugin configured
service/csi-metrics-rbdplugin configured
```

we have successfully upgraded RBD csi from v3.9 to v3.10
we have successfully upgraded RBD csi from v3.10 to v3.11

### Upgrading NFS

Expand Down Expand Up @@ -348,7 +350,7 @@ daemonset.apps/csi-nfsplugin configured
service/csi-metrics-nfsplugin configured
```

we have successfully upgraded nfs csi from v3.9 to v3.10
we have successfully upgraded nfs csi from v3.10 to v3.11

### CSI Sidecar containers consideration

Expand Down
14 changes: 2 additions & 12 deletions e2e/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"context"
"fmt"
"os"
"slices"
"time"

appsv1 "k8s.io/api/apps/v1"
Expand Down Expand Up @@ -349,17 +350,6 @@ func waitForDeploymentUpdate(
return nil
}

// contains check if slice contains string.
func contains(s []string, e string) bool {
for _, a := range s {
if a == e {
return true
}
}

return false
}

func waitForContainersArgsUpdate(
c kubernetes.Interface,
ns,
Expand Down Expand Up @@ -398,7 +388,7 @@ func waitForContainersArgsUpdate(
}
cid := deployment.Spec.Template.Spec.Containers // cid: read as containers in deployment
for i := range cid {
if contains(containers, cid[i].Name) {
if slices.Contains(containers, cid[i].Name) {
match := false
for j, ak := range cid[i].Args {
if ak == key {
Expand Down
Loading

0 comments on commit b01dec5

Please sign in to comment.