Skip to content

Commit

Permalink
ci: skip enabling nfs modele in e2e
Browse files Browse the repository at this point in the history
As we dont need to enable nfs modules
in ceph v16.2.8 onwards skipping this one.

Because of this one we have a regression
in nfs export

Signed-off-by: Madhu Rajanna <[email protected]>
  • Loading branch information
Madhu-1 committed Aug 21, 2023
1 parent 3e17be7 commit 94bae30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 43 deletions.
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

0 comments on commit 94bae30

Please sign in to comment.