[Solved] WebUI has empty views due to failed NetworkConnection matching query

Hello dears,

I’m testing Rockstor (RS) 3.8.13 on an ASUS P10S-E/4L (https://www.asus.com/Commercial-Servers-Workstations/P10S-E-4L/)

This board, besides the IKVM mgmt interface which is currently not in use, has 4x I210 interfaces.
Of these (labeled enp7s0 - enp10s0), only one (enp7s0) is currently connected.

During install, i set up a VLAN interface (vlan30) as this server is connected to an NetGear GS110TP (http://www.netgear.com/support/product/GS110TP), and then an old Cisco RVS4000 router. The Cisco is acting as the DCHP sever as well, with reserved IPs in the 10.1.3.x range for the vlan ID of 30. The switch and the router only accept tagged packets, all others are discarded on the ports.

(Sidenote: Without an active vlan and therefore active I-net connection, Rockstor did not successfully enable the webui during my first tests with 3.8.12 for the initial install. Entering my vlan setup afterwards via console using nmtui, i was also not able to get the webui up.)

After boot, RS shows web-ui is accessible on 10.1.3.xx (reserved on the Cisco for the MAC of ‘enp7s0’) and it really is.

Upon creation of the admin user, the circle spins. Actually, was spinning endlessly. Upon clicking again on submit, webui complains that this user is already existing - so it was created. When pressing F5/refreshing the browser tab, the admin user is shown as logged in, and can logoff/login again. What happens now is different between releases:

  1. For 3.8.12 the view initialization JS routine was hung in (it seems) recursion -> unfortunately i haven’t kept these messages from Firefox Webdev console.

  2. For 3.8.13 the UI complains actively about missing network interfaces, so i downloaded the logs as provided:

[supervisord_data-collector_stderr.log]
-----8<-----
Traceback (most recent call last):
File “/opt/rockstor/eggs/gevent-1.0.2-py2.7-linux-x86_64.egg/gevent/greenlet.py”, line 327, in run
result = self._run(*self.args, **self.kwargs)
File “/opt/rockstor/src/rockstor/smart_manager/data_collector.py”, line 354, in prune_logs
self.aw.api_call(‘sm/tasks/log/prune’, data=None, calltype=‘post’, save_error=False)
File “/opt/rockstor/src/rockstor/cli/api_wrapper.py”, line 79, in api_call
self.set_token()
File “/opt/rockstor/src/rockstor/cli/api_wrapper.py”, line 48, in set_token
app = OauthApp.objects.get(name=settings.OAUTH_INTERNAL_APP)
File “/opt/rockstor/eggs/Django-1.6.11-py2.7.egg/django/db/models/manager.py”, line 151, in get
return self.get_queryset().get(*args, **kwargs)
File “/opt/rockstor/eggs/Django-1.6.11-py2.7.egg/django/db/models/query.py”, line 310, in get
self.model._meta.object_name)
DoesNotExist: OauthApp matching query does not exist.
<Greenlet at 0x2d42870: <bound method SysinfoNamespace.prune_logs of <smart_manager.data_collector.SysinfoNamespace object at 0x2d45590>>> failed with DoesNotExist
-----8<-----

[gunicorn.log]
-----8<-----
2016-05-04 18:38:10 [13107] [INFO] Starting gunicorn 0.16.1
2016-05-04 18:38:10 [13107] [INFO] Listening at: http://127.0.0.1:8000 (13107)
2016-05-04 18:38:10 [13107] [INFO] Using worker: sync
2016-05-04 18:38:10 [13120] [INFO] Booting worker with pid: 13120
2016-05-04 18:38:10 [13121] [INFO] Booting worker with pid: 13121
-----8<-----

[rockstor.log]
-----8<-----
[04/May/2016 18:38:10] DEBUG [smart_manager.data_collector:403] Listening on port http://127.0.0.1:8080 and on port 10843 (flash policy server)
[04/May/2016 18:38:44] ERROR [smart_manager.data_collector:342] Failed to update disk state… exception: OauthApp matching query does not exist.
[04/May/2016 18:38:44] ERROR [smart_manager.data_collector:342] Failed to update pool state… exception: OauthApp matching query does not exist.
[04/May/2016 18:38:44] ERROR [smart_manager.data_collector:342] Failed to update share state… exception: OauthApp matching query does not exist.
[04/May/2016 18:38:44] ERROR [smart_manager.data_collector:342] Failed to update snapshot state… exception: OauthApp matching query does not exist.
[04/May/2016 18:39:23] ERROR [storageadmin.views.network:85] Unknown ctype: vlan config: {}
[04/May/2016 18:38:44] ERROR [smart_manager.data_collector:320] failed to update Rock-on metadata. low-level exception: OauthApp matching query does not exist.
[04/May/2016 18:39:23] ERROR [storageadmin.util:46] request path: /api/network/refresh method: POST data: <QueryDict: {}>
[04/May/2016 18:39:23] ERROR [storageadmin.util:47] exception: NetworkConnection matching query does not exist.
Traceback (most recent call last):
File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 40, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/network.py”, line 361, in post
self._refresh_connections()
File “/opt/rockstor/eggs/Django-1.6.11-py2.7.egg/django/db/transaction.py”, line 371, in inner
return func(*args, **kwargs)
File “/opt/rockstor/src/rockstor/storageadmin/views/network.py”, line 136, in _refresh_connections
slave_co.master = NetworkConnection.objects.get(name=e[‘master’])
File “/opt/rockstor/eggs/Django-1.6.11-py2.7.egg/django/db/models/manager.py”, line 151, in get
return self.get_queryset().get(*args, **kwargs)
File “/opt/rockstor/eggs/Django-1.6.11-py2.7.egg/django/db/models/query.py”, line 310, in get
self.model._meta.object_name)
DoesNotExist: NetworkConnection matching query does not exist.
[04/May/2016 18:39:23] DEBUG [storageadmin.util:48] Current Rockstor version: 3.8-13
-----8<-----

