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

Vagrant cloud provider not including ca.crt in secret #10562

Merged
merged 1 commit into from
Jul 8, 2015

Conversation

derekwaynecarr
Copy link
Member

This fixes the error in log when running kube2sky on vagrant setup where it was looking for a ca.crt file that was missing because the controller-manager was not including it in the default tokens for vagrant.

Fixes #10522

@k8s-bot
Copy link

k8s-bot commented Jun 30, 2015

GCE e2e build/test passed for commit 1f9d882f96e61458941045b3111a84fbf38a3dfa.

@derekwaynecarr derekwaynecarr changed the title Vagrant cloud provider not including ca.crt in secret WIP: Vagrant cloud provider not including ca.crt in secret Jun 30, 2015
@derekwaynecarr
Copy link
Member Author

Still have to update cert:
reflector.go:136] Failed to list *api.Endpoints: Get https://10.247.0.1:443/api/v1beta3/endpoints: x509: certificate is valid for 10.245.1.2, not 10.247.0.1

@roberthbailey
Copy link
Contributor

@derekwaynecarr are you going to update the cert as part of this change?

@derekwaynecarr
Copy link
Member Author

Yes. I just ran out of time.

On Tuesday, June 30, 2015, Robert Bailey notifications@github.com wrote:

@derekwaynecarr https://github.com/derekwaynecarr are you going to
update the cert as part of this change?


Reply to this email directly or view it on GitHub
#10562 (comment)
.

@zmerlynn
Copy link
Member

zmerlynn commented Jul 1, 2015

Assigning to yourself. Assign someone else when this is ready.

@derekwaynecarr derekwaynecarr force-pushed the missing_ca_crt_vagrant branch from 1f9d882 to 3ade2ef Compare July 1, 2015 17:56
@derekwaynecarr derekwaynecarr changed the title WIP: Vagrant cloud provider not including ca.crt in secret Vagrant cloud provider not including ca.crt in secret Jul 1, 2015
@derekwaynecarr
Copy link
Member Author

This is a targeted PR that affects just the Vagrant deployment's usage of Salt.

I know @eparis has a solution that would enable AWS, but my bias is that should be a follow-on if time is an issue (also at that time, we would need to bring back cert_ip in vagrant pillar).

Either way, this fixes kube2sky on vagrant.

@eparis
Copy link
Contributor

eparis commented Jul 1, 2015

My hopefully generic solution which solves the problem for all is at:
eparis@ab52932

But I think this patch is fine for 0.20.x We should solve it for everyone, but this one only makes things a little worse. (I say worse, because the more we build scripts and hacks which are cloud provider only the more we build a brittle impossible to manage system, so I argue we do more in salt, less in 'provision', and less 'per cloud provider' everywhere.

@derekwaynecarr
Copy link
Member Author

@zmerlynn - this is ready for your review... tried to make the most targeted fix to lower risk. we can do a cleaner, more risky change as follow-on per @eparis

@k8s-bot
Copy link

k8s-bot commented Jul 1, 2015

GCE e2e build/test passed for commit 3ade2ef.

@k8s-bot
Copy link

k8s-bot commented Jul 1, 2015

GCE e2e build/test passed for commit 8fdfdd9.

@zmerlynn
Copy link
Member

zmerlynn commented Jul 1, 2015

LGTM

@zmerlynn zmerlynn added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 1, 2015
@zmerlynn
Copy link
Member

zmerlynn commented Jul 1, 2015

cc @eparis for another review

@zmerlynn
Copy link
Member

zmerlynn commented Jul 1, 2015

cc @dchen1107 for rubber stamp

@eparis
Copy link
Contributor

eparis commented Jul 1, 2015

LGTM

@bprashanth bprashanth assigned dchen1107 and unassigned zmerlynn Jul 4, 2015
@derekwaynecarr
Copy link
Member Author

Can this get merged today?

@zmerlynn
Copy link
Member

zmerlynn commented Jul 6, 2015

@brendandburns: Since you seem to be awake, too, feel like signing off on this? I'd like to get it in ASAP, too.

@derekwaynecarr
Copy link
Member Author

Friendly poke to merge?

@zmerlynn
Copy link
Member

zmerlynn commented Jul 7, 2015

Rebase?

@yujuhong
Copy link
Contributor

yujuhong commented Jul 7, 2015

Pending a rebase and waiting on @dchen1107's "ok-to-merge"

@derekwaynecarr derekwaynecarr force-pushed the missing_ca_crt_vagrant branch from 8fdfdd9 to cfb8ba0 Compare July 8, 2015 14:21
@derekwaynecarr
Copy link
Member Author

This is rebased and now works with @justinsb changes for how it uses the sans for certs. Be good to see this merged ;-)

