On 01.05.15 20:26, Dan Bode wrote:
> Hi All,
> 
> I'm trying to install contrail with kilo and I had a few questions.
> 
> What is the current state? Is this something that should just work? I
> noticed that the core_plugin for opencontrail is in the neutron source
> (which seems promising), but what about other plugins (specifically
> loadbalancer and quotadriver?)
> 
> I'm trying to get kilo working with 1.21 and it seems like there are
> some code incompatibilities with the loadbalancer plugin:

We're interested in this too, though with 2.0 (currently using) or
newer. I've got so far that neutron net-list is working now on a kilo
setup on trusty with cloud-archive:kilo packages. I've commented out the
loadbalancer plugin in neutron.conf and patched

the contrail nova driver:
$ diff -u
/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/contrail_plugin.py
contrail_plugin.py
---
/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/contrail_plugin.py
2014-12-25 20:10:37.000000000 +0100
+++ contrail_plugin.py  2015-05-05 13:10:43.115374908 +0200
@@ -27,9 +27,12 @@
 from neutron.extensions import portbindings
 from neutron.extensions import securitygroup
 from neutron import neutron_plugin_base_v2
-from neutron.openstack.common import importutils
-from neutron.openstack.common import jsonutils as json
-from neutron.openstack.common import log as logging
+from oslo_utils import importutils
+#from neutron.openstack.common import importutils
+from oslo_serialization import jsonutils as json
+#from neutron.openstack.common import jsonutils as json
+from oslo_log import log as logging
+#from neutron.openstack.common import log as logging
 from simplejson import JSONDecodeError

 LOG = logging.getLogger(__name__)


$ diff -u
/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/quota/driver.py
driver.py
---
/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/quota/driver.py
2014-12-25 20:10:37.000000000 +0100
+++ driver.py   2015-05-05 13:11:06.591396968 +0200
@@ -3,7 +3,8 @@
 import ConfigParser
 from pprint import pformat

-from neutron.openstack.common import log as logging
+#from neutron.openstack.common import log as logging
+from oslo_log import log as logging

 from oslo.config import cfg
 from httplib2 import Http

