Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The error:'Sum of weights in the weighted_cluster should add up to 100' can not find which virtualservice is wrong #586

Closed
dreadbird opened this issue Jul 18, 2018 · 3 comments
Assignees

Comments

@dreadbird
Copy link
Member

When there is a virtualservice'destinationrule as flow

 - match:
    - uri:
        prefix: /monthlyplan
    route:
    - destination:
        host: a.demo.svc.cluster.local
        subset: v1
    - destination:
        host: a.demo.svc.cluster.local
        subset: v2
      weight: 100

then I get error from ingressgateway pod logs:

[2018-07-18 00:48:44.664][148][warning][upstream] external/envoy/source/common/config/grpc_mux_impl.cc:218] gRPC config for type.googleapis.com/envoy.api.v2.Listener update rejected: Error adding/updating listener 0.0.0.0_443: Sum of weights in the weighted_cluster should add up to 100

[2018-07-18 00:48:44.664][148][warning][config] bazel-out/k8-opt/bin/external/envoy/source/common/config/_virtual_includes/grpc_mux_subscription_lib/common/config/grpc_mux_subscription_impl.h:70] gRPC config for type.googleapis.com/envoy.api.v2.Listener rejected: Error adding/updating listener 0.0.0.0_443: Sum of weights in the weighted_cluster should add up to 100

and then all the virtualservice is down,every hosts can not be use.

but,I do not kown whitch virtualservice is wrong by those error message

@esnible
Copy link
Contributor

esnible commented Aug 20, 2019

Is this a sign that validation isn't working as expected?

pkg/config/validation/validation.go verifies that the total weight of a VirtualService is 100.
pkg/networking/core/v1alpha3/route/route.go sets the weight to 100 if it is 0.
Perhaps setting 0 to 100 causes the total weight to be 200?

@mbanikazemi Pilot does not notice that it is supplying Envoy with invalid configuration. Should pkg/networking/core/v1alpha3/route/route.go check the weights it is about to send to Envoy and issue its own warning if the sum is not 100? (Having Pilot issue the warning would let Istio log the name of the cluster that has the problem.) Should Pilot cap the weight at 100 to avoid Envoy rejecting the entire configuration?

@mbanikazemi mbanikazemi self-assigned this Aug 21, 2019
@istio-policy-bot istio-policy-bot added the lifecycle/stale Indicates a PR or issue hasn't been manipulated by an Istio team member for a while label Nov 19, 2019
@dreadbird
Copy link
Member Author

Need to confirm whether the iuuse resolved?

@istio-policy-bot istio-policy-bot removed the lifecycle/stale Indicates a PR or issue hasn't been manipulated by an Istio team member for a while label Nov 28, 2019
@howardjohn
Copy link
Member

This has been resolved, it is rejected by validating webhook

@mbanikazemi mbanikazemi removed their assignment Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants