Zhou Zheng Sheng has uploaded a new change for review.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Fix iSCSI functional tests in Fedora 18
There are two fix.
1. modprobe iscsi_target_mod before running tests in Fedora 18
In Fedora 18, iscsi_target_mod is not loaded by default. If the module is not loaded, the rtslib will fail to configure iSCSI targets for the storage backend and the test will fail. This patch load the module explicitly before running the tests.
2. Wait for some time for VDSM to refreshing the device list
If two iSCSI tests are arranged back to back, we should wait for VDSM to refresh the iSCSI session info. Otherwise the _getIqnDevs method fails.
Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Signed-off-by: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com --- M tests/functional/xmlrpcTests.py M tests/testrunner.py 2 files changed, 12 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/12594/1
diff --git a/tests/functional/xmlrpcTests.py b/tests/functional/xmlrpcTests.py index 95f06a8..54a66b5 100644 --- a/tests/functional/xmlrpcTests.py +++ b/tests/functional/xmlrpcTests.py @@ -48,6 +48,7 @@ raise SkipTest("XML-RPC Bindings are disabled")
_mkinitrd = CommandPath("mkinird", "/usr/bin/mkinitrd") +_modprobe = CommandPath("modprobe", "/usr/sbin/modprobe")
def readableBy(filePath, user): @@ -424,8 +425,13 @@
class IscsiServer(BackendServer): def __init__(self, vdsmServer, asserts): + # check if the system supports configuring iSCSI target if not "rtslib" in globals().keys(): raise SkipTest("python-rtslib is not installed.") + + cmd = [_modprobe.cmd, "iscsi_target_mod"] + rc, out, err = execCmd(cmd, sudo=True) + asserts.assertEquals(rc, 0)
super(IscsiServer, self).__init__(vdsmServer, asserts) self.address = '127.0.0.1' @@ -506,13 +512,16 @@ iqnDevs[iqn] = dev['GUID'] break else: - raise RuntimeError( + raise AssertionError( 'Can not find related device of iqn %s' % iqn) return iqnDevs
def _genTypeSpecificArgs(self, connections, rollback): iqns = [conn['params']['iqn'] for conn in connections.itervalues()] - iqnDevs = self._getIqnDevs(iqns) + # If two iSCSI tests are run back to back, it takes VDSM some time to + # refresh the iSCSI session info. + iqnDevs = self.asserts.retryAssert(partial(self._getIqnDevs, iqns), + timeout=30)
args = {} for uuid, conn in connections.iteritems(): diff --git a/tests/testrunner.py b/tests/testrunner.py index 2c55a51..f58011a 100644 --- a/tests/testrunner.py +++ b/tests/testrunner.py @@ -134,7 +134,7 @@ # hackVdsmModule() is called. Do not import it at the # module level. from vdsm.utils import retry - retry(expectedException=AssertionError, *args, **kwargs) + return retry(expectedException=AssertionError, *args, **kwargs)
def assertRaises(self, excClass, callableObj=None, *args, **kwargs): # FIXME: This is a forward port of the assertRaises from python
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/596/ (2/3)
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1488/ (1/3)
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1449/ (3/3)
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Patch Set 1:
Build Started http://alterway01.ovirt.org/job/vdsm_unit_tests_gerrit/1466/ (1/2)
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Patch Set 1:
Build Started http://alterway01.ovirt.org/job/vdsm_pep8_gerrit/1429/ (2/2)
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Patch Set 1: Verified
Build Successful
http://alterway01.ovirt.org/job/vdsm_pep8_gerrit/1429/ : SUCCESS
http://alterway01.ovirt.org/job/vdsm_unit_tests_gerrit/1466/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Patch Set 1: No score
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1449/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1488/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/596/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Zhou Zheng Sheng has posted comments on this change.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Patch Set 1: Verified
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1489/ (1/2)
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1452/ (2/2)
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Patch Set 2: Verified
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1489/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1452/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Patch Set 2: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Fix iSCSI functional tests in Fedora 18 ......................................................................
Fix iSCSI functional tests in Fedora 18
There are two fix.
1. modprobe iscsi_target_mod before running tests in Fedora 18
In Fedora 18, iscsi_target_mod is not loaded by default. If the module is not loaded, the rtslib will fail to configure iSCSI targets for the storage backend and the test will fail. This patch load the module explicitly before running the tests.
2. Wait for some time for VDSM to refreshing the device list
If two iSCSI tests are arranged back to back, we should wait for VDSM to refresh the iSCSI session info. Otherwise the _getIqnDevs method fails.
Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Signed-off-by: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com --- M tests/functional/xmlrpcTests.py M tests/testrunner.py 2 files changed, 13 insertions(+), 4 deletions(-)
Approvals: oVirt Jenkins CI Server: Verified Dan Kenigsberg: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/12594 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: If0ffd21cbf0b68fa19e4f9a84e399bf2c75039bc Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org