This 'SERVER_ALREADY_EXISTS' error occurs only if we tries to create a server which is already exists: I am able to get this error using standalone script
# creating a server which is already EXISTS -- ERROR
>>> server_info = cl.createServer("cld6b2", "iqn.1993-08.org.debian:01:686b42f5dcc8")
/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py:857: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/hpelefthandclient/client.py", line 263, in createServer
response, body = self.http.post('/servers', body=info)
File "/usr/local/lib/python2.7/dist-packages/hpelefthandclient/http.py", line 343, in post
return self._cs_request(url, 'POST', **kwargs)
File "/usr/local/lib/python2.7/dist-packages/hpelefthandclient/http.py", line 291, in _cs_request
**kwargs)
File "/usr/local/lib/python2.7/dist-packages/hpelefthandclient/http.py", line 267, in _time_request
resp, body = self.request(url, method, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/hpelefthandclient/http.py", line 261, in request
raise exceptions.from_response(resp, body)
hpelefthandclient.exceptions.HTTPServerError: Error (HTTP 500) SERVER_ALREADY_EXISTS - The server with the name "$1" already exists. Use a unique name and try again.
This 'SERVER_ ALREADY_ EXISTS' error occurs only if we tries to create a server which is already exists: I am able to get this error using standalone script
# creating NEW server ("cld6b2" , "iqn.1993- 08.org. debian: 01:686b42f5dcc8 ") ter': False, u'chapTargetSec ret': u'', u'iscsiEnabled': True, u'modified': u'', u'iscsiIQN': u'iqn.1993- 08.org. debian: 01:686b42f5dcc8 ', u'id': 5904, u'wwnnList': [], u'wwpnList': [], u'chapInitiator Secret' : u'', u'type': u'server', u'bootVolumeID': 0, u'iscsiLoadBala ncingEnabled' : True, u'description': u'', u'chapName': u'', u'chapAuthentic ationRequired' : False, u'bootVolumeLun': 0, u'controllingSe rverName' : u'', u'fibreChannelE nabled' : False, u'name': u'cld6b2', u'created': u'', u'uri': u'/lhos/ servers/ 5904', u'fibreChannelP aths': None}
server_info = cl.createServer
>>> server_info
{u'inServerClus
# creating a server which is already EXISTS -- ERROR ("cld6b2" , "iqn.1993- 08.org. debian: 01:686b42f5dcc8 ") lib/python2. 7/dist- packages/ urllib3/ connectionpool. py:857: InsecureRequest Warning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https:/ /urllib3. readthedocs. io/en/latest/ advanced- usage.html# ssl-warnings stWarning) lib/python2. 7/dist- packages/ hpelefthandclie nt/client. py", line 263, in createServer post('/ servers' , body=info) lib/python2. 7/dist- packages/ hpelefthandclie nt/http. py", line 343, in post request( url, 'POST', **kwargs) lib/python2. 7/dist- packages/ hpelefthandclie nt/http. py", line 291, in _cs_request lib/python2. 7/dist- packages/ hpelefthandclie nt/http. py", line 267, in _time_request lib/python2. 7/dist- packages/ hpelefthandclie nt/http. py", line 261, in request from_response( resp, body) nt.exceptions. HTTPServerError : Error (HTTP 500) SERVER_ ALREADY_ EXISTS - The server with the name "$1" already exists. Use a unique name and try again.
>>> server_info = cl.createServer
/usr/local/
InsecureReque
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/
response, body = self.http.
File "/usr/local/
return self._cs_
File "/usr/local/
**kwargs)
File "/usr/local/
resp, body = self.request(url, method, **kwargs)
File "/usr/local/
raise exceptions.
hpelefthandclie
------- ------- ------- ------- ----
This will not occurs via VSA driver path flow as it first check the existence of server: /github. com/openstack/ cinder/ blob/master/ cinder/ volume/ drivers/ hpe/hpe_ lefthand_ iscsi.py# L964 /github. com/openstack/ cinder/ blob/master/ cinder/ volume/ drivers/ hpe/hpe_ lefthand_ iscsi.py# L985
if server exists:
# it returns and uses that server
# code reference - https:/
else:
# it creates a new server
# code reference - https:/