Will it Openstack

Donny Davis

Contributor
Joined
Jul 31, 2015
Messages
139

hbonath

Cadet
Joined
Jan 29, 2020
Messages
3
@hbonath See here

I've got zero problems with that. My main driver in creating my own repo was because the main repo feels pretty abandoned, and I would like to eventually get this into PyPi so that I can integrate the FreeNAS driver with my Openstack-Ansible deployments.

I opened an issue on Github back in June, and @konetzed has had an issue open since August of 2018 with near Zero movement.
I realize that a cinder driver for FreeNAS might be somewhat "niche" despite the fact that Openstack is very mature and does have a large installed-base. From what I can tell most large Openstack deployments run on Ceph, and the rest of the drivers for Cinder are for the bigger storage players, EMC, NetApp, etc.

I will happily do a pull request and commit my changes to the main iXSystems repo - I'm just not sure if anyone there is paying any attention.

I'm hoping that there are others like me (I am very much *not* a developer BTW, I'm just a tinkerer when it comes to programming) - and worse case if iXSystems is simply putting this out there to let the community run with it, then here we are, lets be the ones to do it!

My hopes are to eventually be able to expand this to use the FreeNAS v2 API so that we can continue to run FreeNAS in our Openstack Deployments for the long term. I'm grateful iXSystems have given us what they have, which is a rock solid starting point.
 

Donny Davis

Contributor
Joined
Jul 31, 2015
Messages
139
Looks like there has been some progress there. I am working at getting freenas functional with train on the new api.

Should we ask for a branch to work on in the github repo?

Congrats on the commit. Happy to see people are interested in this driver and openstack in general.
 

hbonath

Cadet
Joined
Jan 29, 2020
Messages
3
Awesome, LMK what you run into. What Openstack Deployment method do you use? I haven't tested on the latest FreeNAS yet, my work was done using FreeNAS-11.1-U7, using Openstack-Ansible 20.0.1 on Debian 9. I also tested my patches using DevStack / Ubuntu 18.04 w/the same version of FreeNAS and they operated identically.

I was actually quite surprised to see the quick action taken by the repo maintainers over there, and am equally happy that they took my commit.

I *think* that the way these normally go is that we should be working off of the "master" branch for our dev work, we fork the repo - make our changes, then submit a pull request to merge back into master.
I'm not sure if you had noticed but they did create a 1.0 tag in the repo for the Py2 Driver to capture it as it sat prior to accepting my pull request - which is what leads me to believe that we just work out of master.
 

Donny Davis

Contributor
Joined
Jul 31, 2015
Messages
139
I don't use any deployment tooling. I have my own home grown ansible. Openstack is just config files, db, and message queue. I have not had great luck with any of the deployment tools when it comes to upgrade time.

I am deployed on ubuntu 18.04 because it gets the majority of the testing upstream. My deployment is actually hooked into the upstream Openstack CI. https://superuser.openstack.org/articles/shanghai-superuser-award-nominee-fort-nebula/
(I lost)

It would be really great to get this driver upstream if the maintainers would be interested. There is a bit of work that would need to go into unit testing to get it there, but getting this into CI would be a best case.

Anyways I will push up my code when I have something useable. My cloud just went through a major refactor, so I need to get everything tooled back up.
 

konetzed

Dabbler
Joined
Aug 16, 2018
Messages
20
Loving all the talk on this thread. Glad someone has time to clean it up and keep it going. I have been playing around with making a python lib from the swagger API but I cannot figure it out. I was thinking if we had a solid python client lib it would be easy to use to keep up with dev on drivers for OpenStack projects. Does anyone think that's a good idea or a crazy one?
 

Donny Davis

Contributor
Joined
Jul 31, 2015
Messages
139
Loving all the talk on this thread. Glad someone has time to clean it up and keep it going. I have been playing around with making a python lib from the swagger API but I cannot figure it out. I was thinking if we had a solid python client lib it would be easy to use to keep up with dev on drivers for OpenStack projects. Does anyone think that's a good idea or a crazy one?

I don't think its crazy at all - having some standardized and maintained python bindings would make the continuation of this driver easier IMO. It would honestly be great to just bake a jail that includes this driver and cinder-volume as a plugin. I would do it myself, I just don't know how. We really only need the driver and cinder-volume to make it work.
 

