Nexenta driver doesn't use configurations in cinder.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Invalid
|
Medium
|
Unassigned |
Bug Description
Hi,
I just find that the nexenta driver doesn't work when creating volume,
and I found the following error messages in cinder-volume.log.
2013-05-14 14:26:04 INFO [cinder.service] Started child 25710
2013-05-14 14:26:04 AUDIT [cinder.service] Starting cinder-volume node (version 2013.1)
2013-05-14 14:26:14 ERROR [cinder.service] Unhandled exception
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
launcher.
File "/usr/lib/
server.start()
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
if not self.nms.
File "/usr/lib/
response_obj = urllib2.
File "/usr/lib/
return _opener.open(url, data, timeout)
File "/usr/lib/
response = self._open(req, data)
File "/usr/lib/
'_open', req)
File "/usr/lib/
result = func(*args)
File "/usr/lib/
return self.do_
File "/usr/lib/
raise URLError(err)
URLError: <urlopen error [Errno -2] Name or service not known>
Then I add some debug code in the function check_for_
the host IP is not setting right in the URL string.
I am sure my settings in cinder.conf is right. The following is the settings in my cinder.conf.
enabled_backends = nexenta
[nexenta]
volume_driver = cinder.
volume_backend_name = NexentaStor
nexenta_host = 10.144.138.101
nexenta_rest_port = 2000
nexenta_user = admin
nexenta_password = nexenta
nexenta_volume = cinder
So I try to figure it out what's happened, and here's what I found.
I compared the code of the function check_for_
I found that LVMVolumeDriver would call self.configurat
and use self.configuration to access the settings in the function check_for_
doesn't and use FLAGS instead.
Thus I tried modify the NexentaDriver using the same style accessing settings in LVMVolumeDriver and it worked.
I don't know whether this is a bug, hope you could check it and my patch is in attachment. Thanks.
Changed in cinder: | |
status: | New → Incomplete |
status: | Incomplete → New |
Changed in cinder: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in cinder: | |
status: | Invalid → Incomplete |
status: | Incomplete → Invalid |
Hi Blake,
Thank you for the patch although after I have an other errors in cinder-volumes.log:
2013-05-14 16:51:43 INFO [cinder.service] Child 2261 exited with status 2 volume. drivers. nexenta. jsonrpc] Auto switching to HTTPS connection to http:// 192.168. 11.161: 2000/rest/ nms/ python2. 7/dist- packages/ cinder/ service. py", line 224, in _start_child _child_ process( wrap.server) python2. 7/dist- packages/ cinder/ service. py", line 201, in _child_process run_server( server) python2. 7/dist- packages/ cinder/ service. py", line 95, in run_server python2. 7/dist- packages/ cinder/ service. py", line 342, in start manager. init_host( ) python2. 7/dist- packages/ cinder/ volume/ manager. py", line 143, in init_host driver. check_for_ setup_error( ) python2. 7/dist- packages/ cinder/ volume/ drivers/ nexenta/ volume. py", line 100, in check_for_ setup_error nexenta_ volume)
2013-05-14 16:51:43 INFO [cinder.service] Started child 2262
2013-05-14 16:51:43 AUDIT [cinder.service] Starting cinder-volume node (version 2013.1)
2013-05-14 16:51:43 INFO [cinder.
2013-05-14 16:51:43 ERROR [cinder.service] Unhandled exception
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
launcher.
File "/usr/lib/
server.start()
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
FLAGS.
LookupError: (u'Volume %s does not exist in Nexenta SA', 'cinder')
2013-05-14 16:51:43 INFO [cinder.service] Child 2262 exited with status 2
2013-05-14 16:51:43 INFO [cinder.service] Forking too fast, sleeping
I repaired in nexenta volume.py file to this:
def check_for_ setup_error( self):
"""Verify that the volume for our zvols exists.
:raise: :py:exc: `LookupError` volume. object_ exists( self.configurat ion.nexenta_ volume) : _("Volume %s does not exist in Nexenta SA"),
self. configuration. nexenta_ volume)
"""
if not self.nms.
raise LookupError(
2013-05-14 17:06:15 AUDIT [cinder.service] Starting cinder-volume node (version 2013.1) volume. drivers. nexenta. jsonrpc] Auto switching to HTTPS connection to http:// 192.168. 11.161: 2000/rest/ nms/ volume. manager] volume volume- 48a881d8- bbf5-44d1- 9b0d-9d9762d0e9 27: skipping export volume. manager] volume volume- 965ecf55- f7f9-4c35- a78e-814d7e47d1 ef: skipping export volume. manager] volume volume- c159177d- d1cc-4b7b- a8ae-905cc881b4 cb: skipping export volume. manager] volume volume- ecfc2d58- 766e-45eb- a885-b954f2d111 02: skipping export volume. manager] Updating volume status openstack. common. rpc.common] Connected to AMQP server on 192.168.10.11:5672 openstack. common. rpc.common] Connected to AMQP server on 192.168.10.11:5672 volume. manager] Updating volume status volume. manager] volume volume- be558ca1- 1007-48c6- 97e1-03ce2b745a fd: creating volume. driv...
2013-05-14 17:06:15 INFO [cinder.
2013-05-14 17:06:16 INFO [cinder.
2013-05-14 17:06:16 INFO [cinder.
2013-05-14 17:06:16 INFO [cinder.
2013-05-14 17:06:16 INFO [cinder.
2013-05-14 17:06:16 INFO [cinder.
2013-05-14 17:06:16 INFO [cinder.
2013-05-14 17:06:16 INFO [cinder.
2013-05-14 17:06:19 INFO [cinder.
2013-05-14 17:06:33 INFO [cinder.
2013-05-14 17:06:33 INFO [cinder.