Bug 802229 - VDSM: connectStorageServer API is broken
Summary: VDSM: connectStorageServer API is broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: unspecified
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: ---
: 3.3.4
Assignee: Saggi Mizrahi
QA Contact:
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-12 07:41 UTC by Avi Tal
Modified: 2016-04-22 04:59 UTC (History)
11 users (show)

Fixed In Version: vdsm-4.9.6-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-09 07:57:47 UTC
oVirt Team: Storage


Attachments (Terms of Use)
vdsm log (542.84 KB, application/x-xz)
2012-03-12 07:41 UTC, Avi Tal
no flags Details

Description Avi Tal 2012-03-12 07:41:06 UTC
Created attachment 569294 [details]
vdsm log

Description of problem:
rpm -q vdsm
vdsm-4.9.6-0.4.git8892d1a.fc16.x86_64 

There are ValueError exceptions when calling  connectStorageServer
from cleanup:

Thread-42::INFO::2012-03-10
02:31:14,302::logUtils::37::dispatcher::(wrapper) Run and protect:
connectStorageServer(domType=3, spUUID='0f5188ee-b0aa-49b1-83cf-
98915a27c517', conList=[{'connection':
'shafan.eng.lab.tlv.redhat.com', 'iqn':
'iqn.2012-02.com.redhat:ci-iscsi-ovirt-03', 'portal':
'shafan.eng.lab.tlv.redhat
.com:3260', 'user': '', 'password': '******', 'id':
'2f80f42f-2cda-48c7-91ed-31bc6f4bd835', 'port': '3260'}],
options=None)
Thread-42::ERROR::2012-03-10
02:31:14,302::task::853::TaskManager.Task::(_setError)
Task=`b321f23c-a12b-4b88-b079-b2fbbf98b2e1`::Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 861, in _run
    return fn(*args, **kargs)
  File "/usr/share/vdsm/logUtils.py", line 38, in wrapper
    res = f(*args, **kwargs)
  File "/usr/share/vdsm/storage/hsm.py", line 1889, in connectStorageServer
    conInfo = _connectionDict2ConnectionInfo(domType, conDef)
  File "/usr/share/vdsm/storage/hsm.py", line 165, in
_connectionDict2ConnectionInfo
    int(conDict.get('portal', None)),
ValueError: invalid literal for int() with base 10:
'shafan.eng.lab.tlv.redhat.com:3260'
Thread-42::DEBUG::2012-03-10
02:31:14,304::task::872::TaskManager.Task::(_run)
Task=`b321f23c-a12b-4b88-b079-b2fbbf98b2e1`::Task._run:
b321f23c-a12b-4b88-b079-b2fbbf98b2e1 (3,
'0f5188ee-b0aa-49b1-83cf-98915a27c517', [{'id':
'2f80f42f-2cda-48c7-91ed-31bc6f4bd835', 'connection':
'shafan.eng.lab.tlv.redhat.com', 'iqn':
'iqn.2012-02.com.redhat:ci-iscsi-ovirt-03', 'portal':
'shafan.eng.lab.tlv.redhat.com:3260', 'user': '', 'password': '',
'port': '3260'}]) {} failed - stopping task

...

Thread-42::ERROR::2012-03-10
02:31:14,310::dispatcher::92::Storage.Dispatcher.Protect::(run)
invalid literal for int() with base 10:
'shafan.eng.lab.tlv.redhat.com:3260'
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/dispatcher.py", line 84, in run
    result = ctask.prepare(self.func, *args, **kwargs)
  File "/usr/share/vdsm/storage/task.py", line 1164, in prepare
    raise self.error
ValueError: invalid literal for int() with base 10:
'shafan.eng.lab.tlv.redhat.com:3260'

Comment 1 Saggi Mizrahi 2012-03-12 19:37:51 UTC
http://gerrit.ovirt.org/2753

Comment 2 Avi Tal 2012-03-13 10:51:42 UTC
Failed 

conList=[{'connection': 'shafan.eng.lab.tlv.redhat.com', 'iqn': 'iqn.2012-02.com.redhat:ci-iscsi-ovirt-07', 'portal': 'shafan.eng.lab.tlv.redhat
.com:3260', 'user': '', 'password': '******', 'id': '46878781-8e9e-4168-8c48-d59902062b18', 'port': '3260'}], options=None)
Thread-17::ERROR::2012-03-13 10:46:34,605::task::853::TaskManager.Task::(_setError) Task=`6bbc0042-a1c9-4ef5-beca-dae133ec5bdf`::Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 861, in _run
    return fn(*args, **kargs)
  File "/usr/share/vdsm/logUtils.py", line 38, in wrapper
    res = f(*args, **kwargs)
  File "/usr/share/vdsm/storage/hsm.py", line 1895, in connectStorageServer
    conInfo = _connectionDict2ConnectionInfo(domType, conDef)
  File "/usr/share/vdsm/storage/hsm.py", line 166, in _connectionDict2ConnectionInfo
    tpgt = int(tpgt)
ValueError: invalid literal for int() with base 10: 'shafan.eng.lab.tlv.redhat.com:3260'

Comment 3 Avi Tal 2012-03-13 10:52:48 UTC
^ after merging http://gerrit.ovirt.org/2753

Comment 4 Saggi Mizrahi 2012-03-13 14:13:24 UTC
You are sending 'shafan.eng.lab.tlv.redhat.com:3260' as the portal arg which is wrong.

Even though one might think that portal represents the iscsi portal it actually doesn't it represents the target portal group tag (tpgt).

The new API fixes taht and iscsi portal is "portal" and the iscsi tpgt is "tpgt".

In any case, this means that you are passing an invalid arg (not int).

This is not a bug.

Comment 5 Itamar Heim 2012-08-09 07:57:47 UTC
closing ON_QA bugs as oVirt 3.1 was released:
http://www.ovirt.org/get-ovirt/


Note You need to log in before you can comment on or make changes to this bug.