config: cannot create virtual-network in default-domain in keystone v3 mode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Juniper Openstack |
Fix Committed
|
Critical
|
Hampapur Ajay |
Bug Description
When keystone v3 is used, the default domain id in contrail is tracked to match with 'default' in keystone in OpenstackDriver object which should be a singleton.
However the ResourceApiDriver class instead of using this singleton constructs another instance of OpenstackDriver and then loses the value of _vnc_default_
Traceback (most recent call last):
File "/opt/contrail/
response_
File "/opt/contrail/
return getattr(
File "/opt/contrail/
self.
File "/opt/contrail/
proj_obj = vnc_api.
File "/usr/lib/
super(Project, self)._
File "/usr/lib/
self.
AttributeError: 'str' object has no attribute '_type'
This is because dom_obj is in fact an error message asking for either name or id to be specified.
This can be fixed by using a singleton as below:
--- /opt/contrail/
+++ vnc_openstack_
@@ -49,8 +49,11 @@
return (auth_user, auth_passwd, admin_token, admin_tenant, auth_url,
+openstack_driver = None
class OpenstackDriver
def __init__(self, api_server_ip, api_server_port, conf_sections):
+ global openstack_driver
+ openstack_driver = self
@@ -481,7 +484,7 @@
- self._openstack_drv = OpenstackDriver
+ self._openstack_drv = openstack_driver
# Tracks which domains/projects have been sync'd from keystone to contrail api server
Changed in juniperopenstack: | |
assignee: | nobody → Hampapur Ajay (hajay) |
importance: | Undecided → Critical |
Changed in juniperopenstack: | |
status: | New → Fix Committed |
Reviewed: https:/ /review. opencontrail. org/3310 github. org/Juniper/ contrail- controller/ commit/ fb3ff4fce3b7459 c6333cde82be6fd b9407d6ffb
Committed: http://
Submitter: Zuul
Branch: master
commit fb3ff4fce3b7459 c6333cde82be6fd b9407d6ffb
Author: Hampapur Ajay <email address hidden>
Date: Tue Sep 30 18:16:38 2014 -0700
Use a singleton instance of OpenstackDriver and use it where needed
Change-Id: I689a6a72f9e4b8 8130a87a1008309 d5f593e50d5
Closes-Bug: 1375984