From ddea97ebde633fe13c53be5d2e5faf8cb98b86e9 Mon Sep 17 00:00:00 2001 From: parth-gr Date: Wed, 14 Sep 2022 20:30:38 +0530 Subject: [PATCH] nfs: fix nfs if multus is enabled Closes: https://github.com/rook/rook/issues/10812 Signed-off-by: parth-gr --- .github/workflows/canary-integration-test.yml | 5 ++++- pkg/daemon/ceph/client/command.go | 7 +++++-- tests/scripts/github-action-helper.sh | 8 ++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/canary-integration-test.yml b/.github/workflows/canary-integration-test.yml index 2059d4ab9..bc81db9c1 100644 --- a/.github/workflows/canary-integration-test.yml +++ b/.github/workflows/canary-integration-test.yml @@ -1394,6 +1394,9 @@ jobs: - name: wait for ceph-csi configmap to be updated with network namespace run: tests/scripts/github-action-helper.sh wait_for_ceph_csi_configmap_to_be_updated + - name: wait for cephnfs to be ready + run: IS_POD_NETWORK=true IS_MULTUS=true tests/scripts/github-action-helper.sh wait_for_ceph_to_be_ready nfs 1 + - name: test ceph-csi-rbd plugin restart run: tests/scripts/github-action-helper.sh test_csi_rbd_workload @@ -1421,7 +1424,7 @@ jobs: - name: set up tmate session for debugging if: failure() && env.USE_TMATE uses: mxschmitt/action-tmate@v3 - timeout-minutes: 60 + timeout-minutes: 600 csi-hostnetwork-disabled: runs-on: ubuntu-20.04 diff --git a/pkg/daemon/ceph/client/command.go b/pkg/daemon/ceph/client/command.go index f818eb955..760a2c31d 100644 --- a/pkg/daemon/ceph/client/command.go +++ b/pkg/daemon/ceph/client/command.go @@ -182,8 +182,11 @@ func (c *CephToolCommand) run() ([]byte, error) { if command == RBDTool || command == RadosTool { if c.RemoteExecution { output, stderr, err = c.context.RemoteExecutor.ExecCommandInContainerWithFullOutputWithTimeout(c.clusterInfo.Context, ProxyAppLabel, CommandProxyInitContainerName, c.clusterInfo.Namespace, append([]string{command}, args...)...) - if stderr != "" || err != nil { - err = errors.Errorf("%s. %s", err.Error(), stderr) + if err != nil { + err = errors.Errorf("%s", err.Error()) + } + if stderr != "" { + err = errors.Errorf("%s", stderr) } } else if c.timeout == 0 { output, err = c.context.Executor.ExecuteCommandWithOutput(command, args...) diff --git a/tests/scripts/github-action-helper.sh b/tests/scripts/github-action-helper.sh index a8c8c3605..ef460f112 100755 --- a/tests/scripts/github-action-helper.sh +++ b/tests/scripts/github-action-helper.sh @@ -194,7 +194,7 @@ function validate_yaml() { function create_cluster_prerequisites() { # this might be called from another function that has already done a cd - ( cd deploy/examples && kubectl create -f crds.yaml -f common.yaml -f csi/nfs/rbac.yaml ) + (cd deploy/examples && kubectl create -f crds.yaml -f common.yaml -f csi/nfs/rbac.yaml) } function deploy_manifest_with_local_build() { @@ -479,7 +479,7 @@ function deploy_multus_cluster() { kubectl create -f cluster-multus-test.yaml kubectl create -f filesystem-test.yaml # uncomment once https://github.com/rook/rook/issues/10812 is resolved. - # kubectl create -f nfs-test.yaml + kubectl create -f nfs-test.yaml } function wait_for_ceph_csi_configmap_to_be_updated { @@ -495,8 +495,8 @@ until [[ $(kubectl -n rook-ceph get configmap rook-ceph-csi-config -o jsonpath=" sleep 5 done EOF -timeout 60 bash <