test_keystoneclient_sql fails when run by itself
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Low
|
Brant Knudson |
Bug Description
Commit efc30beab10faf4
test_keystonecl
(I also tried with mysql and it didn't fail when run by itself.)
These 2 tests in test_keystonecl
test_ec2_
test_ec2_
The error messages are like:
ClientException: An unexpected error prevented the server from fulfilling your request. (OperationalError) no such table: ec2_credential
Note that can run the test by itself but if run test_ec2_
KcMasterSqlTestCase it then fails.
Here's some examples:
./run_tests.sh test_keystonecl
- WORKS
./run_tests.sh test_keystonecl
- WORKS
./run_tests.sh \
test_keystonec
test_keystonec
- test_ec2_
- test_ec2_
./run_tests.sh -s \
test_keystonec
test_keystonec
- test_ec2_
- test_ec2_
First, for some reason none of the tables appear to be available to the server when running the ec2 test after another test has run. You can query them right after the create_all, but then they dissappear to the ec2 backend. Not sure how this could happen. Maybe a sqlite/sqlalchemy usage problem, or multithreading or timing issue?
Second, it looks like it's possible that sql.ModelBase.
https:/
Specifically, the Ec2Token model is in keystone.
One thing that should be considered is whether this bit of code is safe:
https:/
It seems unsafe to implicitly create tables since that should be taken care of by the tester or keystone-manage.
Changed in keystone: | |
assignee: | nobody → Brant Knudson (blk-u) |
Changed in keystone: | |
importance: | Undecided → Low |
Changed in keystone: | |
milestone: | none → havana-2 |
status: | Fix Committed → Fix Released |
Changed in keystone: | |
milestone: | havana-2 → 2013.2 |
I have a theory for why sqlite is failing. I think when you create different engines with in-memory sqlite:// they're not the same database. (Whereas for Mysql different engines all go to the same database server.)