-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
FAIL: TestDenials (159.34s) mixer_test.go:301: Bad metric value: got 0.000000, want at least 1 #365
Comments
@geeknoid replied "In the new world, the Check RPC no longer returns 4xx results. Instead, the RPC itself succeeds, and the check yes/no indication is contained in the CheckResponse.status field instead." so we need to update the caller ? |
Yes, the client needs to look in the right place for the yes/no signal. |
Ok. I've found mixer logs for this:
It appears that mixer is sending back FAILED_PRECONDITION responses, but those are not getting back to Mixer in the corresponding Report() calls as anything but 200s:
|
To replicate: |
* Skip TestDenials * Update format and linter to skip git files * Using git ls-files instead of find * Remove extra buildifier call
Doug, why did you reassign this to me? Mixer is returning the right result, right? |
@geeknoid because you worked on the protocol change. I don't care who fixes it, just that we fix it. |
my understanding is any rpc status is networking status. server status should be returned in response.status. Please make sure mixer is returning all errors in response.status. For network status, there is another flag network_failure_policy to use, default is open, any network error will mean open. |
@douglas-reid Please make sure mixer is returning all errors in response.status. That is what protocol required. |
There are two status: rpc status from the unary call, and status inside the response body. client treats the rpc status error as network error, and only extract response.status. |
is there a log that we can enable to see what mixer_client is seeing? |
With current Mixer bits, the expected behavior is:
Within the grpcServer.go code in Mixer, this is handled here:
In this case for the Check call, it takes the Status value obtained from running the adapters, sticks it in CheckResponse.Status, and has the RPC proper return OK. As we've had problems with this kind of stuff in the past, what exact version of the Mixer is being used in these tests? The latest bits, or some snapshot from last week? |
When I run Doug's command-line to replicate this, I get a bunch of console output and two instances of this error:
So I don't think it's getting to the point of running Mixer. Is there some extra setup voodoo necessary? |
@geeknoid looks like you could not create a new namespace, so the test did not run at all. I am looking at this problem as well. |
latest bits are being used from mixer / proxy / manager and mixer client. |
@geeknoid @qiwzhang @mandarjog can I help with anything more here? should I try to grab logs from proxies? |
this should be P0. If anything, we should be adding tests, not removing tests. |
* Rbac ingress (#320) * Add ingresses/status to rbac * fix bash'ism (#325) * fix bash'ism we tell people to `curl -L https://git.io/getIstio | sh -` so we can't use bash extentions I was getting [[ unknown command on line 12, fixing this * also updating comment * updateVersion.sh to not modify templates (#229) * istio install templates * fix copy * fix temp var * []byte values * fix linter errors * comment out unused ca vars * gofmt kubernetes.go * fix macros * fix kubeTest.sh * move istio-auth-with-cluster-ca.yaml out of templates dir (#334) * fix broken link (#335) * fixing #321 (#336) fixing broken links * Getting master ready for beta (#322) 0.1.x -> 0.2.x * Add v1/stable version (#351) * Add v1/stable version * Start of a local development directory (#337) * initial skeleton notes for local dev * tweaks * adding the rules.yaml for local dev and updating the scripts * Fixing English typo * Also start to address dev getting started Issue #348 * incorporated most of my noogler notes * Adding the sample quota * adding note about -v=5 for debug/verbose output * Code review comments * typo fix will follow up with moving most of mixer/dev/development.md into this * Moving most of mixer/doc/dev/development.md here (#352) * Moving most of mixer/doc/dev/development.md here https://github.com/istio/mixer/blob/master/doc/dev/development.md to here with updates to make it a bit more generic than just mixer * Also move conventions.md and performance.md here * Review comments And linking the conventions and perf docs * minor update * Manager -> pilot rename (#359) * Manager -> Pilot git ls-files | grep -v tests/e2e|grep -v bookinfo| xargs -n 1 sed -i .bak -e 's/Manager/Pilot/g' As tests/e2e and bookinfo have other Manager unrelated to pilot * manager -> pilot git ls-files | grep -v tests/e2e|grep -v bookinfo| xargs -n 1 sed -i .bak -e 's/manager/pilot/g' * Manual changes in e2e * MANAGER to PILOT git ls-files | xargs -n 1 sed -i .bak -e 's/MANAGER/PILOT/g' and manually excluding some * Rename yaml file too * Last few selective renames Last piece, only remaining ‘manager’ are: ``` ldemailly-macbookpro:istio ldemailly$ git grep -i manager samples/apps/bookinfo/src/reviews/reviews-wlpcfg/servers/LibertyProjectS erver/server.xml: <featureManager> samples/apps/bookinfo/src/reviews/reviews-wlpcfg/servers/LibertyProjectS erver/server.xml: </featureManager> tests/e2e/README.md:### appManager.go tests/e2e/README.md:`appManager` gather apps required for test into a array and deploy them while setup() tests/e2e/framework/BUILD: "appManager.go", tests/e2e/framework/appManager.go:// AppManager organize and deploy apps tests/e2e/framework/appManager.go:type AppManager struct { tests/e2e/framework/appManager.go:// NewAppManager create a new AppManager tests/e2e/framework/appManager.go:func NewAppManager(tmpDir, namespace string, istioctl *Istioctl) *AppManager { tests/e2e/framework/appManager.go: return &AppManager{ tests/e2e/framework/appManager.go:func (am *AppManager) generateAppYaml(a *App) error { tests/e2e/framework/appManager.go:func (am *AppManager) deploy(a *App) error { tests/e2e/framework/appManager.go:func (am *AppManager) Setup() error { tests/e2e/framework/appManager.go:func (am *AppManager) Teardown() error { tests/e2e/framework/appManager.go:func (am *AppManager) AddApp(a *App) { tests/e2e/framework/framework.go: c.Cleanup.RegisterCleanable(c.Kube.AppManager) tests/e2e/framework/kubernetes.go: pilotHub = flag.String("pilot_hub", os.Getenv(pilotHubEnvVar), "Manager hub") tests/e2e/framework/kubernetes.go: pilotTag = flag.String("pilot_tag", os.Getenv(pilotTagEnvVar), "Manager tag") tests/e2e/framework/kubernetes.go: "manager", tests/e2e/framework/kubernetes.go: // App Manager tests/e2e/framework/kubernetes.go: AppManager *AppManager tests/e2e/framework/kubernetes.go: a := NewAppManager(tmpDir, *namespace, i) tests/e2e/framework/kubernetes.go: AppManager: a, tests/e2e/framework/kubernetes.go: case "manager": tests/e2e/tests/bookinfo/demo_test.go: tc.Kube.AppManager.AddApp(demoApp) tests/e2e/tests/mixer/mixer_test.go: tc.Kube.AppManager.AddApp(demoApp) ``` * Review comment changed flag from m to p * make linter happy bin/fmt.sh + review updates * show in logs url being used (#360) A bit more info in logs for when download fails * Update images for Pilot & Unary (#361) * Update image for Unary * Fix forgotten renames * Disabling failing test until #365 is fixed (#366) * Skip TestDenials * Update format and linter to skip git files * Using git ls-files instead of find * Remove extra buildifier call * missed manager->pilot rename and use lowercase -c for ca image (#363) * Make shell utility functions variadic (#377) This simplifies usage a bit by not requiring user to call fmt.Sprintf themselves. * Re-enable TestDenials * Revert "Update images for Pilot & Unary (#361)" This reverts commit 2b210ac. * Revert "Getting master ready for beta (#322)" This reverts commit 910a025. * Update to latest version of manager
Is it possible we are running into potentially new issues with caching? I see the following in the CheckResponse: |
If I add
To translate, it looks like the 2 requests from @qiwzhang can you please help debug why the statuses are translated to 200s? |
I've looked at
Not entirely sure what the difference is. I think we need a thorough regression review of the Report() mechanism from Envoy to Mixer. |
Are you using check_cache? Did you set "check_cache_keys" in the envoy config? |
All of these tests are with the default configuration for everything. As far as I know, the e2e tests don't explicitly set any non-default values. You can check by starting up a test: |
I need to study this whole e2e test in order to debug it. It will be great if someone can help. I have a integration test making sure error status from mixer are passed to client. |
the e2e test is how we validate releases. it uses the images as indicated in |
ping - we shouldn't leave trunk broken for so long if at all possible |
Can someone try with latest proxy/mixer build? It is easier to debug with latest proxy since I added debug log to print status from mixer. If still have problem, I will debug. |
In my own integration test with just proxy/mixer, I could not reproduce it. In the mixer config, I added
Mixer did get 400 "logName":"access_log","labels":{"method":"GET","protocol":"http","responseCode":400,"responseSize":200,"timestamp":"2017-06-09T01:23:36.583137929Z","url":"/echo"},"textPayload":"- - - [09/Jun/2017:01:23:36 +0000] "GET /echo http" 400 200"} |
@qiwzhang do you see your additional info and does it help ? |
It confirmed that it still fails with latest proxy. The Jenkins log did not have debug proxy log. Not sure how easy to capture mixer debug log and proxy debug log in this e2e test. Otherwise, I have to manually run it to debug it. |
We currently do not capture debug logs at the moment. I have an issue created for that. In the mean time can you run the thing manually ? Do you have minikube set up or a cluster that you can use ? |
OK. We figured this out. We were stuck on a version of the client that, while supporting unary, did not use the response code from within the CheckResponse. This was patched in the very next PR on the same day. Unfortunately, that detail was very hard to tease out of all of the SHA deps. |
fixed in #400 |
* Skip TestDenials * Update format and linter to skip git files * Using git ls-files instead of find * Remove extra buildifier call Former-commit-id: c15a192
* Rbac ingress (#320) * Add ingresses/status to rbac * fix bash'ism (#325) * fix bash'ism we tell people to `curl -L https://git.io/getIstio | sh -` so we can't use bash extentions I was getting [[ unknown command on line 12, fixing this * also updating comment * updateVersion.sh to not modify templates (#229) * istio install templates * fix copy * fix temp var * []byte values * fix linter errors * comment out unused ca vars * gofmt kubernetes.go * fix macros * fix kubeTest.sh * move istio-auth-with-cluster-ca.yaml out of templates dir (#334) * fix broken link (#335) * fixing #321 (#336) fixing broken links * Getting master ready for beta (#322) 0.1.x -> 0.2.x * Add v1/stable version (#351) * Add v1/stable version * Start of a local development directory (#337) * initial skeleton notes for local dev * tweaks * adding the rules.yaml for local dev and updating the scripts * Fixing English typo * Also start to address dev getting started Issue #348 * incorporated most of my noogler notes * Adding the sample quota * adding note about -v=5 for debug/verbose output * Code review comments * typo fix will follow up with moving most of mixer/dev/development.md into this * Moving most of mixer/doc/dev/development.md here (#352) * Moving most of mixer/doc/dev/development.md here https://github.com/istio/mixer/blob/master/doc/dev/development.md to here with updates to make it a bit more generic than just mixer * Also move conventions.md and performance.md here * Review comments And linking the conventions and perf docs * minor update * Manager -> pilot rename (#359) * Manager -> Pilot git ls-files | grep -v tests/e2e|grep -v bookinfo| xargs -n 1 sed -i .bak -e 's/Manager/Pilot/g' As tests/e2e and bookinfo have other Manager unrelated to pilot * manager -> pilot git ls-files | grep -v tests/e2e|grep -v bookinfo| xargs -n 1 sed -i .bak -e 's/manager/pilot/g' * Manual changes in e2e * MANAGER to PILOT git ls-files | xargs -n 1 sed -i .bak -e 's/MANAGER/PILOT/g' and manually excluding some * Rename yaml file too * Last few selective renames Last piece, only remaining ‘manager’ are: ``` ldemailly-macbookpro:istio ldemailly$ git grep -i manager samples/apps/bookinfo/src/reviews/reviews-wlpcfg/servers/LibertyProjectS erver/server.xml: <featureManager> samples/apps/bookinfo/src/reviews/reviews-wlpcfg/servers/LibertyProjectS erver/server.xml: </featureManager> tests/e2e/README.md:### appManager.go tests/e2e/README.md:`appManager` gather apps required for test into a array and deploy them while setup() tests/e2e/framework/BUILD: "appManager.go", tests/e2e/framework/appManager.go:// AppManager organize and deploy apps tests/e2e/framework/appManager.go:type AppManager struct { tests/e2e/framework/appManager.go:// NewAppManager create a new AppManager tests/e2e/framework/appManager.go:func NewAppManager(tmpDir, namespace string, istioctl *Istioctl) *AppManager { tests/e2e/framework/appManager.go: return &AppManager{ tests/e2e/framework/appManager.go:func (am *AppManager) generateAppYaml(a *App) error { tests/e2e/framework/appManager.go:func (am *AppManager) deploy(a *App) error { tests/e2e/framework/appManager.go:func (am *AppManager) Setup() error { tests/e2e/framework/appManager.go:func (am *AppManager) Teardown() error { tests/e2e/framework/appManager.go:func (am *AppManager) AddApp(a *App) { tests/e2e/framework/framework.go: c.Cleanup.RegisterCleanable(c.Kube.AppManager) tests/e2e/framework/kubernetes.go: pilotHub = flag.String("pilot_hub", os.Getenv(pilotHubEnvVar), "Manager hub") tests/e2e/framework/kubernetes.go: pilotTag = flag.String("pilot_tag", os.Getenv(pilotTagEnvVar), "Manager tag") tests/e2e/framework/kubernetes.go: "manager", tests/e2e/framework/kubernetes.go: // App Manager tests/e2e/framework/kubernetes.go: AppManager *AppManager tests/e2e/framework/kubernetes.go: a := NewAppManager(tmpDir, *namespace, i) tests/e2e/framework/kubernetes.go: AppManager: a, tests/e2e/framework/kubernetes.go: case "manager": tests/e2e/tests/bookinfo/demo_test.go: tc.Kube.AppManager.AddApp(demoApp) tests/e2e/tests/mixer/mixer_test.go: tc.Kube.AppManager.AddApp(demoApp) ``` * Review comment changed flag from m to p * make linter happy bin/fmt.sh + review updates * show in logs url being used (#360) A bit more info in logs for when download fails * Update images for Pilot & Unary (#361) * Update image for Unary * Fix forgotten renames * Disabling failing test until #365 is fixed (#366) * Skip TestDenials * Update format and linter to skip git files * Using git ls-files instead of find * Remove extra buildifier call * missed manager->pilot rename and use lowercase -c for ca image (#363) * Make shell utility functions variadic (#377) This simplifies usage a bit by not requiring user to call fmt.Sprintf themselves. * Re-enable TestDenials * Revert "Update images for Pilot & Unary (#361)" This reverts commit 6362d37 [formerly 2b210ac]. * Revert "Getting master ready for beta (#322)" This reverts commit 52e8937 [formerly 910a025]. * Update to latest version of manager Former-commit-id: 6a65da1
* Skip TestDenials * Update format and linter to skip git files * Using git ls-files instead of find * Remove extra buildifier call Former-commit-id: c15a192
* Doc clarifications * regenerate go files
The verbs could be trimmed. This is just a first pass to get things moving.
Unearthed in #361
The TestDenials keeps failing
--- FAIL: TestDenials (159.34s)
mixer_test.go:301: Bad metric value: got 0.000000, want at least 1
@douglas-reid wrote "
when I look at the reported results for this test, I see no 4xx responses when a denial rule is in place. Is this related to the change in error reporting (are we still forwarding rpc statuses to mixer, rather than the internal status messages)? "
The text was updated successfully, but these errors were encountered: