Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebase: update ceph to reef #4030

Merged
merged 6 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build.env
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ CSI_IMAGE_VERSION=canary
CSI_UPGRADE_VERSION=v3.9.0

# Ceph version to use
BASE_IMAGE=quay.io/ceph/ceph:v17
CEPH_VERSION=quincy
BASE_IMAGE=quay.io/ceph/ceph:v18
CEPH_VERSION=reef

# standard Golang options
GOLANG_VERSION=1.20.4
Expand Down Expand Up @@ -49,9 +49,9 @@ VM_DRIVER=none
CHANGE_MINIKUBE_NONE_USER=true

# Rook options
ROOK_VERSION=v1.10.9
ROOK_VERSION=v1.12.1
# Provide ceph image path
ROOK_CEPH_CLUSTER_IMAGE=quay.io/ceph/ceph:v17
ROOK_CEPH_CLUSTER_IMAGE=quay.io/ceph/ceph:v18

# CSI sidecar version
CSI_ATTACHER_VERSION=v4.3.0
Expand Down
7 changes: 4 additions & 3 deletions deploy/cephcsi/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ ARG BASE_IMAGE

FROM ${BASE_IMAGE} as updated_base

# TODO: remove the following cmd, when issue
# https://github.com/ceph/ceph-container/issues/2034 is fixed.
# TODO: remove the following cmd, when issues
# https://github.com/ceph/ceph-container/issues/2034
# https://github.com/ceph/ceph-container/issues/2141 are fixed.
RUN dnf config-manager --disable \
tcmu-runner,tcmu-runner-source,tcmu-runner-noarch,ceph-iscsi || true
tcmu-runner,tcmu-runner-source,tcmu-runner-noarch,ceph-iscsi,ganesha || true

RUN dnf -y update --nobest \
&& dnf clean all \
Expand Down
34 changes: 0 additions & 34 deletions e2e/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,40 +268,6 @@ func (yrn *yamlResourceNamespaced) Do(action kubectlAction) error {
return nil
}

type rookNFSResource struct {
f *framework.Framework
modules []string
orchBackend string
}

func (rnr *rookNFSResource) Do(action kubectlAction) error {
if action != kubectlCreate {
// we won't disabled modules
return nil
}

for _, module := range rnr.modules {
cmd := fmt.Sprintf("ceph mgr module enable %s", module)
_, _, err := execCommandInToolBoxPod(rnr.f, cmd, rookNamespace)
if err != nil {
// depending on the Ceph/Rook version, modules are
// enabled by default
framework.Logf("enabling module %q failed: %v", module, err)
}
}

if rnr.orchBackend != "" {
// this is not required for all Rook versions, allow failing
cmd := fmt.Sprintf("ceph orch set backend %s", rnr.orchBackend)
_, _, err := execCommandInToolBoxPod(rnr.f, cmd, rookNamespace)
if err != nil {
framework.Logf("setting orch backend %q failed: %v", rnr.orchBackend, err)
}
}

return nil
}

func waitForDeploymentUpdateScale(
c kubernetes.Interface,
ns,
Expand Down
13 changes: 4 additions & 9 deletions e2e/nfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ func deployNFSPlugin(f *framework.Framework) {
framework.Failf("failed to create pool for NFS config %q: %v", nfsPoolName, err)
}

createORDeleteNFSResources(f, kubectlCreate)
createORDeleteNFSResources(kubectlCreate)
}

func deleteNFSPlugin() {
createORDeleteNFSResources(nil, kubectlDelete)
createORDeleteNFSResources(kubectlDelete)
}

func createORDeleteNFSResources(f *framework.Framework, action kubectlAction) {
func createORDeleteNFSResources(action kubectlAction) {
cephConfigFile := getConfigFile(cephConfconfigMap, deployPath, examplePath)
resources := []ResourceDeployer{
// shared resources
Expand Down Expand Up @@ -112,12 +112,7 @@ func createORDeleteNFSResources(f *framework.Framework, action kubectlAction) {
filename: nfsDirPath + nfsNodePlugin,
namespace: cephCSINamespace,
},
// NFS-export management by Rook
&rookNFSResource{
f: f,
modules: []string{"rook", "nfs"},
orchBackend: "rook",
},
// NFS server deployment
&yamlResourceNamespaced{
filename: nfsExamplePath + nfsRookCephNFS,
namespace: rookNamespace,
Expand Down
6 changes: 3 additions & 3 deletions e2e/rbd_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,13 +827,13 @@ func createPool(f *framework.Framework, name string) error {
pgCount = 128
size = 1
)
// ceph osd pool create replicapool
cmd := fmt.Sprintf("ceph osd pool create %s %d", name, pgCount)
// ceph osd pool create name
cmd := fmt.Sprintf("ceph osd pool create %s %d --yes-i-really-mean-it", name, pgCount)
_, _, err := execCommandInToolBoxPod(f, cmd, rookNamespace)
if err != nil {
return err
}
// ceph osd pool set replicapool size 1
// ceph osd pool set name size 1
cmd = fmt.Sprintf("ceph osd pool set %s size %d --yes-i-really-mean-it", name, size)
_, _, err = execCommandInToolBoxPod(f, cmd, rookNamespace)

Expand Down
3 changes: 3 additions & 0 deletions examples/nfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ making configuring the Ceph cluster a minimal effort.
Ceph does not enable the NFS-service by default. In order for Rook Ceph to be
able to configure NFS-exports, the NFS-service needs to be configured first.

- Required for Ceph v16.2.7 and below
- Optional for Ceph v16.2.8 and above

In the [Rook Toolbox][rook_toolbox], run the following commands:

```console
Expand Down