You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2025/10/14 13:09:05 UTC

(cloudstack) branch DaanHoogland-patch-6 created (now f2f3f71e74a)

This is an automated email from the ASF dual-hosted git repository.

dahn pushed a change to branch DaanHoogland-patch-6
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


      at f2f3f71e74a Enhance NFS mount option check for empty response

This branch includes the following new commits:

     new f2f3f71e74a Enhance NFS mount option check for empty response

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(cloudstack) 01/01: Enhance NFS mount option check for empty response

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch DaanHoogland-patch-6
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit f2f3f71e74a31eefd214b6edb27f31ed00bc4302
Author: dahn <da...@onecht.net>
AuthorDate: Tue Oct 14 15:08:57 2025 +0200

    Enhance NFS mount option check for empty response
    
    ```
    ERROR: test suite for <class 'tests.component.maint.test_primary_storage_nfsmountopts_kvm.TestNFSMountOptsKVM'>
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/usr/local/lib/python3.9/site-packages/nose/suite.py", line 210, in run
        self.setUp()
      File "/usr/local/lib/python3.9/site-packages/nose/suite.py", line 293, in setUp
        self.setupContext(ancestor)
      File "/usr/local/lib/python3.9/site-packages/nose/suite.py", line 316, in setupContext
        try_run(context, names)
      File "/usr/local/lib/python3.9/site-packages/nose/util.py", line 471, in try_run
        return func()
      File "/marvin/tests/component/maint/test_primary_storage_nfsmountopts_kvm.py", line 46, in setUpClass
        cls.version = cls.getNFSMountOptionForPool(cls, "vers", cls.storage_pool.id)
      File "/marvin/tests/component/maint/test_primary_storage_nfsmountopts_kvm.py", line 115, in getNFSMountOptionForPool
        stat = nfsstat[0]
    IndexError: list index out of range
    ```
    
    because
    
    ```
    shClient: DEBUG: {Cmd: nfsstat -m | sed -n '/e08df33d-d187-3c1c-88f4-10c69669f41a/{ n; p }' via Host: 10.0.32.210} {returns: []}
    ```
---
 .../component/maint/test_primary_storage_nfsmountopts_kvm.py            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/integration/component/maint/test_primary_storage_nfsmountopts_kvm.py b/test/integration/component/maint/test_primary_storage_nfsmountopts_kvm.py
index f2ad18188ca..21aee0cc717 100644
--- a/test/integration/component/maint/test_primary_storage_nfsmountopts_kvm.py
+++ b/test/integration/component/maint/test_primary_storage_nfsmountopts_kvm.py
@@ -110,7 +110,7 @@ class TestNFSMountOptsKVM(cloudstackTestCase):
     def getNFSMountOptionForPool(self, option, poolId):
         nfsstat_cmd = "nfsstat -m | sed -n '/%s/{ n; p }'" % poolId
         nfsstat = self.sshClient.execute(nfsstat_cmd)
-        if (nfsstat == None):
+        if nfsstat == None or len(nfsstat) == 0:
             return None
         stat = nfsstat[0]
         vers = stat[stat.find(option):].split("=")[1].split(",")[0]