Yes,when I have put policy.json into /etc/glance/ and the glance-api can to 
,thank you very much.

but at the same time ,as I enter the cmd of "sudo glance-api glance-api.conf 
--debug &" 
It returns:
2012-03-08 16:45:28 7367    ERROR [glance.store.filesystem] Could not find 
filesystem_store_datadir in configuration options.
2012-03-08 16:45:28 7367    ERROR [glance.store.base] Failed to configure store 
correctly. Disabling add method.
2012-03-08 16:45:28 7367    ERROR [glance.store.s3] Could not find 
s3_store_host in configuration options.
2012-03-08 16:45:28 7367    ERROR [glance.store.base] Failed to configure store 
correctly. Disabling add method.
2012-03-08 16:45:28 7367    ERROR [glance.store.swift] Could not find 
swift_store_auth_address in configuration options.
2012-03-08 16:45:28 7367    ERROR [glance.store.base] Failed to configure store 
correctly. Disabling add method.
2012-03-08 16:45:28 7367    DEBUG [routes.middleware] Initialized with method 
overriding = True, and path info altering = True
2012-03-08 16:45:28 7367    DEBUG [glance-api] 
********************************************************************************
2012-03-08 16:45:28 7367    DEBUG [glance-api] Configuration options gathered 
from:
2012-03-08 16:45:28 7367    DEBUG [glance-api] command line args: None
2012-03-08 16:45:28 7367    DEBUG [glance-api] config files: 
['/etc/glance/glance-api.conf']
2012-03-08 16:45:28 7367    DEBUG [glance-api] 
================================================================================
2012-03-08 16:45:28 7367    DEBUG [glance-api] config_file                    = 
['/etc/glance/glance-api.conf']
2012-03-08 16:45:28 7367    DEBUG [glance-api] debug                          = 
True
2012-03-08 16:45:28 7367    DEBUG [glance-api] default_store                  = 
file
2012-03-08 16:45:28 7367    DEBUG [glance-api] filesystem_store_datadir       = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] log_config                     = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] log_date_format                = 
%Y-%m-%d %H:%M:%S
2012-03-08 16:45:28 7367    DEBUG [glance-api] log_dir                        = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] log_file                       = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] log_format                     = 
%(asctime)s %(process)d %(levelname)8s [%(name)s] %(message)s
2012-03-08 16:45:28 7367    DEBUG [glance-api] metadata_encryption_key        = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] notifier_strategy              = 
default
2012-03-08 16:45:28 7367    DEBUG [glance-api] owner_is_tenant                = 
True
2012-03-08 16:45:28 7367    DEBUG [glance-api] policy_default_rule            = 
default
2012-03-08 16:45:28 7367    DEBUG [glance-api] policy_file                    = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] rbd_store_ceph_conf            = 
2012-03-08 16:45:28 7367    DEBUG [glance-api] rbd_store_chunk_size           = 
4
2012-03-08 16:45:28 7367    DEBUG [glance-api] rbd_store_pool                 = 
rbd
2012-03-08 16:45:28 7367    DEBUG [glance-api] rbd_store_user                 = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] registry_client_ca_file        = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] registry_client_cert_file      = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] registry_client_key_file       = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] registry_client_protocol       = 
http
2012-03-08 16:45:28 7367    DEBUG [glance-api] registry_host                  = 
0.0.0.0
2012-03-08 16:45:28 7367    DEBUG [glance-api] registry_port                  = 
9191
2012-03-08 16:45:28 7367    DEBUG [glance-api] s3_store_access_key            = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] s3_store_bucket                = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] s3_store_create_bucket_on_put  = 
False
2012-03-08 16:45:28 7367    DEBUG [glance-api] s3_store_host                  = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] s3_store_object_buffer_dir     = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] s3_store_secret_key            = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] swift_enable_snet              = 
False
2012-03-08 16:45:28 7367    DEBUG [glance-api] swift_store_auth_address       = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] swift_store_container          = 
glance
2012-03-08 16:45:28 7367    DEBUG [glance-api] 
swift_store_create_container_on_put = False
2012-03-08 16:45:28 7367    DEBUG [glance-api] swift_store_key                = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] 
swift_store_large_object_chunk_size = 200
2012-03-08 16:45:28 7367    DEBUG [glance-api] swift_store_large_object_size  = 
5120
2012-03-08 16:45:28 7367    DEBUG [glance-api] swift_store_user               = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] syslog_log_facility            = 
LOG_USER
2012-03-08 16:45:28 7367    DEBUG [glance-api] use_syslog                     = 
False
2012-03-08 16:45:28 7367    DEBUG [glance-api] verbose                        = 
False
2012-03-08 16:45:28 7367    DEBUG [glance-api] paste_deploy.config_file       = 
/etc/glance/glance-api-paste.ini
2012-03-08 16:45:28 7367    DEBUG [glance-api] paste_deploy.flavor            = 
None
2012-03-08 16:45:28 7367    DEBUG [glance-api] 
********************************************************************************

and what wonder me is here :

2012-03-08 16:45:28 7367    ERROR [glance.store.filesystem] Could not find 
filesystem_store_datadir in configuration options.
 2012-03-08 16:45:28 7367    ERROR [glance.store.base] Failed to configure 
store correctly. Disabling add method.

 because I check my glance-api.conf for   "filesystem_store_datadir = 
/home/user2/glanceImages/" and "registry_host = 172.18.187.112" 
but in the returning, registry_host                  = 0.0.0.0 and  Could not 
find filesystem_store_datadir in configuration options...
that make me feel that glance-api isn't read the configuration of 
/etc/glance/glance-api.conf .