But now contrail-api is still unhappy, I think partly because the
"default" security group is now hidden from the user (nova secgroup-list
does also not list it, but it's there)

upstart/contrail-api.log:

Traceback (most recent call last):
  File
"/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_api_server.py",
line 480, in handler_trap_exception
    response = handler(*args, **kwargs)
  File
"/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/gen/vnc_api_server_gen.py",
line 20218, in virtual_machine_interfaces_http_post
    ref_uuid = db_conn.fq_name_to_uuid(obj_type, ref['to'])
  File
"/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_ifmap.py",
line 1604, in fq_name_to_uuid
    obj_uuid = self._cassandra_db.fq_name_to_uuid(obj_type, fq_name)
  File "/usr/lib/python2.7/dist-packages/cfgm_common/vnc_cassandra.py",
line 223, in fq_name_to_uuid
    raise NoIdError('%s %s' % (obj_type, fq_name))
NoIdError: Unknown id: security_group ['default-domain', 'admin', 'default']

and when creating a heat stack with networks/subnets and stuff:

 /usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py in 
plugin_create_port(self=<vnc_openstack.neutron_plugin_interface.NeutronPluginInterface
 object>, context={'is_admin': True, 'operation': 'CREATE', 'roles': 
['heat_stack_owner', 'admin'], 'tenant': '583b10b860824686a6be26061e485a6a', 
'tenant_id': '583b10b860824686a6be26061e485a6a', 'type': 'port', 'user_id': 
'458fa2ae467b4d8882e1782bca76e915'}, port={'fields': None, 'filters': None, 
'resource': {'admin_state_up': True, 'binding:vnic_type': 'normal', 
'device_id': u'', 'device_owner': u'', 'extra_dhcp_opts': None, 'name': 
'check_instance_boot-testnode_admin_port-3g7s24efbaoy', 'network_id': 
'cd5c200c-ac12-4ba7-8fed-edc0dfa4c90a', 'tenant_id': 
'583b10b860824686a6be26061e485a6a'}})
  390         try:
  391             cfgdb = self._get_user_cfgdb(context)
  392             net_info = cfgdb.port_create(context, port['resource'])
  393             return net_info
  394         except Exception as e:
net_info undefined
cfgdb = <vnc_openstack.neutron_plugin_db.DBInterface object>
cfgdb.port_create = <bound method DBInterface.port_create of
<vnc_openstack.neutron_plugin_db.DBInterface object>>
context = {'is_admin': True, 'operation': 'CREATE', 'roles':
['heat_stack_owner', 'admin'], 'tenant':
'583b10b860824686a6be26061e485a6a', 'tenant_id':
'583b10b860824686a6be26061e485a6a', 'type': 'port', 'user_id':
'458fa2ae467b4d8882e1782bca76e915'}
port = {'fields': None, 'filters': None, 'resource': {'admin_state_up':
True, 'binding:vnic_type': 'normal', 'device_id': u'', 'device_owner':
u'', 'extra_dhcp_opts': None, 'name':
'check_instance_boot-testnode_admin_port-3g7s24efbaoy', 'network_id':
'cd5c200c-ac12-4ba7-8fed-edc0dfa4c90a', 'tenant_id':
'583b10b860824686a6be26061e485a6a'}}

 /usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py in
port_create(self=<vnc_openstack.neutron_plugin_db.DBInterface object>,
context={'is_admin': True, 'operation': 'CREATE', 'roles':
['heat_stack_owner', 'admin'], 'tenant':
'583b10b860824686a6be26061e485a6a', 'tenant_id':
'583b10b860824686a6be26061e485a6a', 'type': 'port', 'user_id':
'458fa2ae467b4d8882e1782bca76e915'}, port_q={'admin_state_up': True,
'binding:vnic_type': 'normal', 'device_id': u'', 'device_owner': u'',
'extra_dhcp_opts': None, 'name':
'check_instance_boot-testnode_admin_port-3g7s24efbaoy', 'network_id':
'cd5c200c-ac12-4ba7-8fed-edc0dfa4c90a', 'tenant_id':
'583b10b860824686a6be26061e485a6a'})
 3494
 3495         # create the object
 3496         port_id =
self._resource_create('virtual_machine_interface', port_obj)
 3497         try:
 3498             if 'fixed_ips' in port_q:
port_id undefined
self = <vnc_openstack.neutron_plugin_db.DBInterface object>
self._resource_create = <bound method DBInterface._resource_create of
<vnc_openstack.neutron_plugin_db.DBInterface object>>
port_obj = <vnc_api.gen.resource_client.VirtualMachineInterface object>

 /usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py in
_resource_create(self=<vnc_openstack.neutron_plugin_db.DBInterface
object>, resource_type='virtual_machine_interface',
obj=<vnc_api.gen.resource_client.VirtualMachineInterface object>)
  307         create_method = getattr(self._vnc_lib, resource_type +
'_create')
  308         try:
  309             obj_uuid = create_method(obj)
  310         except RefsExistError:
  311             obj.uuid = str(uuid.uuid4())
obj_uuid undefined
create_method = <bound method VncApi.virtual_machine_interface_create of
<vnc_api.vnc_api.VncApi object>>
obj = <vnc_api.gen.resource_client.VirtualMachineInterface object>

 /usr/lib/python2.7/dist-packages/vnc_api/gen/vnc_api_client_gen.py in
virtual_machine_interface_create(self=<vnc_api.vnc_api.VncApi object>,
obj=<vnc_api.gen.resource_client.VirtualMachineInterface object>)
 5592         content = self._request_server(rest.OP_POST,
 5593
vnc_api.gen.resource_client.VirtualMachineInterface.create_uri,
 5594                        data = json_body)
 5595
 5596         virtual_machine_interface_dict =
json.loads(content)['virtual-machine-interface']
data undefined
json_body = '{"virtual-machine-interface":{"fq_name":
["defau...instance_boot-testnode_admin_port-3g7s24efbaoy"}}'

 /usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py in
_request_server(self=<vnc_api.vnc_api.VncApi object>, op=1,
url=u'/virtual-machine-interfaces',
data='{"virtual-machine-interface":{"fq_name":
["defau...instance_boot-testnode_admin_port-3g7s24efbaoy"}}',
retry_on_error=True, retry_after_authn=False, retry_count=30)
  340         return self._request(op, url, data=data,
retry_on_error=retry_on_error,
  341                       retry_after_authn=retry_after_authn,
  342                       retry_count=retry_count)
  343
  344     def _request(self, op, url, data=None, retry_on_error=True,
retry_count = 30

 /usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py in
_request(self=<vnc_api.vnc_api.VncApi object>, op=1,
url=u'/virtual-machine-interfaces',
data='{"virtual-machine-interface":{"fq_name":
["defau...instance_boot-testnode_admin_port-3g7s24efbaoy"}}',
retry_on_error=True, retry_after_authn=False, retry_count=30)
  398                 raise BadRequest(status, content)
  399             else:  # Unknown Error
  400                 raise HttpError(status, content)
  401         # end while True
  402
