Database error after upgrade

– insert or update on table “storageadmin_networkdevice” violates foreign key constraint "connection_id_refs_id_1db23ec5"DETAIL: Key (connection_id)=(11) is not present in table “storageadmin_networkconnection”.

Brief description of the problem

Every page I load in the web UI displays the stacktrace below:

Detailed step by step instructions to reproduce the problem

This happens on every page load.
Right before this I had started an update of all packages (and I hadn’t updated for quite a while before that…).

Web-UI screenshot

Error Traceback provided on the Web-UI

        Traceback (most recent call last):

File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 41, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/network.py”, line 236, in get_queryset
self._refresh_devices()
File “/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/utils/decorators.py”, line 145, in inner
return func(*args, **kwargs)
File “/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/db/transaction.py”, line 225, in exit
connection.commit()
File “/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/db/backends/base/base.py”, line 173, in commit
self._commit()
File “/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/db/backends/base/base.py”, line 142, in _commit
return self.connection.commit()
File “/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/db/utils.py”, line 98, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/db/backends/base/base.py”, line 142, in _commit
return self.connection.commit()
IntegrityError: insert or update on table “storageadmin_networkdevice” violates foreign key constraint “connection_id_refs_id_1db23ec5”
DETAIL: Key (connection_id)=(11) is not present in table “storageadmin_networkconnection”.

False alarm!

Restarting the machine made this go away :slight_smile:

3 Likes

@meva Welçcome to the Rockstor community forum.

And thanks for the update. Glad you got it sorted.

It may still be there is something a-miss here but likely it’s all OK.
I.e. we may have some bug here still regarding multiple network ports, or the like. Especially directly after an upgrade. I see 4.1.0-0, that is what comes in our installer currently. What did you upgrade from?

Keep us posted as always.

Hope that helps.

1 Like

I actually wasn’t upgrading the Rockstor version, I was just updating (after a long while) through the “available updates” package update.
Screenshot%202022-11-27-20%3A26%3A49

All continues to be well, I will report back if that changes.

2 Likes