VirtualServiceIneffectiveMatch

Message NameVirtualServiceIneffectiveMatch
Message CodeIST0131
DescriptionA VirtualService rule match duplicates a match in a previous rule.
LevelInfo

This message occurs when a virtual service contains a match rule that will never be used because a previous rule specifies the same match.

Example

You will receive this message:

  1. Info [IST0131] (VirtualService tls-routing.default) VirtualService rule #1 match #0 is not used (duplicates a match in rule #0).

when your cluster has the following virtual service:

  1. apiVersion: networking.istio.io/v1alpha3
  2. kind: VirtualService
  3. metadata:
  4. name: tls-routing
  5. spec:
  6. hosts:
  7. - www1.googleapis.com
  8. - api1.facebook.com
  9. tls:
  10. - match:
  11. - port: 2443
  12. sniHosts:
  13. - www1.googleapis.com
  14. route:
  15. - destination:
  16. host: www1.googleapis.com
  17. - match:
  18. - port: 2443
  19. sniHosts:
  20. - www1.googleapis.com
  21. route:
  22. - destination:
  23. host: api1.facebook.com

In this example, the virtual service specifies two different destinations for the same match. Istio will use the first match, and never send traffic to the second destination.

How to resolve

If you need traffic to go to more than one place, use mirror.

Re-order your routes so that the most specific ones are first. Place ‘catch all’ routes at the end.