Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database is locked exception #327

Open
JeffreyDevloo opened this issue Apr 24, 2018 · 1 comment
Open

Database is locked exception #327

JeffreyDevloo opened this issue Apr 24, 2018 · 1 comment

Comments

@JeffreyDevloo
Copy link
Contributor

Problem description

Certain calls give of OperationalError: database is locked. Looks like certain paths are not occurring in a locked context

Examples;

Apr 24 05:06:34 R25U13 python[172409]: 2018-04-24 05:06:34 13900 -0600 - R25U13 - 172409/140639893485312 - flask/decorators.py - new_function - 21365 - ERROR - Unexpected exception
Apr 24 05:06:34 R25U13 python[172409]: Traceback (most recent call last):
Apr 24 05:06:34 R25U13 python[172409]:   File "/usr/lib/python2.7/dist-packages/ovs_extensions/api/decorators.py", line 111, in new_function
Apr 24 05:06:34 R25U13 python[172409]:     return_data = f(*args, **kwargs)
Apr 24 05:06:34 R25U13 python[172409]:   File "/opt/asd-manager/source/app/api.py", line 125, in get_slots
Apr 24 05:06:34 R25U13 python[172409]:     stack[slot_id].update({'osds': dict((asd.asd_id, asd.export()) for asd in disk.asds)})
Apr 24 05:06:34 R25U13 python[172409]:   File "/usr/lib/python2.7/dist-packages/ovs_extensions/dal/base.py", line 104, in <lambda>
Apr 24 05:06:34 R25U13 python[172409]:     setattr(self.__class__, key, property(lambda s: s._get_foreign_relation(relation_info)))
Apr 24 05:06:34 R25U13 python[172409]:   File "/usr/lib/python2.7/dist-packages/ovs_extensions/dal/base.py", line 109, in _get_foreign_relation
Apr 24 05:06:34 R25U13 python[172409]:     remote_class._ensure_table()
Apr 24 05:06:34 R25U13 python[172409]:   File "/usr/lib/python2.7/dist-packages/ovs_extensions/dal/base.py", line 224, in _ensure_table
Apr 24 05:06:34 R25U13 python[172409]:     connection.execute('CREATE TABLE IF NOT EXISTS {0} ({1})'.format(cls._table, ', '.join(primary_key + properties + relations)))
Apr 24 05:06:34 R25U13 python[172409]: OperationalError: database is locked

Apr 24 04:30:39 R25U13 python[172409]: 2018-04-24 04:30:39 35100 -0600 - R25U13 - 172409/140639893485312 - flask/decorators.py - new_function - 18013 - ERROR - Unexpected exception
Apr 24 04:30:39 R25U13 python[172409]: Traceback (most recent call last):
Apr 24 04:30:39 R25U13 python[172409]:   File "/usr/lib/python2.7/dist-packages/ovs_extensions/api/decorators.py", line 111, in new_function
Apr 24 04:30:39 R25U13 python[172409]:     return_data = f(*args, **kwargs)
Apr 24 04:30:39 R25U13 python[172409]:   File "/opt/asd-manager/source/app/api.py", line 124, in get_slots
Apr 24 04:30:39 R25U13 python[172409]:     stack[slot_id] = disk.export()
Apr 24 04:30:39 R25U13 python[172409]:   File "/opt/asd-manager/source/dal/objects/disk.py", line 122, in export
Apr 24 04:30:39 R25U13 python[172409]:     'state_detail': self.status.get('detail', ''),
Apr 24 04:30:39 R25U13 python[172409]:   File "/usr/lib/python2.7/dist-packages/ovs_extensions/dal/base.py", line 100, in <lambda>
Apr 24 04:30:39 R25U13 python[172409]:     setattr(self.__class__, key, property(lambda s: getattr(s, '_{0}'.format(key))()))
Apr 24 04:30:39 R25U13 python[172409]:   File "/opt/asd-manager/source/dal/objects/disk.py", line 87, in _status
Apr 24 04:30:39 R25U13 python[172409]:     if len(self.asds) == 0:
Apr 24 04:30:39 R25U13 python[172409]:   File "/usr/lib/python2.7/dist-packages/ovs_extensions/dal/base.py", line 104, in <lambda>
Apr 24 04:30:39 R25U13 python[172409]:     setattr(self.__class__, key, property(lambda s: s._get_foreign_relation(relation_info)))
Apr 24 04:30:39 R25U13 python[172409]:   File "/usr/lib/python2.7/dist-packages/ovs_extensions/dal/base.py", line 114, in _get_foreign_relation
Apr 24 04:30:39 R25U13 python[172409]:     [self.id])
Apr 24 04:30:39 R25U13 python[172409]: OperationalError: database is locked
@wimpers wimpers added this to the Roadmap milestone May 22, 2018
@sjovdnbos
Copy link
Contributor

sjovdnbos commented Jan 17, 2019

Fixed by:

openvstorage/framework-extensions#202
openvstorage-extensions-0.5.3-dev.1547742527.a544f36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants