Ask Your Question
0

savanna-api can't be started while setting logging in conf

asked 2013-10-14 03:22:04 -0500

xianghui gravatar image

Hi team,

ENV : Redhat 6.4 64-bit RDO rdo-release-havana-6.noarch openstack-savanna-0.3-0.1.a274.gabf778f.el6.noarch python-django-savanna-0.3-0.1.a10.g87e1e22.el6.noarch

I want to log savanna, but after setting the following items into /etc/savanna/savanna.conf, the command service openstack-savanna-api start didn't work, didn't find any clue.

#log_dir=/var/log/savanna/ #log_file=savanna.log

Any help is appreciated, thanks.

edit retag flag offensive close merge delete

6 answers

Sort by ยป oldest newest most voted
0

answered 2013-10-15 02:37:48 -0500

xianghui gravatar image

Thanks Alexander Rubtsov, that solved my question.

edit flag offensive delete link more
0

answered 2013-10-15 02:37:32 -0500

xianghui gravatar image

@Dmitry, after setting logging as you referred, savanna-api still failed to be started :( , but thanks for your efforts to give my advices, appreciated. [root@oc2603148815 ~]# vi /etc/savanna/savanna.conf #log_dir=/var/log/savanna log_file=/var/log/savanna/savanna.log

[root@oc2603148815 ~]# vi /etc/savanna/savanna.conf

[root@oc2603148815 ~]# service openstack-savanna-api restart Stopping openstack-savanna-api: [FAILED] Starting openstack-savanna-api: [ OK ] [root@oc2603148815 ~]# ps -ef|grep savanna root 23347 22043 0 21:31 pts/4 00:00:00 grep --color=auto savanna

@Alexander, thank you, that works : ) [root@oc2603148815 ~]# [root@oc2603148815 ~]# vi /etc/savanna/savanna.conf log_dir=/var/log/savanna log_file=savanna.log

[root@oc2603148815 ~]# chown savanna:savanna /var/log/savanna/savanna.log [root@oc2603148815 ~]# service openstack-savanna-api restart Stopping openstack-savanna-api: [FAILED] Starting openstack-savanna-api: [ OK ] [root@oc2603148815 ~]# ps -ef|grep savanna savanna 24157 1 8 21:32 ? 00:00:00 /usr/bin/python /usr/bin/savanna-api --config-file /etc/savanna/savanna.conf root 24245 22043 0 21:32 pts/4 00:00:00 grep --color=auto savanna

edit flag offensive delete link more
0

answered 2013-10-14 12:04:59 -0500

Hello Xiang,

Also please make sure that savanna.log has appropriate permissions: "chown savanna:savanna /var/log/savanna/savanna.log"

because when you run savanna-api directly, it launched as root

edit flag offensive delete link more
0

answered 2013-10-14 10:33:19 -0500

dmitrymex gravatar image

Hmm, try removing log_dir parameter from config and set log_file=/var/log/savanna/savanna.log

Then try launching savanna-api directly after that with only config file parameter: /usr/bin/python /usr/bin/savanna-api --config-file /etc/savanna/savanna.conf

Also try again restarting the service with init script

edit flag offensive delete link more
0

answered 2013-10-14 06:35:22 -0500

dmitrymex gravatar image

The first thing I notice is that you didn't remove '#' from the beginning of lines.

If you did, did you also created /var/log/savanna directory?

Also consider invoking savanna-api directly - stdout & stderr output hidden by the init script might give you a hint.

If that does not help, can you post you full configuration here?

edit flag offensive delete link more
0

answered 2013-10-14 09:30:50 -0500

xianghui gravatar image

Thanks for Dmitry's response,

The following is the entire steps I configure savanna logging based on rdo:

savanna-api can be started by removing log_dir/log_file, but failed to start while adding them.

[root@oc2603148815 ~(keystone_admin)]# ps -ef|grep savanna savanna 10359 1 1 04:17 ? 00:00:00 /usr/bin/python /usr/bin/savanna-api --config-file /etc/savanna/savanna.conf root 11022 1260 0 04:18 pts/2 00:00:00 grep --color=auto savanna [root@oc2603148815 ~(keystone_admin)]# mkdir /var/log/savanna

Edit savanna.conf

[root@oc2603148815 ~(keystone_admin)]# vi /etc/savanna/savanna.conf

[DEFAULT] log_dir=/var/log/savanna log_file=savanna.log

REST API config

#port=8386

Address and credentials that will be used to check auth tokens

os_auth_host=127.0.0.1 os_auth_port=35357 os_admin_username=admin os_admin_password=79e82b9223d34a56 os_admin_tenant_name=admin

When set to false, Savanna uses only internal IP of VMs.

When set to true, Savanna expects OpenStack to auto-

assign floating IPs to cluster nodes. Internal IPs will

be used for inter-cluster communication, while floating

ones will be used by Savanna to configure nodes. Also

floating IPs will be exposed in service URLs. This option

is ignored when "use_neutron" is set to True (boolean value)

use_floating_ips=False

The suffix of the node's FQDN. In nova-network that is

dhcp_domain config parameter (string value)

#node_domain=novalocal

Use Neutron or Nova Network (boolean value)

#use_neutron=false

List of plugins to be loaded. Savanna preserves the order of

the list when returning it. (list value)

plugins=vanilla,hdp

[plugin:vanilla] plugin_class=savanna.plugins.vanilla.plugin:VanillaProvider

[plugin:hdp] plugin_class=savanna.plugins.hdp.ambariplugin:AmbariPlugin

[database] [DEFAULT] log_dir=/var/log/savanna log_file=savanna.log

REST API config

#port=8386

Address and credentials that will be used to check auth tokens

os_auth_host=127.0.0.1 os_auth_port=35357 os_admin_username=admin os_admin_password=79e82b9223d34a56 os_admin_tenant_name=admin

When set to false, Savanna uses only internal IP of VMs.

When set to true, Savanna expects OpenStack to auto-

assign floating IPs to cluster nodes. Internal IPs will

be used for inter-cluster communication, while floating

ones will be used by Savanna to configure nodes. Also

floating IPs will be exposed in service URLs. This option

is ignored when "use_neutron" is set to True (boolean value)

use_floating_ips=False

The suffix of the node's FQDN. In nova-network that is

dhcp_domain config parameter (string value)

#node_domain=novalocal

Use Neutron or Nova Network (boolean value)

#use_neutron=false

List of plugins to be loaded. Savanna preserves the order of

the list when returning it. (list value)

plugins=vanilla,hdp

[plugin:vanilla] plugin_class=savanna.plugins.vanilla.plugin:VanillaProvider

[plugin:hdp] plugin_class=savanna.plugins.hdp.ambariplugin:AmbariPlugin

[database]

URL for sqlalchemy database (string value)

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

[root@oc2603148815 ~(keystone_admin)]# service openstack-savanna-api restart Stopping openstack-savanna-api: [ OK ] Starting openstack-savanna-api: [ OK ] [root@oc2603148815 ~(keystone_admin)]# ps -ef|grep savanna root 11967 1260 0 04:19 pts/2 00:00:00 grep --color=auto savanna

But invoking savanna-api directly log-file works fine~

[root@oc2603148815 ~(keystone_admin)]# /usr/bin/python /usr/bin/savanna-api --config-file /etc/savanna/savanna.conf --log-file ... (more)

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-10-14 03:22:04 -0500

Seen: 67 times

Last updated: Oct 15 '13