Ask Your Question
0

Glance logging configuration

asked 2011-04-25 22:29:45 -0600

steve-chu gravatar image

I added the following lines in glance.conf file.

logging

--log_dir = /var/log/glance --log_file = glance.log --log_date_format = %Y-%m-%d %H:%M:%S --log-config = /usr/etc/logging.cnf

I restarted both glance-api and glance-registry servers.

The log file can not be created!

Please help!

edit retag flag offensive close merge delete

7 answers

Sort by » oldest newest most voted
0

answered 2011-04-26 16:25:20 -0600

steve-chu gravatar image

Hi Jay, your answer was exactly what I had asked in my queston. I followed the instruction in the doc you pointed me to, but it did not work.

Steve Chu

edit flag offensive delete link more
0

answered 2011-04-26 18:17:07 -0600

jaypipes gravatar image

Please paste your glance.conf in its entirety. Thanks! -jay

edit flag offensive delete link more
0

answered 2011-04-26 18:45:52 -0600

steve-chu gravatar image

[DEFAULT]

Show more verbose log output (sets INFO log level output)

verbose = True

Show debugging output in logs (sets DEBUG log level output)

debug = False

debug = True

[app:glance-api] paste.app_factory = glance.server:app_factory

Which backend store should Glance use by default is not specified

in a request to add a new image to Glance? Default: 'file'

Available choices are 'file', 'swift', and 's3'

default_store = file

Address to bind the API server

bind_host = 0.0.0.0

bind_host = 10.3.40.22

Port the bind the API server to

bind_port = 9292

Address to find the registry server

registry_host = 0.0.0.0

registry_host = 10.3.40.22

Port the registry server is listening on

registry_port = 9191

============ Filesystem Store Options ========================

Directory that the Filesystem backend store

writes image data to

filesystem_store_datadir=/var/lib/glance/images/

============ Swift Store Options =============================

Address where the Swift authentication service lives

swift_store_auth_address = 127.0.0.1:8080/v1.0/

User to authenticate against the Swift authentication service

swift_store_user = jdoe

Auth key for the user authenticating against the

Swift authentication service

swift_store_key = a86850deb2742ec3cb41518e26aa2d89

Container within the account that the account should use

for storing images in Swift

swift_store_container = glance

Do we create the container if it does not exist?

swift_store_create_container_on_put = False

[app:glance-registry] paste.app_factory = glance.registry.server:app_factory

Address to bind the registry server

bind_host = 0.0.0.0

bind_host = 10.3.40.22

Port the bind the registry server to

bind_port = 9191

SQLAlchemy connection string for the reference implementation

registry server. Any valid SQLAlchemy connection string is fine.

See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine (http://www.sqlalchemy.org/docs/05/ref...)

sql_connection = sqlite:///glance.sqlite

sql_connection = sqlite:///glance.sqlite --daemonize

Period in seconds after which SQLAlchemy should reestablish its connection

to the database.

#

MySQL uses a default wait_timeout of 8 hours, after which it will drop

idle connections. This can result in 'MySQL Gone Away' exceptions. If you

notice this, you can lower this value to ensure that SQLAlchemy reconnects

before MySQL can drop the connection.

sql_idle_timeout = 3600

logging

--log_dir = '/var/log/glance' --log_file = 'glance.log' --log-config=/usr/etc/logging.cnf

edit flag offensive delete link more
0

answered 2011-04-26 15:19:27 -0600

jaypipes gravatar image

Hi Steve! Sorry, I was not being notified about questions for Glance! That has now been fixed, and I responded to your doc question about this. Please do refer to that answer here: http://docs.openstack.org/cactus/open... .

Thanks! jay

edit flag offensive delete link more
0

answered 2011-04-26 18:57:17 -0600

jaypipes gravatar image

logging

--log_dir = '/var/log/glance' --log_file = 'glance.log' --log-config=/usr/etc/logging.cnf

As I mentioned on http://docs.openstack.org/cactus/open... , you need to remove the above lines from your glance.conf. You need to add the following to your glance.conf to enable logging in both the API and Registry servers:

In the [app:glance-api] section, put:

log_file = /var/log/glance/api.log

In the [app:glance-registry] section, put:

log_file = /var/log/glance/registry.log

Restart your servers and logging should be enabled in debug level. After, please post what is in the API log file. Thanks! -jay

edit flag offensive delete link more
0

answered 2011-04-26 19:52:57 -0600

steve-chu gravatar image

Hi Jay, Thank you very much for spending time on this issue. The issus has been resolved. I suggest you to update the doc of configuring the logging of Glance to avoid confusion from users.

Steve

edit flag offensive delete link more
0

answered 2011-04-26 20:15:13 -0600

jaypipes gravatar image

On Tue, Apr 26, 2011 at 12:52 PM, steve chu question154239@answers.launchpad.net wrote:

Question #154239 on Glance changed: https://answers.launchpad.net/glance/...

   Status: Answered => Solved

steve chu confirmed that the question is solved: Hi Jay, Thank you very much for spending time on this issue. The issus has been resolved. I suggest you to update the doc of configuring the logging of Glance to avoid confusion from users.

Will do, Steve! I'll log a bug about it.

Cheers! jay

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: 2011-04-25 22:29:45 -0600

Seen: 72 times

Last updated: Apr 26 '11