Ask Your Question
0

savanna db create

asked 2013-07-18 09:38:39 -0500

jfzhang1984 gravatar image

when intalling savanna, I found some problem to create the savanna database

in version 0.1 the db is created by

savanna--manage --config-file /etc/savanna/savanna.conf reset-db --with-gen-templates

it can scussefu created the db. it can also give some exist node-templetes in the hadoop.

but in the newer version, we use

savanna-db-manage --config-file /etc/savanna/savanna.conf revision -m "description of revision" --autogenerate

to create the database and find something may wrong.

  1. there are no exist node-templetes in the new database 2 I can create the node-templetes through the horizon

So I want to known how should I use the savanna-db-manage to create the new db for savanna ?

thanks

edit retag flag offensive close merge delete

8 answers

Sort by ยป oldest newest most voted
0

answered 2013-07-18 11:21:14 -0500

ruhe gravatar image
  1. you don't need to execute savanna-db-manage to install Savanna
  2. db is created automatically by savanna

you can follow this guide to install savanna v0.2: https://savanna.readthedocs.org/en/latest/userdoc/installation.guide.html (https://savanna.readthedocs.org/en/la...)

edit flag offensive delete link more
0

answered 2013-07-19 10:07:03 -0500

jfzhang1984 gravatar image

I have fixed the db-problem thanks

edit flag offensive delete link more
0

answered 2013-07-18 09:43:39 -0500

ruhe gravatar image

You don't need to execute command "savanna--manage --config-file /etc/savanna/savanna.conf reset-db --with-gen-templates" in Savanna 0.2.

You can follow "https://savanna.readthedocs.org/en/latest/devref/quickstart.html" to setup Savanna and start Hadoop cluster.

edit flag offensive delete link more
0

answered 2013-07-19 09:58:50 -0500

ruhe gravatar image

There is config for database file location. You can find that config in savanna.conf:

URL for sqlalchemy database (string value)

connection=sqlite:////tmp/savanna-server.db

Can you make sure, that this file doesn't exist?

edit flag offensive delete link more
0

answered 2013-07-19 09:59:15 -0500

ruhe gravatar image

Also, please attach Savanna output logs

edit flag offensive delete link more
0

answered 2013-07-18 09:59:46 -0500

jfzhang1984 gravatar image

sorry i am not understand clearly

the url is to test savanna in command line, in version 0.1 i use it to test savanna

but now I have another question, in version 0.2 , it copy savanna-api and savanna-db-manage to /usr/local/bin

so my question are:

  1. Does the savanna-db-manage need to execute in the savanna installation ?
  2. If need to execute , how to run this script
  3. if not ,when does this programm to create the db and how does this program create the db ?

thanks very much.

edit flag offensive delete link more
0

answered 2013-07-19 09:54:11 -0500

jfzhang1984 gravatar image

you can follow this guide to install savanna v0.2: https://savanna.readthedocs.org/en/latest/userdoc/installation.guide.html (https://savanna.readthedocs.org/en/la...)

As you said, I followed the steps and installed savanna successful, I run savanna-api --config-file /etc/savanna/savanna.conf and find that no db is created. and I use the command to test the savanna like this

http $SAVANNA_URL/node-group-templates X-Auth-Token:$AUTH_TOKEN < ng_master_template_create.json

root@node1:~/zjf# http http://10.0.0.1:8386/v1.0/1d1938bbda474b5386c6f86dd7746c6e/node-group-templates (http://10.0.0.1:8386/v1.0/1d1938bbda4...) X-Auth-Token:c4480b411f2542d8b7e15b9ca104de32 < ng_master_template_create.json HTTP/1.1 500 INTERNAL SERVER ERROR Content-Length: 111 Content-Type: application/json Date: Fri, 19 Jul 2013 09:53:06 GMT

{ "error_code": 500, "error_message": "Error occurred during validation", "error_name": "INTERNAL_SERVER_ERROR" }

so i want to known in this program, when to call savanna-db-manage to create db. thanks ?

edit flag offensive delete link more
0

answered 2013-07-19 10:02:20 -0500

jfzhang1984 gravatar image

OperationalError: (OperationalError) no such column: NodeGroupTemplate.image_id u'SELECT "NodeGroupTemplate".created AS "NodeGroupTemplate_created", "NodeGroupTemplate".updated AS "NodeGroupTemplate_updated", "NodeGroupTemplate".id AS "NodeGroupTemplate_id", "NodeGroupTemplate".description AS "NodeGroupTemplate_description", "NodeGroupTemplate".tenant_id AS "NodeGroupTemplate_tenant_id", "NodeGroupTemplate".plugin_name AS "NodeGroupTemplate_plugin_name", "NodeGroupTemplate".hadoop_version AS "NodeGroupTemplate_hadoop_version", "NodeGroupTemplate".name AS "NodeGroupTemplate_name", "NodeGroupTemplate".flavor_id AS "NodeGroupTemplate_flavor_id", "NodeGroupTemplate".image_id AS "NodeGroupTemplate_image_id", "NodeGroupTemplate".node_processes AS "NodeGroupTemplate_node_processes", "NodeGroupTemplate".node_configs AS "NodeGroupTemplate_node_configs", "NodeGroupTemplate".volumes_per_node AS "NodeGroupTemplate_volumes_per_node", "NodeGroupTemplate".volumes_size AS "NodeGroupTemplate_volumes_size", "NodeGroupTemplate".volume_mount_prefix AS "NodeGroupTemplate_volume_mount_prefix" \nFROM "NodeGroupTemplate" \nWHERE "NodeGroupTemplate".tenant_id = ?' (u'1d1938bbda474b5386c6f86dd7746c6e',)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-07-18 09:38:39 -0500

Seen: 82 times

Last updated: Jul 19 '13