@k8s-bot
Copy link

k8s-bot commented Jul 8, 2015

GCE e2e build/test passed for commit cfb8ba05ddd583872d7e43929ade633a41334fd4.

@derekwaynecarr derekwaynecarr force-pushed the missing_ca_crt_vagrant branch from cfb8ba0 to e2ddd2d Compare July 8, 2015 15:00
@k8s-bot
Copy link

k8s-bot commented Jul 8, 2015

GCE e2e build/test passed for commit e2ddd2d.

@zmerlynn
Copy link
Member

zmerlynn commented Jul 8, 2015

Still LGTM

@eparis
Copy link
Contributor

eparis commented Jul 8, 2015

still LGTM

@zmerlynn
Copy link
Member

zmerlynn commented Jul 8, 2015

This is hitting core in literally exactly one place and is otherwise confined to vagrant. Let's merge it.

@yujuhong
Copy link
Contributor

yujuhong commented Jul 8, 2015

/cc @vmarmol, the on-call today.

vmarmol added a commit that referenced this pull request Jul 8, 2015
Vagrant cloud provider not including ca.crt in secret
@vmarmol vmarmol merged commit 828146c into kubernetes:master Jul 8, 2015
zmerlynn added a commit that referenced this pull request Jul 8, 2015
…62-on-upstream-release-0.21

Automated cherry pick of #10562
@zmerlynn zmerlynn mentioned this pull request Jul 9, 2015
@AlexeyKupershtokh
Copy link

I'm still getting

Validating master
Validating minion-1
........
Waiting for each minion to be registered with cloud provider
error: couldn't read version from server: Get https://10.245.1.2/api: x509: certificate is valid for 192.168.56.101, 10.247.0.1, not 10.245.1.2

when running

export KUBERNETES_PROVIDER=vagrant
cluster/kube-up.sh

on the v0.21.1.

@AlexeyKupershtokh
Copy link

@derekwaynecarr though I'm currently trying to repeat this on a clean installation. I'll let you know.

@AlexeyKupershtokh
Copy link

Yep, the problem still persists.

@derekwaynecarr
Copy link
Member Author

Are you using virtual box or VMware?

What host OS are you running from?

On Thursday, July 9, 2015, Alexey Kupershtokh notifications@github.com
wrote:

Yep, the problem still persists.


Reply to this email directly or view it on GitHub
#10562 (comment)
.

@derekwaynecarr
Copy link
Member Author

@AlexeyKupershtokh - can you remove the ~/.kube directory and try to reproduce?

See my comment here for steps I followed:

#10900 (comment)

@AlexeyKupershtokh
Copy link

I'm running ubuntu 14.04.2 lts 64 bit, virtualbox 4.3.28.
Trying to repeat using your way. I'll let you know any results in about 12h.

@derekwaynecarr
Copy link
Member Author

Thanks for your help! It's possible there is some race condition or
something that is not working deterministically all the time, so having
outside help with error details is always a big help.

On Thu, Jul 9, 2015 at 1:11 PM, Alexey Kupershtokh <notifications@github.com

wrote:

I'm running ubuntu 14.04.2 lts 64 bit, virtualbox 4.3.28.
Trying to repeat using your way. I'll let you know any results in about
12h.


Reply to this email directly or view it on GitHub
#10562 (comment)
.

@AlexeyKupershtokh
Copy link

Yep, still the same result.
I've also performed a test with logging the *SANS env variable.
It has the value of IP:10.247.0.1,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.cluster.local,DNS:kubernetes-master in my case.
As far as I understand the cert_ip is vagrant eth1 ip which is 192.168.56.101.
So there is really no MASTER_IP (which is "10.245.1.2") that is used when accessing the cluster from the host machine.
If I add the MASTER_IP to the *SANS list, everything goes fine.

@derekwaynecarr
Copy link
Member Author

So you are getting a different eth1 ip than me. I will look to put the
certip grain back to resolve and cc you on the PR to verify it fixes for
you.

On Thursday, July 9, 2015, Alexey Kupershtokh notifications@github.com
wrote:

Yep, still the same result.
I've also performed a test with logging the *SANS env variable.
It has the value of
IP:10.247.0.1,DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.cluster.local,DNS:kubernetes-master
in my case.
As far as I understand the cert_ip is vagrant eth1 ip which is
192.168.56.101.
So there is really no MASTER_IP (which is "10.245.1.2") that is used when
accessing the cluster from the host machine.
If I add the MASTER_IP to the *SANS list, everything goes fine.


Reply to this email directly or view it on GitHub
#10562 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
10 participants