and there is also some wrong in glance-registry for " sql_connection            
     = sqlite:///glance.sqlite" is the returning of cmd " sudo glance-registry 
glance-registry.conf --debug & " I entered..but in 
/etc/glance-registry.conf,where actually exist sql_connection = 
mysql://glance:letmeinG@172.18.187.112/glance ..

by the way,glance-scrubber can't start ..

as the results,can you tell me how to make glance-api and glance-registry to be 
configured correctly??
thanks a lot..


 
------------------ 原始邮件 ------------------
发件人: "Eoghan Glynn"<egl...@redhat.com>;
发送时间: 2012年3月8日(星期四) 凌晨2:21
收件人: ".。o 0 O泡泡"<501640...@qq.com>; 
抄送: "openstack"<openstack@lists.launchpad.net>; 
主题: Re: [Openstack] can not  start glance-api in glance E4

 

Does /etc/glance/policy.json exist?

Is is readable?

----- Original Message -----
> From: ".。o 0 O泡泡" <501640...@qq.com>
> To: "openstack" <openstack@lists.launchpad.net>
> Sent: Wednesday, 7 March, 2012 2:06:50 PM
> Subject: [Openstack] can not  start glance-api in glance E4
> 
> 
> hi all:
> 
> In glance E4 ,when I enter follows:
> sudo glance-api glance-api.conf --debug &
> It returns :
> 2012-03-07 21:53:50 26589 ERROR [glance.store.filesystem] Could not
> find filesystem_store_datadir in configuration options.
> 2012-03-07 21:53:50 26589 ERROR [glance.store.base] Failed to
> configure store correctly. Disabling add method.
> 2012-03-07 21:53:50 26589 ERROR [glance.store.s3] Could not find
> s3_store_host in configuration options.
> 2012-03-07 21:53:50 26589 ERROR [glance.store.base] Failed to
> configure store correctly. Disabling add method.
> 2012-03-07 21:53:50 26589 ERROR [glance.store.swift] Could not find
> swift_store_auth_address in configuration options.
> 2012-03-07 21:53:50 26589 ERROR [glance.store.base] Failed to
> configure store correctly. Disabling add method.
> Traceback (most recent call last):
> File "/usr/local/bin/glance-api", line 5, in <module>
> pkg_resources.run_script('glance==2012.1', 'glance-api')
> File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 467,
> in run_script
> self.require(requires)[0].run_script(script_name, ns)
> File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1200,
> in run_script
> execfile(script_filename, namespace, namespace)
> File
> "/usr/local/lib/python2.7/dist-packages/glance-2012.1-py2.7.egg/EGG-INFO/scripts/glance-api",
> line 48, in <module>
> app = config.load_paste_app(conf)
> File
> "/usr/local/lib/python2.7/dist-packages/glance-2012.1-py2.7.egg/glance/common/config.py",
> line 174, in load_paste_app
> app = wsgi.paste_deploy_app(conf_file, app_name, conf)
> File
> "/usr/local/lib/python2.7/dist-packages/glance-2012.1-py2.7.egg/glance/common/wsgi.py",
> line 647, in paste_deploy_app
> return deploy.loadapp("config:%s" % paste_config_file, name=app_name)
> File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 247, in loadapp
> return loadobj(APP, uri, name=name, **kw)
> File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 272, in loadobj
> return context.create()
> File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 710, in create
> return self.object_type.invoke(self)
> File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 203, in invoke
> app = context.app_context.create()
> File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 710, in create
> return self.object_type.invoke(self)
> File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py",
> line 146, in invoke
> return fix_call(context.object, context.global_conf,
> **context.local_conf)
> File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line
> 56, in fix_call
> val = callable(*args, **kw)
> File
> "/usr/local/lib/python2.7/dist-packages/glance-2012.1-py2.7.egg/glance/common/wsgi.py",
> line 573, in __call__
> return factory(self.conf, **local_conf)
> File
> "/usr/local/lib/python2.7/dist-packages/glance-2012.1-py2.7.egg/glance/api/v1/router.py",
> line 37, in __init__
> images_resource = images.create_resource(conf)
> File
> "/usr/local/lib/python2.7/dist-packages/glance-2012.1-py2.7.egg/glance/api/v1/images.py",
> line 965, in create_resource
> return wsgi.Resource(Controller(conf), deserializer, serializer)
> File
> "/usr/local/lib/python2.7/dist-packages/glance-2012.1-py2.7.egg/glance/api/v1/images.py",
> line 100, in __init__
> self.policy = policy.Enforcer(conf)
> File
> "/usr/local/lib/python2.7/dist-packages/glance-2012.1-py2.7.egg/glance/api/policy.py",
> line 41, in __init__
> self.policy_path = self._find_policy_file(conf)
> File
> "/usr/local/lib/python2.7/dist-packages/glance-2012.1-py2.7.egg/glance/api/policy.py",
> line 66, in _find_policy_file
> raise cfg.ConfigFilesNotFoundError(('policy.json',))
> glance.common.cfg.ConfigFilesNotFoundError: Failed to read some
> config files: policy.json
> 
> 
> because I don't want to use swift and s3,I add "#" in the head of
> every line about swift and s3..and configure "
> filesystem_store_datadir = /var/lib/glance/images/"..
> but It still the same return when I enter the cmd again..
> and now ,I have no idea of how to get it start ..
> Looking for anyone's help :)
> thanks a lot..
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to