schema service should not stop if Authentication fails with keystone

Bug #1477907 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
High
Sachin Bansal
Trunk
Fix Committed
High
Sachin Bansal

Bug Description

R2.20 Build 71

In HA environments , it can so happen that the keystone auth may not be passing as soon those services come up.
For ex: mysql may not be ready.

When schema tries to start in this scenario, supervisor tries restarting it 5 times and gives up.
Below exception seems to be an unhandled exception which is causing schema to fail

The above is a description of an error in a Python program. Here is
the original traceback:

Traceback (most recent call last):
  File "/usr/bin/contrail-schema", line 9, in <module>
    load_entry_point('schema-transformer==0.1dev', 'console_scripts', 'contrail-schema')()
  File "/usr/lib/python2.7/dist-packages/schema_transformer/to_bgp.py", line 3932, in server_main
    main()
  File "/usr/lib/python2.7/dist-packages/schema_transformer/to_bgp.py", line 3926, in main
    args)
  File "/usr/lib/python2.7/dist-packages/cfgm_common/zkclient.py", line 291, in master_election
    self._election.run(self._zk_election_callback, func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/kazoo/recipe/election.py", line 48, in run
    func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cfgm_common/zkclient.py", line 283, in _zk_election_callback
    func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/schema_transformer/to_bgp.py", line 3894, in run_schema_transformer
    args.api_server_ip, args.api_server_port)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 200, in __init__
    retry_on_error=False)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 402, in _request
    self._headers = self._authenticate(content, self._headers)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 260, in _authenticate
    raise RuntimeError('Authentication Failure')
RuntimeError: Authentication Failure

Tags: config ha
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/13051
Submitter: Sachin Bansal (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/13078
Submitter: Sachin Bansal (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/13051
Committed: http://github.org/Juniper/contrail-controller/commit/eba050fcbdede3146979da609941e524b087495a
Submitter: Zuul
Branch: master

commit eba050fcbdede3146979da609941e524b087495a
Author: Sachin Bansal <email address hidden>
Date: Thu Aug 13 17:49:30 2015 -0700

Add retry on RuntimeError while connecting to api server

While connecting to API server, the library could raise RuntimeError if
authentication fails. During system init, it is possible that keystone server is
not yet up. We should retry on such failure.

Change-Id: I2cc84c1d6fbd3e78fb6cb42d3c21944b54c0061b
Closes-Bug: 1477907

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/13078
Committed: http://github.org/Juniper/contrail-controller/commit/e6112b908d6b48d3f8f458e2c8ade4aa54ebb1bb
Submitter: Zuul
Branch: R2.20

commit e6112b908d6b48d3f8f458e2c8ade4aa54ebb1bb
Author: Sachin Bansal <email address hidden>
Date: Thu Aug 13 17:49:30 2015 -0700

Add retry on RuntimeError while connecting to api server

While connecting to API server, the library could raise RuntimeError if
authentication fails. During system init, it is possible that keystone server is
not yet up. We should retry on such failure.

Change-Id: I2cc84c1d6fbd3e78fb6cb42d3c21944b54c0061b
Closes-Bug: 1477907
(cherry picked from commit 44fe58f7857fb33020412e9b0bd832f505eb3978)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.22-dev

Review in progress for https://review.opencontrail.org/13927
Submitter: Vinay Vithal Mahuli (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20.x

Review in progress for https://review.opencontrail.org/14206
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/14206
Committed: http://github.org/Juniper/contrail-controller/commit/05c2f31919d63b2662f50cbb9c2d85f298e1dca0
Submitter: Zuul
Branch: R2.20.x

commit 05c2f31919d63b2662f50cbb9c2d85f298e1dca0
Author: Sachin Bansal <email address hidden>
Date: Thu Aug 13 17:49:30 2015 -0700

Add retry on RuntimeError while connecting to api server

While connecting to API server, the library could raise RuntimeError if
authentication fails. During system init, it is possible that keystone server is
not yet up. We should retry on such failure.

Change-Id: I2cc84c1d6fbd3e78fb6cb42d3c21944b54c0061b
Closes-Bug: 1477907
(cherry picked from commit 44fe58f7857fb33020412e9b0bd832f505eb3978)
(cherry picked from commit e6112b908d6b48d3f8f458e2c8ade4aa54ebb1bb)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.