McGrath

Cadet
Joined
Nov 9, 2020
Messages
2
Hi all,

I'm trying to get this a new Openstack (v21 - Ussuri, deployed using Kolla ansible) running with a fresh NAS system.
I went with TrueNAS CORE 12.0-RELEASE as it claims to have merged and be feature complete with FreeNAS 11.
Any known issues with these version?

I got the driver and cinder server set up fairly easily - thank you very much to the info in this thread - but it doesn't seem to be working.
With debug logging turned on, cinder-volume.log shows the driver starting up, the API call to the NAS server returning OK, but then just including the HTML for the web loading screening, and then a python error saying it can't parse the response:

2020-11-09 11:33:36.361 6 DEBUG oslo_service.service [req-7908b3ee-483d-46de-9e36-06d50a320c58 - - - - -] Started child 1953 _start_child /usr/lib/python3/dist-packages/oslo_service/service.py:579
2020-11-09 11:33:36.366 1953 INFO cinder.service [-] Starting cinder-volume node (version 16.2.0)
2020-11-09 11:33:36.387 1953 INFO cinder.volume.manager [req-e020089b-5f77-40fd-9015-bf26651c929e - - - - -] Starting volume driver FreeNASISCSIDriver (2.0.0)
2020-11-09 11:33:36.388 1953 INFO cinder.volume.drivers.ixsystems.iscsi [req-e020089b-5f77-40fd-9015-bf26651c929e - - - - -] iXsystems Do Setup
2020-11-09 11:33:36.388 1953 INFO cinder.volume.drivers.ixsystems.iscsi [req-e020089b-5f77-40fd-9015-bf26651c929e - - - - -] iXSystems: Check For Setup Error
2020-11-09 11:33:36.389 1953 DEBUG cinder.volume.drivers.ixsystems.common [req-e020089b-5f77-40fd-9015-bf26651c929e - - - - -] Using iXsystems FREENAS server: os-truenas.martellotech.com _create_handle /usr/lib/python3/dist-packages/cinder/volume/drivers/ixsystems/common.py:40
2020-11-09 11:33:36.389 1953 INFO cinder.volume.drivers.ixsystems.iscsi [req-e020089b-5f77-40fd-9015-bf26651c929e - - - - -] iXSystems: Check For Setup Error
2020-11-09 11:33:36.389 1953 INFO cinder.volume.drivers.ixsystems.iscsi [req-e020089b-5f77-40fd-9015-bf26651c929e - - - - -] iXsystems Get Volume Status
2020-11-09 11:33:36.390 1953 DEBUG cinder.volume.drivers.ixsystems.common [req-e020089b-5f77-40fd-9015-bf26651c929e - - - - -] _update_volume_stats request_urn : /storage/volume/HDDs/ _update_volume_stats /usr/lib/python3/dist-packages/cinder/volume/drivers/ixsystems/common.py:359
2020-11-09 11:33:36.390 1953 DEBUG cinder.volume.drivers.ixsystems.freenasapi [req-e020089b-5f77-40fd-9015-bf26651c929e - - - - -] invoke_command invoke_command /usr/lib/python3/dist-packages/cinder/volume/drivers/ixsystems/freenasapi.py:184
2020-11-09 11:33:36.390 1953 DEBUG cinder.volume.drivers.ixsystems.freenasapi [req-e020089b-5f77-40fd-9015-bf26651c929e - - - - -] url : http://os-truenas.martellotech.com/api/v1.0/storage/volume/HDDs/, request: /storage/volume/HDDs/ _create_request /usr/lib/python3/dist-packages/cinder/volume/drivers/ixsystems/freenasapi.py:129
2020-11-09 11:33:36.390 1953 DEBUG cinder.volume.drivers.ixsystems.freenasapi [req-e020089b-5f77-40fd-9015-bf26651c929e - - - - -] param list : None _create_request /usr/lib/python3/dist-packages/cinder/volume/drivers/ixsystems/freenasapi.py:130
2020-11-09 11:33:36.407 1953 DEBUG cinder.volume.drivers.ixsystems.freenasapi [req-e020089b-5f77-40fd-9015-bf26651c929e - - - - -] invoke_command : response for request /storage/volume/HDDs/ : {"status": "ok", "response": [TrueNAS Loading Page HTML] } _update_volume_stats /usr/lib/python3/dist-packages/cinder/volume/drivers/ixsystems/common.py:362
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service [req-e020089b-5f77-40fd-9015-bf26651c929e - - - - -] Error starting thread.: simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service Traceback (most recent call last):
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/oslo_service/service.py", line 810, in run_service
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service service.start()
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/cinder/service.py", line 229, in start
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service service_id=Service.service_id)
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/cinder/volume/manager.py", line 443, in init_host
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service self._init_host(added_to_cluster, **kwargs)
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/cinder/volume/manager.py", line 477, in _init_host
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service self.driver.init_capabilities()
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/cinder/volume/driver.py", line 770, in init_capabilities
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service stats = self.get_volume_stats(True)
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/cinder/volume/drivers/ixsystems/iscsi.py", line 199, in get_volume_stats
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service self.stats = self.common._update_volume_stats()
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/cinder/volume/drivers/ixsystems/common.py", line 368, in _update_volume_stats
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service data['total_capacity_gb'] = ix_utils.get_size_in_gb(json.loads(ret['response'])['avail'] + json.loads(ret['response'])['used'])
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 518, in loads
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service return _default_decoder.decode(s)
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service obj, end = self.raw_decode(s)
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service return self.scan_once(s, idx=_w(s, idx).end())
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2020-11-09 11:33:36.408 1953 ERROR oslo_service.service
2020-11-09 11:33:36.412 1953 DEBUG oslo_concurrency.lockutils [req-7908b3ee-483d-46de-9e36-06d50a320c58 - - - - -] Acquired lock "singleton_lock" lock /usr/lib/python3/dist-packages/oslo_concurrency/lockutils.py:265
2020-11-09 11:33:36.412 1953 DEBUG oslo_concurrency.lockutils [req-7908b3ee-483d-46de-9e36-06d50a320c58 - - - - -] Releasing lock "singleton_lock" lock /usr/lib/python3/dist-packages/oslo_concurrency/lockutils.py:281
2020-11-09 11:33:36.424 6 INFO oslo_service.service [req-7908b3ee-483d-46de-9e36-06d50a320c58 - - - - -] Child 1953 exited with status 1
2020-11-09 11:33:36.425 6 INFO oslo_service.service [req-7908b3ee-483d-46de-9e36-06d50a320c58 - - - - -] Forking too fast, sleeping