[supervisord.log]
-----8<-----
2016-05-04 18:38:09,568 CRIT Supervisor running as root (no user in config file)
2016-05-04 18:38:09,581 INFO RPC interface ‘supervisor’ initialized
2016-05-04 18:38:09,581 CRIT Server ‘unix_http_server’ running without any HTTP authentication checking
2016-05-04 18:38:09,581 INFO supervisord started with pid 13091
2016-05-04 18:38:10,589 INFO spawned: ‘nginx’ with pid 13106
2016-05-04 18:38:10,593 INFO spawned: ‘gunicorn’ with pid 13107
2016-05-04 18:38:10,595 INFO spawned: ‘data-collector’ with pid 13108
2016-05-04 18:38:10,597 INFO spawned: ‘ztask-daemon’ with pid 13109
2016-05-04 18:38:12,673 INFO success: data-collector entered RUNNING state, process has stayed up for > than 2 seconds (startsecs)
2016-05-04 18:38:12,673 INFO success: ztask-daemon entered RUNNING state, process has stayed up for > than 2 seconds (startsecs)
2016-05-04 18:38:15,678 INFO success: nginx entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)
2016-05-04 18:38:15,678 INFO success: gunicorn entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)
-----8<-----

[ztask.log]
-----8<-----
2016-05-04 18:38:10,831 - ztaskd - INFO - Server starting on ipc:///var/run/rockon-ztaskd.
-----8<-----

The other ones were empty.

I’m not able to setup any interface role therefore.

networking is pretty much broken on 3.8.13 on all broadcom chips for sure, the centos kernel is to blame just wait for a patch.

Thank you. As far as i traced it down already while testing 3.8.12 before, the UI wasnt able to retrieve / resolve the network setup there during view initialization as well, deep down in the Python scripts. And the Asus board has Intel 210AT controllers.

Networking actually works, i can ssh into the server, perform yum updates and everything.
Only the webui craps out, which it does in 3.8.12 as well, first release i tried back in March. Unfortunately RS deprecated its text/console management UI, so i can set up currently null.

Wait… according to:

where another user observes this message:
ERROR [storageadmin.views.network:85] Unknown ctype: bridge config: {}

Suman writes:
“Hey @Flox you are right that this is related to new network management. Right now, we ignore bridge type connections as we only support adding/managing ethernet, team or bond type connections. This message in the log is just some chatty debug information, nothing to be concerned with really.”

Could it be that my VLAN-type connection which is the active one, is not recognized by webui? Because of Suman’s statement, and as my particular message is similar:
“ERROR [storageadmin.views.network:85] Unknown ctype: vlan config: {}”

Oh come on guys…

Fortunately today i still have a day off, and thus spared 2hrs performing what was now my 6th or so install.
Besides enabling enp7s0 interface (equals I210 port 1) and linking said vlan30 connection to it, i also connected a spare cable to another port on my NetGear. Thus, i set up enp8s0 connection interface / the second I210 port as well, defined a static IP in the same subnet (because without active VLAN and thus tagging, it won’t get anything from DHCP static tables on the router), and enabled it.

Guess what? See screenshot. Every single one of the menu items, from dashboard to rockons, was coming up with an empty view before. (So, sorry, but the log messages about “Unknown ctype: bridge config: {}” / “Unknown ctype: vlan config: {}” are not simple chatty debug information, it indicates a broken important subsytem.)

Now, no more complains by webui about not being able to query NetworkInterface anymore. (enp8s0 is disconnect now, btw. It just needs a second defined, nad possibly once connected during install, ethernet type connection Just as suman stated in that other, linked thread.).

I don’t necessarily think that my setup is a very special one: just one currently active VLAN linked to one active network interface.

I was about to subscribe to stable release channel, possible for a whole 5 years from the start, as i absolutely see the potential in RockStor being the current sole btrfs-based network storage appliance.

But it seems not production ready. It now took me 1,5 months to get to this point, with this my relatively simple setup. The culprit seems to be a somewhat fragile webui layer, operative only with certain, very limited setups. As the webui as the only administration interface left is necessary to get out anything from RS, it is unusable without.

Scusi, absolutely do not want to offend any of you guys spending their spare time. Thoughts on this? Thanks for reading nad your efforts up to this day, btw.