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

test flake: private key does not match public key #49648

Open
howardjohn opened this issue Feb 29, 2024 · 7 comments · May be fixed by #50130
Open

test flake: private key does not match public key #49648

howardjohn opened this issue Feb 29, 2024 · 7 comments · May be fixed by #50130
Assignees
Labels
area/ambient Issues related to ambient mesh

Comments

@howardjohn
Copy link
Member

https://prow.istio.io/view/gs/istio-prow/logs/integ-ambient_istio_postsubmit/1763283647529488384 weird

@howardjohn howardjohn added the area/ambient Issues related to ambient mesh label Feb 29, 2024
@howardjohn
Copy link
Member Author

@hzxuzhonghu
Copy link
Member

similar with #49650?

@howardjohn
Copy link
Member Author

i think it's different, that one didn't have istiod crashlooping. but maybe same

@howardjohn
Copy link
Member Author

So the istiod is restarting many times. Its not failign with this on the initial install.

So probably its crashing. And then fails to come up -- two separate bugs.

@howardjohn
Copy link
Member Author

I think I get it. We have 2 files, but we do not read them atomically. I can reproduce by flipping between two cacerts.

https://ahmet.im/blog/kubernetes-inotify/ touches on this but doesn't suggest a fix.

I don't understand why we seem to be permanently in that state though. I would expect TestIntermediateCertificateRefresh triggers it and only happens if istiod happens to crash around that time. Maybe there is something more nefarious going on.

@howardjohn
Copy link
Member Author

Oh I think its simpler, the test is just broken:

$ openssl s_server -accept 9999 -cert ca-cert-alt-2.pem -key ca-key-alt-2.pem
Using default temp DH parameters
error setting private key
40F7FA89237D0000:error:05800074:x509 certificate routines:ossl_x509_check_private_key:key values mismatch:crypto/x509/x509_cmp.c:416:

vs

$ openssl s_server -accept 9999 -cert ca-cert-alt.pem -key ca-key-alt.pem
Using default temp DH parameters
ACCEPT
^C

@howardjohn howardjohn self-assigned this Mar 27, 2024
@howardjohn
Copy link
Member Author

And its not documented how it is generated... yay.

I don't know how the test works at all. Oh, actually looks like it doesn't actually assert anything 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ambient Issues related to ambient mesh
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants