Skip to content

How to disable Check policy in Istio 1.0 #7663

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

Closed
frost1990 opened this issue Aug 6, 2018 · 7 comments
Closed

How to disable Check policy in Istio 1.0 #7663

frost1990 opened this issue Aug 6, 2018 · 7 comments

Comments

@frost1990
Copy link

frost1990 commented Aug 6, 2018

Describe the bug
I don't want to use mixer check policy because I need less request latency. While in Istio 1.0, when I shut down istio-policy service, my requests get response with HTTP status code 503 like this:

`* About to connect() to apigateway.smhtest.svc.a1.uae port 12344 (#0)

  • Trying 2002:ac1f:91c5:1::d31c...
  • Connected to apigateway.smhtest.svc.a1.uae (2002:ac1f:91c5:1::d31c) port 12344 (#0)

GET /helloworld HTTP/1.1
User-Agent: curl/7.29.0
Host: apigateway.smhtest.svc.a1.uae:12344
Accept: /

< HTTP/1.1 503 Service Unavailable
< content-length: 33
< content-type: text/plain
< date: Mon, 06 Aug 2018 13:06:34 GMT
< server: envoy
< x-envoy-decorator-operation: apigateway.smhtest.svc.a1.uae:12344/*
<
Connection #0 to host apigateway.smhtest.svc.a1.uae left intact
UNAVAILABLE:Cluster not available

Expected behavior
I want my http requests can be routed to the desired server and get correctly answered instead of the status code 503 responded by envoy, even when there is no istio-policy service.

Steps to reproduce the bug
Just shut down your istio-policy service.

Version
Kubernetes 1.10
Istio 1.10
Is Istio Auth enabled or not?
Istio Auth disabled

Environment
Centos 7.0

@kyessenov
Copy link
Contributor

Hi,

Mixer policy is fail-close by default. That means if you remove policy pods, then the requests to policy fail, and that is interpreted as a policy failure.

To disable policy checks being applied altogether, you need to edit the mesh config (and restart pilot pods):
https://github.com/istio/istio/blob/master/install/kubernetes/helm/istio/values.yaml#L85

The corresponding installation helm option is this:
https://github.com/istio/istio/blob/master/install/kubernetes/helm/istio/values.yaml#L85

@frost1990
Copy link
Author

frost1990 commented Aug 7, 2018

@kyessenov
Hi , I changed the istio ConfigMap, set disablePolicyChecks to true, and restarted the istio-pilot. But my requests still got failed with status code 503. I don't know why.

Here is my meshconfig:

apiVersion: v1
kind: ConfigMap
metadata:
name: istio
namespace: istio-system
labels:
app: istio
chart: istio-1.0.0
release: RELEASE-NAME
heritage: Tiller
data:
mesh: |-
# Set the following variable to true to disable policy checks by the Mixer.
# Note that metrics will still be reported to the Mixer.
disablePolicyChecks: true

# Set enableTracing to false to disable request tracing.
enableTracing: true

My requests are responsed like this:

About to connect() to apigateway.smhtest.svc.a1.uae port 12344 (#0)
Trying 2002:ac1f:91c5:1::6ff2...
Connected to apigateway.smhtest.svc.a1.uae (2002:ac1f:91c5:1::6ff2) port 12344 (#0)

GET /helloworld HTTP/1.1
User-Agent: curl/7.29.0
Host: apigateway.smhtest.svc.a1.uae:12344
Accept: /

< HTTP/1.1 503 Service Unavailable
< content-length: 33
< content-type: text/plain
< date: Tue, 07 Aug 2018 08:51:19 GMT
< server: envoy
< x-envoy-decorator-operation: apigateway.smhtest.svc.a1.uae:12344/*
<
Connection #0 to host apigateway.smhtest.svc.a1.uae left intact
UNAVAILABLE:Cluster not available

@kyessenov
Copy link
Contributor

Not sure why the mixer checks are still applied after you changed configmap and istio-pilot. Can you try killing gateway pods and see if that helps? If it does work, then we have an issue with stale config in gateways. cc @nmittler @costinm

@frost1990
Copy link
Author

frost1990 commented Aug 8, 2018

@kyessenov
I tried again, and found that it would take a few minutes to disable mixer checks after restarting istio-pilot.

@kyessenov
Copy link
Contributor

Related to #7759 as well as pilot general slowness to push updates.

@kyessenov
Copy link
Contributor

Do you mind closing this issue and opening up another one with some evidence / logs for the few minute delay after restarting pilot?

@frost1990
Copy link
Author

@kyessenov
No problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants