VirtualServiceUnreachableRule

Message NameVirtualServiceUnreachableRule
Message CodeIST0130
DescriptionA VirtualService rule will never be used because a previous rule uses the same match.
LevelWarning

This message occurs when a virtual service contains a match rule that will never be used because a previous rule specifies the same match. It also occurs when there is more than one rule without any match at all.

Example

You will receive this message:

  1. Warning [IST0130] (VirtualService sample-foo-cluster01.default) VirtualService rule #1 not used (only the last rule can have no matches).

when your cluster has the following virtual service:

  1. apiVersion: networking.istio.io/v1
  2. kind: VirtualService
  3. metadata:
  4. name: sample-foo-cluster01
  5. namespace: foo
  6. spec:
  7. hosts:
  8. - sample.foo.svc.cluster.local
  9. http:
  10. - fault:
  11. delay:
  12. fixedDelay: 5s
  13. percentage:
  14. value: 100
  15. route:
  16. - destination:
  17. host: sample.foo.svc.cluster.local
  18. - mirror:
  19. host: sample.bar.svc.cluster.local
  20. route:
  21. - destination:
  22. host: sample.bar.svc.cluster.local
  23. subset: v1

In this example, the virtual service specifies both a fault and a mirror. Having both is allowed, but they must be in the same route entry. Here the user has used two different http route entries (one for each -), the first overrides the second.

How to resolve

When you have an http with no match, there can only be one http route. In this case, removing the "-" before mirror indicates there is a single matchless route that both injects a fault and mirrors, not one route that faults and one that mirrors.

Be careful with YAML formatting when setting up complex routing.

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