global HttpError = <class 'cfgm_common.exceptions.HttpError'>
status = 500
content = u'Internal Server Error'
<class 'cfgm_common.exceptions.HttpError'>: HTTP Status: 500 Content:
Internal Server Error
    __class__ = <class 'cfgm_common.exceptions.HttpError'>
    __delattr__ = <method-wrapper '__delattr__' of HttpError object>
    __dict__ = {'content': u'Internal Server Error', 'status_code': 500}
    __doc__ = None
    __format__ = <built-in method __format__ of HttpError object>
    __getattribute__ = <method-wrapper '__getattribute__' of HttpError
object>
    __getitem__ = <method-wrapper '__getitem__' of HttpError object>
    __getslice__ = <method-wrapper '__getslice__' of HttpError object>
    __hash__ = <method-wrapper '__hash__' of HttpError object>
    __init__ = <bound method HttpError.__init__ of HttpError()>
    __module__ = 'cfgm_common.exceptions'
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of HttpError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of HttpError object>
    __repr__ = <method-wrapper '__repr__' of HttpError object>
    __setattr__ = <method-wrapper '__setattr__' of HttpError object>
    __setstate__ = <built-in method __setstate__ of HttpError object>
    __sizeof__ = <built-in method __sizeof__ of HttpError object>
    __str__ = <bound method HttpError.__str__ of HttpError()>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __unicode__ = <built-in method __unicode__ of HttpError object>
    __weakref__ = None
    args = ()
    content = u'Internal Server Error'
    message = ''
    status_code = 500

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

Traceback (most recent call last):
  File
"/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py",
line 392, in plugin_create_port
    net_info = cfgdb.port_create(context, port['resource'])
  File
"/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py",
line 3496, in port_create
    port_id = self._resource_create('virtual_machine_interface', port_obj)
  File
"/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py",
line 309, in _resource_create
    obj_uuid = create_method(obj)
  File
"/usr/lib/python2.7/dist-packages/vnc_api/gen/vnc_api_client_gen.py",
line 5594, in virtual_machine_interface_create
    data = json_body)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 342,
in _request_server
    retry_count=retry_count)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 400,
in _request
    raise HttpError(status, content)
HttpError: HTTP Status: 500 Content: Internal Server Error


Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bottle.py", line 856, in _handle
    return route.call(**args)
  File "/usr/lib/python2.7/dist-packages/bottle.py", line 1721, in wrapper
    rv = callback(*a, **ka)
  File
"/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py",
line 467, in plugin_http_post_port
    return self.plugin_create_port(context, port)
  File
"/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py",
line 396, in plugin_create_port
    raise e
HttpError: HTTP Status: 500 Content: Internal Server Error


> 
>>>> import
> neutron_plugin_contrail.plugins.opencontrail.loadbalancer.plugin.LoadBalancerPlugin
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/loadbalancer/plugin.py",
> line 4, in <module>
>     from loadbalancer_db import LoadBalancerPluginDb
>   File
> "/usr/lib/python2.7/dist-packages/neutron_plugin_contrail/plugins/opencontrail/loadbalancer/loadbalancer_db.py",
> line 10, in <module>
>     from neutron.extensions import loadbalancer
> ImportError: cannot import name loadbalancer
> 
> 
> 
> _______________________________________________
> Dev mailing list
> [email protected]
> http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org
> 


-- 
SysEleven GmbH
Umspannwerk - Aufgang C
Ohlauer Straße 43
10999 Berlin

Tel +49 30 233 2012 0
Fax +49 30 616 755 50

http://www.syseleven.de
http://www.facebook.com/SysEleven

Firmensitz: Berlin
Registergericht: AG Berlin Charlottenburg, HRB 108571 B
Geschäftsführer: Marc Korthaus, Thomas Lohner, Jens Ihlenfeld

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Dev mailing list
[email protected]
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org

Reply via email to