Uploaded image for project: 'netvirt'
  1. netvirt
  2. NETVIRT-553

openstack networking-odl v2 driver sync: synced neutron ports have a bad security_group attribute

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Cannot Reproduce
    • Boron
    • None
    • General
    • None
    • Operating System: All
      Platform: All

    • 8028

    Description

      Scenario:
      1. 2 VM's are connected to 2 different networks, both connected to a router.
      2. Stop odl, delete all data (data,journal,snapshot).
      3. Delete br-int from all ovs nodes.
      4. Start ODL.
      (5. Re-connect tap interfaces after sync is done)

      synced neutron ports have a bad security_group attribute, for example (I add the exception but I'm not sure it's related):
      2017-03-08 20:18:09.730 10361 INFO networking_odl.journal.journal [-] Syncing create port 51b836d5-48d6-4518-9db0-d74fbc2478ba
      2017-03-08 20:18:09.731 10361 DEBUG networking_odl.common.client [-] Sending METHOD (post) URL (http://10.0.77.194:8080/controller/nb/v2/neutron/ports) JSON ({
      "port": {
      "port_security_enabled": true,
      "binding:host_id": "",
      "name": "",
      "allowed_address_pairs": [],
      "admin_state_up": true,
      "network_id": "51b08653-9f7f-4056-8125-1d7a7ce3ea88",
      "tenant_id": "78c44b9db387466791cf452c658d4629",
      "binding:vif_details": {},
      "binding:vnic_type": "normal",
      "binding:vif_type": "unbound",
      "device_owner": "",
      "mac_address": "fa:16:3e:46:02:0f",
      "binding:profile": {},
      "project_id": "78c44b9db387466791cf452c658d4629",
      "fixed_ips": [

      { "subnet_id": "66cb4774-9ac8-4631-8d48-6e6f33cf7232", "ip_address": "10.0.123.4" }

      ],
      "id": "51b836d5-48d6-4518-9db0-d74fbc2478ba",
      "security_groups": [

      { "id": "0695459d-1d09-4018-9115-e8d4bc016ac8" }

      ],
      "device_id": ""
      }
      }) request /opt/stack/networking-odl/networking_odl/common/client.py:86
      ...
      2017-03-08 20:30:30.659 10270 INFO networking_odl.journal.journal [-] Syncing create port 51b836d5-48d6-4518-9db0-d74fbc2478ba
      2017-03-08 20:30:30.659 10270 DEBUG networking_odl.common.client [-] Sending METHOD (post) URL (http://10.0.77.194:8080/controller/nb/v2/neutron/ports) JSON ({
      "port": {
      "allowed_address_pairs": [],
      "extra_dhcp_opts": [],
      "updated_at": "2017-03-08T18:18:10Z",
      "device_owner": "compute:nova",
      "revision_number": 8,
      "port_security_enabled": true,
      "binding:profile": {},
      "fixed_ips": [

      { "subnet_id": "66cb4774-9ac8-4631-8d48-6e6f33cf7232", "ip_address": "10.0.123.4" }

      ],
      "id": "51b836d5-48d6-4518-9db0-d74fbc2478ba",
      "security_groups": [
      "0695459d-1d09-4018-9115-e8d4bc016ac8"
      ],
      "binding:vif_details":

      { "port_filter": true }

      ,
      "binding:vif_type": "ovs",
      "mac_address": "fa:16:3e:46:02:0f",
      "project_id": "78c44b9db387466791cf452c658d4629",
      "binding:host_id": "cxtrm-46369-260-devstack-newton-2",
      "description": "",
      "device_id": "3baea22c-3e40-47d2-a1b0-65c61c5ccdae",
      "name": "",
      "admin_state_up": true,
      "network_id": "51b08653-9f7f-4056-8125-1d7a7ce3ea88",
      "tenant_id": "78c44b9db387466791cf452c658d4629",
      "created_at": "2017-03-08T18:18:09Z",
      "binding:vnic_type": "normal"
      }
      }) request /opt/stack/networking-odl/networking_odl/common/client.py:86
      2017-03-08 20:30:30.664 10270 INFO networking_odl.journal.journal [-] Syncing create port 61c15b48-fd95-43f0-81fd-ead4ef711aa2
      ...
      2017-03-08 20:30:30.680 10270 DEBUG networking_odl.common.client [-] Exception from ODL: 500 Server Error: Server Error for url: http://10.0.77.194:8080/controller/nb/v2/neutron/ports <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
      <title>Error 500 Server Error</title>
      </head>
      <body><h2>HTTP ERROR 500</h2>
      <p>Problem accessing /controller/nb/v2/neutron/ports. Reason:
      <pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.NullPointerException
      at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:210)
      at org.opendaylight.neutron.transcriber.AbstractNeutronInterface.toUuid(AbstractNeutronInterface.java:165)
      at org.opendaylight.neutron.transcriber.NeutronPortInterface.toMd(NeutronPortInterface.java:270)
      at org.opendaylight.neutron.transcriber.NeutronPortInterface.toMd(NeutronPortInterface.java:56)
      at org.opendaylight.neutron.transcriber.AbstractNeutronInterface.updateMd(AbstractNeutronInterface.java:118)
      at org.opendaylight.neutron.transcriber.AbstractNeutronInterface.addMd(AbstractNeutronInterface.java:101)
      at org.opendaylight.neutron.transcriber.AbstractNeutronInterface.add(AbstractNeutronInterface.java:282)
      at org.opendaylight.neutron.transcriber.AbstractNeutronInterface.add(AbstractNeutronInterface.java:292)
      at org.opendaylight.neutron.northbound.api.AbstractNeutronNorthbound.create(AbstractNeutronNorthbound.java:68)
      at org.opendaylight.neutron.northbound.api.NeutronPortsNorthbound.createPorts(NeutronPortsNorthbound.java:207)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
      at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
      at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
      at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
      at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
      at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
      at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
      at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
      at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
      at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
      at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1507)
      at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:247)
      at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:210)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1478)
      at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
      at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
      at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
      at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
      at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
      at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
      at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
      at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
      at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
      at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1478)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:69)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:240)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:427)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:75)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      at org.eclipse.jetty.server.Server.handle(Server.java:370)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
      at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:984)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1045)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:236)
      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      at java.lang.Thread.run(Thread.java:745)
      </pre>
      <hr /><i><small>Powered by Jetty://</small></i><br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>
      <br/>

      </body>
      </html>
      _check_rensponse /opt/stack/networking-odl/networking_odl/common/client.py:138
      2017-03-08 20:30:30.680 10270 ERROR networking_odl.common.client Traceback (most recent call last):
      2017-03-08 20:30:30.680 10270 ERROR networking_odl.common.client File "/opt/stack/networking-odl/networking_odl/common/client.py", line 134, in _check_rensponse
      2017-03-08 20:30:30.680 10270 ERROR networking_odl.common.client rensponse.raise_for_status()
      2017-03-08 20:30:30.680 10270 ERROR networking_odl.common.client File "/usr/lib/python2.7/site-packages/requests/models.py", line 862, in raise_for_status
      2017-03-08 20:30:30.680 10270 ERROR networking_odl.common.client raise HTTPError(http_error_msg, response=self)
      2017-03-08 20:30:30.680 10270 ERROR networking_odl.common.client HTTPError: 500 Server Error: Server Error for url: http://10.0.77.194:8080/controller/nb/v2/neutron/ports
      2017-03-08 20:30:30.680 10270 ERROR networking_odl.common.client
      2017-03-08 20:30:30.682 10270 ERROR networking_odl.common.client [-] REST request ( post ) to url ( ports ) is failed.Request body : [{u'port': {'allowed_address_pairs': [], 'extra_dhcp_opts': [], 'updated_at': '2017-03-08T18:18:10Z', 'device_owner': u'compute:nova', 'revision_number': 8, 'port_security_enabled': True, 'binding:profile': {}, 'fixed_ips': [

      {'subnet_id': u'66cb4774-9ac8-4631-8d48-6e6f33cf7232', 'ip_address': u'10.0.123.4'}

      ], 'id': u'51b836d5-48d6-4518-9db0-d74fbc2478ba', 'security_groups': [u'0695459d-1d09-4018-9115-e8d4bc016ac8'], 'binding:vif_details':

      {u'port_filter': True}

      , 'binding:vif_type': u'ovs', 'mac_address': u'fa:16:3e:46:02:0f', 'project_id': u'78c44b9db387466791cf452c658d4629', 'binding:host_id': u'cxtrm-46369-260-devstack-newton-2', 'description': u'', 'device_id': u'3baea22c-3e40-47d2-a1b0-65c61c5ccdae', 'name': u'', 'admin_state_up': True, 'network_id': u'51b08653-9f7f-4056-8125-1d7a7ce3ea88', 'tenant_id': u'78c44b9db387466791cf452c658d4629', 'created_at': '2017-03-08T18:18:09Z', 'binding:vnic_type': u'normal'}}] service
      2017-03-08 20:30:30.683 10270 ERROR networking_odl.journal.journal [-] Error syncing port create, id 51b836d5-48d6-4518-9db0-d74fbc2478ba Error: 500 Server Error: Server Error for url: http://10.0.77.194:8080/controller/nb/v2/neutron/ports

      Full logs can be found:
      1. https://gist.githubusercontent.com/anonymous/7ed4fb77e4a630121ed9e1a5e79f6d00/raw/c1fd7c0bf202913f6fe12bbf39075ddc1079ccc9/q-svc.log
      2. https://gist.githubusercontent.com/anonymous/7ed4fb77e4a630121ed9e1a5e79f6d00/raw/c1fd7c0bf202913f6fe12bbf39075ddc1079ccc9/karaf.log

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            dotan.sokolover@hpe.com dotans
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: