FireDrunk / ZFSmond

Tiny ZFS Web Interface written in AngularJS and Flask Restful
GNU General Public License v3.0
27 stars 12 forks source link

No pools displayed if a pool with mirror or multiple mirror vdevs in one pool exist #4

Closed hyperbart closed 9 years ago

hyperbart commented 9 years ago

Pool with mirror or multiple mirrors results in a crash

No pools displayed at all anymore...

hyperbart commented 9 years ago

Same applies to "frankenstein" pools: pool with raidz and raidz2.

Haven't tested with a pool with two raidz's for example, but I think issue occurs there too..

FireDrunk commented 9 years ago

Define Frankenstein pools? And please post a stacktrace of the error that occurs in the console.

hyperbart commented 9 years ago

Frankenstein pools = pools with a mix of different parity level vdevs, like a raidz and a raidz2 combined in one pool.

hyperbart commented 9 years ago

About the stacktrace:

192.168.4.60 - - [15/May/2015 16:23:01] "GET /api/pools HTTP/1.1" 500 - Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in call return self.wsgi_app(environ, start_response) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app response = self.make_response(self.handle_exception(e)) File "/usr/local/lib/python2.7/dist-packages/flask_restful/init.py", line 265, in error_router return original_handler(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python2.7/dist-packages/flask_restful/init.py", line 262, in error_router return self.handle_error(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python2.7/dist-packages/flask_restful/init.py", line 265, in error_router return original_handler(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python2.7/dist-packages/flask_restful/init.py", line 262, in error_router return self.handle_error(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request return self.view_functionsrule.endpoint File "/usr/local/lib/python2.7/dist-packages/flask_restful/init.py", line 446, in wrapper resp = resource(_args, _kwargs) File "/usr/local/lib/python2.7/dist-packages/flask/views.py", line 84, in view return self.dispatch_request(_args, _kwargs) File "/usr/local/lib/python2.7/dist-packages/flask_restful/init.py", line 550, in dispatch_request resp = meth(_args, *_kwargs) File "/root/zfsmond/models/zfs.py", line 20, in get pool_info['config'] = self.generate_config(raw_pool) File "/root/zfsmond/models/zfs.py", line 49, in generate_config 'scan_stats': child['scan_stats'] KeyError: 'scan_stats'

FireDrunk commented 9 years ago

Fixed in commit: https://github.com/FireDrunk/ZFSmond/commit/07a9f0c0ca9bd0378c42922e3f797c3bf9fdc5d9