-
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
Enable CRD store in mixer install pod spec #650
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Assign the PR to them by writing The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
tests/e2e/tests/mixer/mixer_test.go
Outdated
@@ -249,7 +249,7 @@ func TestDenials(t *testing.T) { | |||
time.Sleep(5 * time.Second) | |||
|
|||
// generate several calls to the product page | |||
for i := 0; i < 10; i++ { | |||
for i := 0; i < 1000; i++ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't needed with latest from HEAD. It now uses v3 exclusively.
if err := replaceRouteRule(routeReviewsV3Rule); err != nil {
t.Fatalf("Could not create replace reviews routing rule: %v", err)
}
// hope for stability
time.Sleep(30 * time.Second)
Please update RBAC rules for mixer: create a mixer service account and add rules for the CRDs. |
/test e2e-suite-no_rbac-no_auth |
can you add to your pr (same as #662 ) and maybe also the CA and also more relevant to mixer: the newest mixer 49ad083ba35943880f57a16a475c50b1e037dde8 from this morning istio/old_mixer_repo@49ad083 ) edit: rebase as I updated the pilot sha to be the correct one |
@mandarjog PR needs rebase |
istio.VERSION
Outdated
export ISTIOCTL_URL="https://storage.googleapis.com/istio-artifacts/pilot/fb947d4c6d0902a841e0e82ffa3bee16786be0df/artifacts/istioctl" | ||
export MIXER_HUB="gcr.io/istio-testing" | ||
export MIXER_TAG="2c8e76790aa1d569b739454ca2dba5e0b031bd25" | ||
export ISTIOCTL_URL="https://storage.googleapis.com/istio-artifacts/pilot/b5d710d658d3bfffa06506f312725d96a8737703/artifacts/istioctl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge error, please leave fb947d4c6d0902a841e0e82ffa3bee16786be0df
(and again, I think you should use latest mixer (49ad083ba35943880f57a16a475c50b1e037dde8) given the big change and need to debug the tests anyway)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed it, PTAL.
tests/e2e/tests/mixer/mixer_test.go
Outdated
return err | ||
} | ||
|
||
if err = p.portForward("app=productpage", productPagePort, "80"); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment that this forward is just to test the app liveness directly, initially was worried we weren't doing e2e anymore
tests/e2e/tests/mixer/mixer_test.go
Outdated
} | ||
resp, err := clnt.Do(req) | ||
if err != nil { | ||
glog.Warningf("Error communicating with %s: %s", url, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit/style (feel free to ignore): return here and no else?
tests/e2e/tests/mixer/mixer_test.go
Outdated
} | ||
} | ||
|
||
func get(clnt *http.Client, url string, headerkv ...string) (status int, contents string, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not for this pr probably) we could use the fortio client here too probably (and make it dump the full headers when there is an error)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be nice.
tests/e2e/tests/mixer/mixer_test.go
Outdated
return 0, "", err | ||
} | ||
|
||
for i := 0; i < len(headerkv)/2; i++ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might want to log an error or panic if headerkv isn't even (caller bug/error)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
headers are optional, it is not an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 is even
but if someone passes 1 argument it will get silently ignored which is surely not what you intend ? (or 3 or any 2N+1)
tests/e2e/tests/mixer/mixer_test.go
Outdated
closeResponseBody(resp) | ||
} | ||
return resp.StatusCode, contents, err | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does that compile?
actions: | ||
- handler: handler.prometheus.istio-config-default | ||
instances: | ||
- responsesize.metric.istio-config-default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have we abandoned logs? if so, we need an issue to update this Task.
tests/e2e/tests/mixer/mixer_test.go
Outdated
t.Fatalf("Test app setup failure: %v", err) | ||
} | ||
|
||
glog.Info("Successfully sent request(s) to /productpage; checking metrics...") | ||
// must sleep to allow for prometheus scraping, etc. | ||
time.Sleep(15 * time.Second) | ||
dumpMixerMetrics() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think this offers anything beyond the promDump() changes in the other outstanding PR. I don't think there is any evidence that the mixer->prometheus parts of this test are flaky or problematic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure I can get rid of this. I needed something for my debugging.
tests/e2e/tests/mixer/mixer_test.go
Outdated
t.Fatalf("Could not create required mixer rule: %v", err) | ||
// deny rule will deny all requests to product page unless | ||
// ["x-user"] header is set. | ||
glog.Infof("Denials: block productpage if x-user header is missing") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fundamentally changes the nature of this test. What is the reasoning here?
If we strip out everything from the tests, we have no check of any complex behavior (nor need for using something like bookinfo as the basis of a test).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now a denials integration test. I am going to add some labels processing once istio/old_mixer_repo#1207 in merged.
I agree that previous behavior was complex, however that complexity was orthogonal to the workings on denials. The above test (with addition of labels) tests Mixer / Pilot / Envoy all together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may have been orthogonal to the mixer feature. But, imho, it is central to Istio as a whole to have something like this just work.
This test was passing (and recently altered specifically to pass with new proxy logic). I'm not sure what the compelling reason to change it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A different approach to this discussion:
This PR is changing the fundamental way mixer is configured (affecting metrics reporting, denials enforcement, etc.). Does it make sense to remove tests of those aspects in the same PR where we are switching the logic?
Either we should do this change first, or we should do in subsequently, imho. But doing it at the same time raises questions of regression and brittleness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not changing all the tests. Which tests are we removing apart from TestDenials?
TestDenials is the only test that is changing behavior, and becoming more focussed. I need a test that can test the new code path. There is also istio/old_mixer_repo#1207 that is needed to use labels which are used in the existing test. We can add those tests back.
Apart from that these changes swap metrics in-place, so the new prometheus metrics adapter generates identical metrics.
What else is brittle?
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just in case my comments above would be missed :-)
@mandarjog PR needs rebase |
/retest |
/test all |
Tests passed in private gke cluster.
|
/test all |
@mandarjog: The following tests failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@douglas-reid also replicated the same test results. |
squash and merge according to our exceptional policies until 503s are resolved separately |
it's merged. but @mandarjog can you add release notes though |
Former-commit-id: b2c76f68276985f885754aa2a47b3c8b186cf0bb
* enable configStore2 * update kind names * Use new mixer2 metrics * fix linter errors * replacing 0.1 metrics with 0.2, wip * make deny test simpler * fix linter error * fix url * linter error * Add log entries and always send 'x-user' header * add additional debug info * remove linter errors * dump direct mixer metrics for debug * fix test error * fix productpage port * fix merge error * now really fix versions * introduce header type * remove extra debug * remove unused code Former-commit-id: 838bcba
Former-commit-id: c46bc5c44d9fcd278c4af1d79226530e54355a68
* enable configStore2 * update kind names * Use new mixer2 metrics * fix linter errors * replacing 0.1 metrics with 0.2, wip * make deny test simpler * fix linter error * fix url * linter error * Add log entries and always send 'x-user' header * add additional debug info * remove linter errors * dump direct mixer metrics for debug * fix test error * fix productpage port * fix merge error * now really fix versions * introduce header type * remove extra debug * remove unused code Former-commit-id: 838bcba
* enable configStore2 * update kind names * Use new mixer2 metrics * fix linter errors * replacing 0.1 metrics with 0.2, wip * make deny test simpler * fix linter error * fix url * linter error * Add log entries and always send 'x-user' header * add additional debug info * remove linter errors * dump direct mixer metrics for debug * fix test error * fix productpage port * fix merge error * now really fix versions * introduce header type * remove extra debug * remove unused code Former-commit-id: 838bcba
This should resolve the jaeger regression around ports. Additionally other features have been added to the installer. Fixes: istio#19227
Release note: