--- /opt/xensource/sm/ISCSISR.py.back 2011-05-20 17:07:20.000000000 +0400 +++ /opt/xensource/sm/ISCSISR.py 2011-05-20 22:23:32.000000000 +0400 @@ -258,15 +258,26 @@ # Check to see if auto attach was set if not iscsilib._checkTGT(self.targetIQN): try: - map = iscsilib.discovery(self.target, self.port, self.chapuser, \ - self.chappassword, targetIQN=self.targetIQN) + map=[] + for portal in self.targetlist.split(','): + if ':' in portal: + target,port=portal.split(':') + else: + target=portal + port=DEFAULT_PORT + + try: + target=socket.gethostbyname(target) + map.extend(iscsilib.discovery(target, port, self.chapuser, \ + self.chappassword, targetIQN=self.targetIQN)) + except: + pass iqn = '' if len(map) == 0: self._scan_IQNs()