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

Enable CRD store in mixer install pod spec #650

Merged
merged 20 commits into from
Sep 5, 2017
Merged

Conversation

mandarjog
Copy link
Contributor

Release note:

NONE

@istio-merge-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
We suggest the following additional approver: geeknoid

Assign the PR to them by writing /assign @geeknoid in a comment when ready.

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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@@ -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++ {
Copy link
Contributor

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)

@andraxylia
Copy link
Contributor

Please update RBAC rules for mixer: create a mixer service account and add rules for the CRDs.

@mandarjog
Copy link
Contributor Author

/test e2e-suite-no_rbac-no_auth

@ldemailly
Copy link
Contributor

ldemailly commented Sep 4, 2017

can you add
install/updateVersion.sh -pgcr.io/istio-testing,fb947d4c6d0902a841e0e82ffa3bee16786be0df -i https://storage.googleapis.com/istio-artifacts/pilot/fb947d4c6d0902a841e0e82ffa3bee16786be0df/artifacts/istioctl

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

@istio-merge-robot
Copy link

@mandarjog PR needs rebase

@istio-merge-robot istio-merge-robot added the needs-rebase Indicates a PR needs to be rebased before being merged label Sep 4, 2017
@istio-merge-robot istio-merge-robot removed the needs-rebase Indicates a PR needs to be rebased before being merged label Sep 4, 2017
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"
Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed it, PTAL.

return err
}

if err = p.portForward("app=productpage", productPagePort, "80"); err != nil {
Copy link
Contributor

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

}
resp, err := clnt.Do(req)
if err != nil {
glog.Warningf("Error communicating with %s: %s", url, err)
Copy link
Contributor

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?

}
}

func get(clnt *http.Client, url string, headerkv ...string) (status int, contents string, err error) {
Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be nice.

return 0, "", err
}

for i := 0; i < len(headerkv)/2; i++ {
Copy link
Contributor

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)

Copy link
Contributor Author

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.

Copy link
Contributor

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)

closeResponseBody(resp)
}
return resp.StatusCode, contents, err
return
Copy link
Contributor

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
Copy link
Contributor

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.

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()
Copy link
Contributor

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.

Copy link
Contributor Author

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.

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")
Copy link
Contributor

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).

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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?

@mandarjog
Copy link
Contributor Author

/retest

Copy link
Contributor

@ldemailly ldemailly left a 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 mandarjog changed the title Enable CRD store in mixer install pod spec Abandoned Enable CRD store in mixer install pod spec Sep 4, 2017
@mandarjog mandarjog closed this Sep 4, 2017
@mandarjog mandarjog reopened this Sep 5, 2017
@istio-merge-robot istio-merge-robot added the needs-rebase Indicates a PR needs to be rebased before being merged label Sep 5, 2017
@istio-merge-robot
Copy link

@mandarjog PR needs rebase

@istio-merge-robot istio-merge-robot removed the needs-rebase Indicates a PR needs to be rebased before being merged label Sep 5, 2017
@mandarjog mandarjog changed the title Abandoned Enable CRD store in mixer install pod spec Enable CRD store in mixer install pod spec Sep 5, 2017
@ldemailly ldemailly dismissed their stale review September 5, 2017 05:21

thx for the updates and reopening

@mandarjog
Copy link
Contributor Author

/retest

@yutongz
Copy link
Contributor

yutongz commented Sep 5, 2017

/test all

@mandarjog
Copy link
Contributor Author

mandarjog commented Sep 5, 2017

Tests passed in private gke cluster.

Tests Summary
PASSED: //tests/e2e/tests/mixer:go_default_test 
PASSED: //tests/e2e/tests/bookinfo:go_default_test 

@yutongz
Copy link
Contributor

yutongz commented Sep 5, 2017

/test all

@istio-testing
Copy link
Collaborator

@mandarjog: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/e2e-suite-rbac-no_auth.sh 92039ea link /test e2e-suite-rbac-no_auth
prow/e2e-suite-rbac-auth.sh 92039ea link /test e2e-suite-rbac-auth
prow/e2e-suite-no_rbac-auth.sh 92039ea link /test e2e-suite-no_rbac-auth
prow/e2e-suite-no_rbac-no_auth.sh 92039ea link /test e2e-suite-no_rbac-no_auth

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.

@mandarjog
Copy link
Contributor Author

@douglas-reid also replicated the same test results.

@ldemailly
Copy link
Contributor

squash and merge according to our exceptional policies until 503s are resolved separately
( mandar and doug certify this pr as passing all tests locally in 2 places )

@ldemailly ldemailly merged commit 838bcba into istio:master Sep 5, 2017
@ldemailly
Copy link
Contributor

it's merged. but @mandarjog can you add release notes though

mandarjog pushed a commit to mandarjog/istio that referenced this pull request Oct 30, 2017
Former-commit-id: b2c76f68276985f885754aa2a47b3c8b186cf0bb
rshriram pushed a commit that referenced this pull request Oct 30, 2017
* 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
@mandarjog mandarjog deleted the mixer2 branch October 30, 2017 21:07
mandarjog pushed a commit that referenced this pull request Oct 31, 2017
Former-commit-id: c46bc5c44d9fcd278c4af1d79226530e54355a68
vbatts pushed a commit to vbatts/istio that referenced this pull request Oct 31, 2017
* 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
mandarjog added a commit that referenced this pull request Nov 2, 2017
* 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
howardjohn pushed a commit to howardjohn/istio that referenced this pull request Jan 12, 2020
This should resolve the jaeger regression around ports. Additionally
other features have been added to the installer.

Fixes: istio#19227
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

Successfully merging this pull request may close these issues.

None yet

8 participants