Keystone synchronization fails because of log file permissions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Juniper Openstack |
Fix Committed
|
Undecided
|
Unassigned | ||
R2.20 |
Fix Committed
|
Undecided
|
Unassigned | ||
OpenContrail |
Fix Committed
|
High
|
Hampapur Ajay |
Bug Description
If there is a permission problem with the log file, the API server openstack extension fails to initialize. The subsequent failure is very hard to debug... keystone tenant synchronization fails.
The vnc_openstack.err file should not be hardcoded into the code; this needs to be a configuration parameter (it should default to the api server file) and should be syslog compatible. Any initialization failure in the module should also cause the api-server initialization to fail so that the user is warned about the failure rather than continue without the ability to sync projects from keystone.
ERROR:stevedore
Traceback (most recent call last):
File "/usr/lib/
load_plugins
verify_
File "/usr/lib/
load_one_plugin
obj = plugin(
File "/usr/lib/
n __init__
self.
ections)
File "/usr/lib/
n __init__
backupCount=5)
File "/usr/lib/
BaseRotatin
File "/usr/lib/
logging.
File "/usr/lib/
StreamHandl
File "/usr/lib/
IOError: [Errno 13] Permission denied: '/var/log/
Changed in opencontrail: | |
importance: | Undecided → High |
Changed in opencontrail: | |
status: | New → Incomplete |
status: | Incomplete → New |
tags: | added: config |
Changed in juniperopenstack: | |
importance: | Undecided → High |
Changed in opencontrail: | |
assignee: | nobody → Hampapur Ajay (hajay) |
Changed in juniperopenstack: | |
assignee: | nobody → Hampapur Ajay (hajay) |
no longer affects: | juniperopenstack |
no longer affects: | juniperopenstack/r2.20 |
no longer affects: | juniperopenstack/trunk |
no longer affects: | juniperopenstack |
no longer affects: | juniperopenstack/r2.20 |
no longer affects: | juniperopenstack/trunk |
Changed in juniperopenstack: | |
status: | New → Fix Committed |
Changed in opencontrail: | |
status: | New → Fix Committed |
As you mentionned, this issue is very hard to debug. It took me a while to figure out what was happening, and that this bug was causing my troubles. It prevents devstack + contrail-installer from working out of the box:
log files are present but not writeable, thus vnc_openstack will not fail to initialize, but logging will raise during exception handling in _resync_ domains_ projects_ forever:
Traceback (most recent call last): contrail/ controller/ src/config/ vnc_openstack/ vnc_openstack/ __init_ _.py", line 509, in _resync_ domains_ projects_ forever all_projects( ) contrail/ controller/ src/config/ vnc_openstack/ vnc_openstack/ __init_ _.py", line 427, in _resync_ all_projects _get_keystone_ conn() contrail/ controller/ src/config/ vnc_openstack/ vnc_openstack/ __init_ _.py", line 160, in _ksv2_get_conn self._insecure) python- keystoneclient/ keystoneclient/ v2_0/client. py", line 147, in __init__ authenticate( ) python- keystoneclient/ keystoneclient/ utils.py" , line 318, in inner python- keystoneclient/ keystoneclient/ httpclient. py", line 425, in authenticate raw_token_ from_identity_ service( **kwargs) python- keystoneclient/ keystoneclient/ v2_0/client. py", line 190, in get_raw_ token_from_ identity_ service ilure: Authorization Failed: Unable to establish connection to http:// 192.168. 122.11: 5000/v2. 0/tokens
File "/opt/stack/
retry = self._resync_
File "/opt/stack/
self.
File "/opt/stack/
insecure=
File "/opt/stack/
self.
File "/opt/stack/
return func(*args, **kwargs)
File "/opt/stack/
resp = self.get_
File "/opt/stack/
"%s" % e)
AuthorizationFa
As a consequence self._ks will never be reset to None (self._ks = keystoneclient. openstack. common. apiclient. exceptions. AuthorizationFa ilure), and neutron api will stay stuck even if keystone becomes available.:
Traceback (most recent call last): contrail/ controller/ src/config/ vnc_openstack/ vnc_openstack/ neutron_ plugin_ interface. py", line 146, in plugin_ create_ network create( network[ 'resource' ]) contrail/ controller/ src/config/ vnc_openstack/ vnc_openstack/ neutron_ plugin_ db.py", line 2067, in network_create neutron_ to_vnc( network_ q, CREATE) contrail/ controller/ src/config/ vnc_openstack/ vnc_openstack/ neutron_ plugin_ db.py", line 1107, in _network_ neutron_ to_vnc read(proj_ id=project_ id) contrail/ controller/ src/config/ vnc_openstack/ vnc_openstack/ neutron_ plugin_ db.py", line 203, in _project_read lib.project_ read(id= proj_id, fq_name=fq_name) lib/python2. 7/dist- packages/ vnc_api/ gen/vnc_ api_client_ gen.py" , line 4990, in project_read server( rest.OP_ GET, uri, query_params) lib/python2. 7/dist- packages/ vnc_api/ vnc_api. py", line 366, in _request_server 9fc74e34- 8b83-4484- b476-cde62cf447 f9 body {'exclude_ back_refs' : True, 'exclude_children': True} response No project object found for id 9fc74e34- 8b83-4484- b476-cde62cf447 f9
File "/opt/stack/
net_info = cfgdb.network_
File "/opt/stack/
net_obj = self._network_
File "/opt/stack/
project_obj = self._project_
File "/opt/stack/
proj_obj = self._vnc_
File "/usr/local/
content = self._request_
File "/usr/local/
% (op, url, data, content))
NoIdError: Unknown id: Error: oper 2 url /project/
Traceback (most recent call last): lib/python2. 7...
File "/usr/local/