]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
qa: fix issue with fn unable to fetch port and ip
authordparmar18 <dparmar@redhat.com>
Fri, 24 Feb 2023 21:29:24 +0000 (02:59 +0530)
committerDhairya Parmar <dparmar@redhat.com>
Fri, 31 Mar 2023 08:12:47 +0000 (13:42 +0530)
commitacb6e9265e2f332d78759e3e3a471fd4229c485f
tree9ce29462c79f024cedbfd88052605f0898ba295a
parentecc90b8f116260b4c12382ddc7e7596d07043b96
qa: fix issue with fn unable to fetch port and ip

_get_port_ip_info() fails to fetch port and ip due to empty 'backend' key:

2023-02-24T20:49:09.084 DEBUG:teuthology.orchestra.run.smithi042:> sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage timeout 120 ceph --cluster ceph nfs cluster info test
2023-02-24T20:49:09.471 INFO:teuthology.orchestra.run.smithi042.stdout:{
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout:  "test": {
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout:    "backend": [],
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout:    "virtual_ip": null
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout:  }
2023-02-24T20:49:09.472 INFO:teuthology.orchestra.run.smithi042.stdout:}

it then raises:

2023-02-24T20:49:10.323 INFO:tasks.cephfs_test_runner:    info_output = json.loads(self._nfs_cmd('cluster', 'info', self.cluster_id))['test']['backend'][0]
2023-02-24T20:49:10.323 INFO:tasks.cephfs_test_runner:IndexError: list index out of range

Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
(cherry picked from commit 310286fa185194fdd27bfe7692d516703e18fa11)
qa/tasks/cephfs/test_nfs.py