provisioning fails on control-only node

Bug #1449589 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
Ignatious Johnson Christopher
Trunk
Fix Committed
High
Ignatious Johnson Christopher

Bug Description

R2.20 3 Ubuntu 14.04 Multi node setup

In the below sanity setup, host3 is a control-only node.
During provisioning, provision_control.py script fails due to auth failure. This is because /etc/contrail/vnc_api_lib.ini says that keystone ip is 127.0.0.1..

env.roledefs = {
    'all': [host1, host2, host3, host4, host5, host6],
    'cfgm': [host1, host2],
    'webui': [host1],
    'openstack': [host1],
    'control': [host2, host3],
    'collector': [host1],
    'database': [host1],
    'compute': [host4, host5, host6],
    'build': [host_build]
}

env.hostnames = {
    'all': ['nodei11', 'nodei12', 'nodei13', 'nodei14', 'nodei15', 'nodei26-compute-vm']
}

http://anamika.englab.juniper.net:8080/job/ubuntu-14-04_juno_Multi_Node_Sanity/159/console

2015-04-28 15:39:15:025672: [root@10.204.217.125] sudo: python provision_control.py --api_server_ip 10.204.217.123 --api_server_port 8082 --router_asn 64512 --admin_user admin --admin_password contrail123 --admin_tenant_name admin
2015-04-28 15:39:15:026109: [root@10.204.217.125] out: Traceback (most recent call last):
2015-04-28 15:39:15:324518: [root@10.204.217.125] out: File "provision_control.py", line 133, in <module>
2015-04-28 15:39:15:324647: [root@10.204.217.125] out: main()
2015-04-28 15:39:15:324807: [root@10.204.217.125] out: File "provision_control.py", line 129, in main
2015-04-28 15:39:15:324916: [root@10.204.217.125] out: ControlProvisioner(args_str)
2015-04-28 15:39:15:325021: [root@10.204.217.125] out: File "provision_control.py", line 26, in __init__
2015-04-28 15:39:15:325123: [root@10.204.217.125] out: self._args.api_server_port, '/')
2015-04-28 15:39:15:325226: [root@10.204.217.125] out: File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 200, in __init__
2015-04-28 15:39:15:325344: [root@10.204.217.125] out: retry_on_error=False)
2015-04-28 15:39:15:325450: [root@10.204.217.125] out: File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 402, in _request
2015-04-28 15:39:15:325555: [root@10.204.217.125] out: self._headers = self._authenticate(content, self._headers)
2015-04-28 15:39:15:325660: [root@10.204.217.125] out: File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 250, in _authenticate
2015-04-28 15:39:15:325764: [root@10.204.217.125] out: raise RuntimeError('Unable to connect to keystone for authentication. Verify keystone server details')
2015-04-28 15:39:15:325868: [root@10.204.217.125] out: RuntimeError: Unable to connect to keystone for authentication. Verify keystone server details
2015-04-28 15:39:15:326022: [root@10.204.217.125] out:
2015-04-28 15:39:15:342293:

Correct file as seen on nodei11 :
===========================

root@nodei11:~/fabric-utils# cat /etc/contrail/vnc_api_lib.ini

[global]
;WEB_SERVER = 127.0.0.1
;WEB_PORT = 9696 ; connection through quantum plugin

WEB_SERVER = 127.0.0.1
WEB_PORT = 8082 ; connection to api-server directly
BASE_URL = /
;BASE_URL = /tenants/infra ; common-prefix for all URLs

; Authentication settings (optional)
[auth]
AUTHN_TYPE = keystone
AUTHN_PROTOCOL = http
AUTHN_SERVER=10.204.217.123
AUTHN_PORT = 35357
AUTHN_URL = /v2.0/tokens
root@nodei11:~/fabric-utils#

File on nodei13 :
==================

[global]
;WEB_SERVER = 127.0.0.1
;WEB_PORT = 9696 ; connection through quantum plugin

WEB_SERVER = 127.0.0.1
WEB_PORT = 8082 ; connection to api-server directly
BASE_URL = /
;BASE_URL = /tenants/infra ; common-prefix for all URLs

; Authentication settings (optional)
[auth]
;AUTHN_TYPE = keystone
;AUTHN_PROTOCOL = http
;AUTHN_SERVER = 127.0.0.1
;AUTHN_PORT = 35357
;AUTHN_URL = /v2.0/tokens

-------------

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

Review in progress for https://review.opencontrail.org/9643
Submitter: Ignatious Johnson Christopher (<email address hidden>)

Changed in juniperopenstack:
status: New → In Progress
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.20

Review in progress for https://review.opencontrail.org/9644
Submitter: Ignatious Johnson Christopher (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/9644
Committed: http://github.org/Juniper/contrail-fabric-utils/commit/e9161d6a98dd582feb6e5eac66559336756e3108
Submitter: Zuul
Branch: R2.20

commit e9161d6a98dd582feb6e5eac66559336756e3108
Author: Ignatious Johnson Christopher <email address hidden>
Date: Tue Apr 28 14:40:32 2015 -0700

Executing prov_<role>_node tasks from cfgm, as vnc_api_lib.ini,
will not be present in all the role nodes, and it is not necessary to
create vnc_api_lib.ini in all the role nodes.

Change-Id: I8b042958c7bcff6ce279ce5ff1f8506cee82947c
Closes-Bug: 1449589

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

Reviewed: https://review.opencontrail.org/9643
Committed: http://github.org/Juniper/contrail-fabric-utils/commit/2afdbcf8a11d1b1ea5543d10057c85a015761f1a
Submitter: Zuul
Branch: master

commit 2afdbcf8a11d1b1ea5543d10057c85a015761f1a
Author: Ignatious Johnson Christopher <email address hidden>
Date: Tue Apr 28 14:36:02 2015 -0700

Executing prov_<role>_node tasks from cfgm, as vnc_api_lib.ini,
will not be present in all the role nodes, and it is not necessary to
create vnc_api_lib.ini in all the role nodes.

Change-Id: Ic594adb30b1beb52e4ba7f2b2c36ce61f23869cb
Closes-Bug: 1449589

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.