What's the plan of configuring database for savanna

Asked by Xiang Hui

Hi team,

  I noticed that there is one configuration item involved with database in savanna.conf, it used to be :
  # URL for sqlalchemy database (string value)
  connection=sqlite:////var/lib/savanna/savanna-server.db
  connection=sqlite:////tmp/savanna-server.db

  but in the latest build "openstack-savanna-0.3-2.el6.noarch"
   seems savanna works by setting as below:
  #connection=sqlite:////savanna/openstack/common/db/$sqlite_db

   Are there any history concerns on the savanna db? Thanks for any help.

Question information

Language:
English Edit question
Status:
Solved
For:
Sahara Edit question
Assignee:
No assignee Edit question
Solved by:
Dmitry Mescheryakov
Solved:
Last query:
Last reply:
Revision history for this message
Dmitry Mescheryakov (dmitrymex) said :
#1

The change you see is non intentional. Both current configuration and the old one will work fine. It is just a location for storing sqlite database.

Revision history for this message
Matthew Farrellee (mattf) said :
#2

The correct configuration is: connection=sqlite:////var/lib/savanna/savanna-server.db

openstack-savanna-0.3-2.el6.noarch should have the correct location. Check for a /etc/savanna/savanna.conf.rpmsave or .rpmnew file.

Revision history for this message
Xiang Hui (xianghui) said :
#3

@Matthew, Hmm.. it works even when I comment the line connection=sqlite:////var/lib/savanna/savanna-server.db, and found that the savanna.sqlite exists under directory savanna-venv/lib/python2.6/site-packages/savanna/openstack/common/db/.

Revision history for this message
Best Dmitry Mescheryakov (dmitrymex) said :
#4

@Xiang, when you comment a parameter, a default value is applied. For connection it is
sqlite:////savanna/openstack/common/db/$sqlite_db
(the one you can see in the sample config file)

Revision history for this message
Matthew Farrellee (mattf) said :
#5

It will still run w/o the connection line, but your savanna-server.db may be written to /tmp, which may be wiped on system reboot.

Since you are using the RDO Havana RPMs, the correct location is /var/lib/savanna/savanna-server.db (happens to be ~savanna/savanna-server.db).

Revision history for this message
Xiang Hui (xianghui) said :
#6

Thanks Mattew, but like Dmitry said, the default value is "sqlite:////savanna/openstack/common/db/$sqlite_db" from code, thank you for your nice help ^^.

Revision history for this message
Xiang Hui (xianghui) said :
#7

Thanks Dmitry Mescheryakov, that solved my question.