I have set up the iSCSI shares in TrueNAS (Portals & Initiators). Not sure where else to look at this point.
My gut tells me it's a version probably and I should move back to FreeNAS 11, but I'd really like a second opinion from the experts (read: this community) before I bite that bullet.
 

McGrath

Cadet
Joined
Nov 9, 2020
Messages
2
I did reinstall from TrueNAS 12 down to FreeNAS 11.3 and the driver worked right away.

So, something in the TrueNAS 12 release seems to have broken the API.
 

Hemna

Cadet
Joined
Apr 22, 2021
Messages
1
I have run into this problem as well. I am getting html back from the api call to get the volume_stats. Do we have any documentation for the API?
I am a cinder developer and might be able to help. It would be nice to see this driver in the official cinder tree.
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,448
@Hemna - API Docs are available in the product, but we also have a Slack channel if you want to ask questions and collaborate with our dev team. Send me a PM with your email if you want an invite.

 

sekroots

Explorer
Joined
Feb 28, 2022
Messages
61
Hello members,

Can I get any help to solve this?
root@truenas[/var/log]# cat messages|grep pvc-10710a41-ed08-4844-b378-f99e671d251c
Apr 7 09:33:16 truenas 1 2022-04-07T09:33:16.028000-07:00 truenas.mycompany.com.br ctld 1244 - - no LUNs defined for target "iqn.2005-10.org.freenas.ctl:pvc-10710a41-ed08-4844-b378-f99e671d251c"
Apr 7 09:33:16 truenas 1 2022-04-07T09:33:16.080841-07:00 truenas.mycompany.com.br ctld 1244 - - failed to add port pg1-iqn.2005-10.org.freenas.ctl:pvc-10710a41-ed08-4844-b378-f99e671d251c
root@truenas[/var/log]#
 
Top