Uploaded image for project: 'hc2vpp'
  1. hc2vpp
  2. HC2VPP-181

HC2VPP Static Route Delete fails if the outgoing interface is deleted before

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • routing
    • None

      Assuming I have a tap interface with name "neutron_port_11100002-0afa-41cc-8f2f-8d62b6e9bc1c" existent in VPP, and I add static route via this interface.

      Route information looks like:

      {
          "routing": {
              "routing-instance": [
                  {
                      "name": "vpp-routing-instance",
                      "routing-protocols": {
                          "routing-protocol": [
                              {
                                  "name": "static-routing-1",
                                  "description": "Static route added from GBP for flat L3 overlay",
                                  "vpp-routing:vpp-protocol-attributes": {
                                      "primary-vrf": 1
                                  },
                                  "type": "hc2vpp-ietf-routing:static",
                                  "static-routes": {
                                      "hc2vpp-ietf-ipv4-unicast-routing:ipv4": {
                                          "route": [
                                              {
                                                  "id": 1,
                                                  "next-hop": "10.0.0.100",
                                                  "outgoing-interface": "GigabitEthernet0/a/0",
                                                  "destination-prefix": "10.0.0.100/32"
                                              },
                                              {
                                                  "id": 2,
                                                  "next-hop": "10.11.12.3",
                                                  "outgoing-interface": "neutron_port_11100002-0afa-41cc-8f2f-8d62b6e9bc1c",
                                                  "destination-prefix": "10.11.12.3/32"
                                              },
                                              {
                                                  "id": 3,
                                                  "next-hop": "169.254.169.254",
                                                  "outgoing-interface": "neutron_port_11100002-0afa-41cc-8f2f-8d62b6e9bc1c",
                                                  "destination-prefix": "169.254.169.254/32"
                                              }
                                          ]
                                      }
                                  }
                              }
                          ]
                      }
                  }
              ]
          }
      }
      

      If I delete the route first and the interface later, everything works perfectly. But when I delete the interface first, in the ip fib the route becomes drop and when I do a delete on any of the routes with id 2 or 3 the route delete will fail in the following error:

      Caused by: io.fd.honeycomb.translate.write.WriteFailedException$DeleteFailedException: Failed to delete data at: KeyedInstanceIdentifier{targetType=interface org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv4.unicast.routing.rev140524.routing.routing.instance.routing.protocols.routing.protocol._static.routes.ipv4.Route, path=[org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev140524.Routing, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev140524.routing.RoutingInstance[key=RoutingInstanceKey [_name=vpp-routing-instance]], org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev140524.routing.routing.instance.RoutingProtocols, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev140524.routing.routing.instance.routing.protocols.RoutingProtocol[key=RoutingProtocolKey [_name=static-routing-1]], org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.rev140524.routing.routing.instance.routing.protocols.routing.protocol.StaticRoutes, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv4.unicast.routing.rev140524.StaticRoutes1, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv4.unicast.routing.rev140524.routing.routing.instance.routing.protocols.routing.protocol._static.routes.Ipv4, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipv4.unicast.routing.rev140524.routing.routing.instance.routing.protocols.routing.protocol._static.routes.ipv4.Route[key=RouteKey [_id=2]]]}
      	at io.fd.honeycomb.translate.impl.write.GenericWriter.deleteCurrentAttributes(GenericWriter.java:56) ~[translate-impl-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.honeycomb.translate.util.write.AbstractGenericWriter.deleteCurrent(AbstractGenericWriter.java:65) ~[translate-utils-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.honeycomb.translate.util.write.AbstractGenericWriter.update(AbstractGenericWriter.java:83) ~[translate-utils-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.honeycomb.translate.impl.write.registry.SubtreeWriter.update(SubtreeWriter.java:69) ~[translate-impl-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.honeycomb.translate.impl.write.registry.FlatWriterRegistry.singleUpdate(FlatWriterRegistry.java:139) ~[translate-impl-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.honeycomb.translate.impl.write.registry.FlatWriterRegistry.update(FlatWriterRegistry.java:104) ~[translate-impl-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.honeycomb.data.impl.ModifiableDataTreeDelegator$DelegatingConfigSnapshot.processCandidate(ModifiableDataTreeDelegator.java:132) ~[data-impl-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.honeycomb.data.impl.ModifiableDataTreeManager$ConfigSnapshot.commit(ModifiableDataTreeManager.java:108) ~[data-impl-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.honeycomb.data.impl.WriteTransaction.submit(WriteTransaction.java:136) ~[data-impl-1.17.07-SNAPSHOT.jar:na]
      	... 55 common frames omitted
      Caused by: java.lang.IllegalArgumentException: No mapping stored for name: neutron_port_11100001-0afa-41cc-8f2f-8d62b6e9bc1c
      	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[guava-18.0.jar:na]
      	at io.fd.hc2vpp.common.translate.util.NamingContext.getIndex(NamingContext.java:166) ~[vpp-translate-utils-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.hc2vpp.routing.write.factory.SimpleHopRequestFactory.createIpv4SimpleHopRequest(SimpleHopRequestFactory.java:61) ~[routing-impl-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.hc2vpp.routing.write.Ipv4RouteCustomizer.writeRoute(Ipv4RouteCustomizer.java:131) ~[routing-impl-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.hc2vpp.routing.write.Ipv4RouteCustomizer.deleteCurrentAttributes(Ipv4RouteCustomizer.java:119) ~[routing-impl-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.hc2vpp.routing.write.Ipv4RouteCustomizer.deleteCurrentAttributes(Ipv4RouteCustomizer.java:53) ~[routing-impl-1.17.07-SNAPSHOT.jar:na]
      	at io.fd.honeycomb.translate.impl.write.GenericWriter.deleteCurrentAttributes(GenericWriter.java:54) ~[translate-impl-1.17.07-SNAPSHOT.jar:na]
      	... 63 common frames omitted
      

            jsrnicek_cisco Jan Srnicek
            shakib.ahmed Shakib Ahmed
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: