Bug 1488892

Summary: iscsi re-scan is executed multiple times at connectStorageServer
Product: [oVirt] vdsm Reporter: guy chen <guchen>
Component: GeneralAssignee: Fred Rolland <frolland>
Status: CLOSED CURRENTRELEASE QA Contact: guy chen <guchen>
Severity: high Docs Contact:
Priority: medium    
Version: 4.19.17CC: amureini, bugs, ratamir, tnisan
Target Milestone: ovirt-4.2.1Keywords: Performance
Target Release: 4.20.10Flags: rule-engine: ovirt-4.2+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v4.20.10 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-29 10:46:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1467818, 1468439    

Description guy chen 2017-09-06 12:12:23 UTC
Description of problem:
At hsm.py there is a for loop that go over each iscsi session.
In the loop there is a full iscsi scan : iscsiadm -m session -R
Since it is a full scan (no SID attached to the command) it scans all the sessions thus need to remove the for loop to avoid additional scans that are not needed.

Version-Release number of selected component (if applicable):
VDSM 4.19.17

How reproducible:
Always

Steps to Reproduce:
1.execute connectStorageServer on a system with 4 iscsi targets
2.see that full iscsi scans is executed 4 times

Actual results:
4 full iscsi scans is executed 

Expected results:
Only one full iscsi scan is executed in connectStorageServer


Additional info:
The code section -

        for conDef in conList:
            conInfo = _connectionDict2ConnectionInfo(domType, conDef)
            conObj = storageServer.ConnectionFactory.createConnection(conInfo)
            try:
                self._connectStorageOverIser(conDef, conObj, domType)
                conObj.connect()
            except Exception as err:
                self.log.error(
                    "Could not connect to storageServer", exc_info=True)
                status, _ = self._translateConnectionError(err)
            else:
                status = 0
                # In case there were changes in devices size
                # while the VDSM was not connected, we need to
                # call refreshStorage.
                if domType in (sd.FCP_DOMAIN, sd.ISCSI_DOMAIN):
                    sdCache.refreshStorage()

Comment 2 Sandro Bonazzola 2018-03-29 10:46:22 UTC
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.