Bug 735012
| Summary: | "database is locked" errors with sqlite | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mark McLoughlin <markmc> | ||||
| Component: | openstack-nova | Assignee: | Russell Bryant <rbryant> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 16 | CC: | asalkeld, markmc, matt_domsch, rbryant | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | openstack-nova-2011.3-13.fc16 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2011-12-23 03:27:55 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Mark McLoughlin
2011-09-01 07:34:32 UTC
I'm also seeing this from the network and scheduler services when running 'nova-manage network create' I'm able to reproduce this, as well. For example, I see it when creating a network:
$ sudo nova-manage network create admin 10.0.0.0/24 1 256 --bridge=br0
The error comes from Service.report_state() in nova/service.py. This function gets called in a loop in a background thread. By default, it runs every 10 seconds. This error occurs when this check happens in the middle of some operation being processed. In my last test of creating a network, it took almost 20 seconds to complete and I got the error once in the middle.
I'd consider this a fairly low priority issue to deal with, because:
a) After reviewing the code it's coming from, it appears to be more of an annoyance than a real problem.
b) It's probably specific to sqlite. If you switch to a different db backend, I bet it doesn't happen.
We could fix it, but there are probably some other things we would want to focus on first. The report_state() code could be made a bit smarter on what it considers an error. Or perhaps it makes more sense to do something to synchronize access to the sqlite db.
If it's bothersome enough, we could consider switching to a different backend DB by default.
As a follow-up to this, we really should switch to something else by default. In this particular case in the report, the error is harmless. However, due to how OpenStack works, it looks like similar errors are going to occur elsewhere at random times causing real problems as long as sqlite is the backend database. More on switching the default here: http://lists.fedoraproject.org/pipermail/cloud/2011-November/000996.html Created attachment 535682 [details]
use mysql by default
I have attached a first pass at updating openstack-nova to be configured to use MySQL by default. It also includes a helper script for setting up MySQL for use with openstack-nova.
This looks perfect Russell. I just gave the script a go and it works great. The packaging changes look fine too. openstack-nova-2011.3-9.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/openstack-nova-2011.3-9.el6 openstack-nova-2011.3-8.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/openstack-nova-2011.3-8.fc16 Package openstack-nova-2011.3-8.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing openstack-nova-2011.3-8.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-16609/openstack-nova-2011.3-8.fc16 then log in and leave karma (feedback). openstack-nova-2011.3-10.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/openstack-nova-2011.3-10.el6 openstack-nova-2011.3-11.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/openstack-nova-2011.3-11.fc16 openstack-nova-2011.3-11.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/openstack-nova-2011.3-11.el6 openstack-nova-2011.3-13.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/openstack-nova-2011.3-13.fc16 openstack-nova-2011.3-13.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/openstack-nova-2011.3-13.el6 openstack-nova-2011.3-13.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. openstack-nova-2011.3-14.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/openstack-nova-2011.3-14.el6 openstack-nova-2011.3-18.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/openstack-nova-2011.3-18.el6 |