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

Show info about the minikube linux distribution #4525

Merged
merged 3 commits into from
Jul 23, 2019

Conversation

afbjorklund
Copy link
Collaborator

Taking from /etc/os-release, via libmachine provision

For #4523

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 18, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 18, 2019
@medyagh
Copy link
Member

medyagh commented Jun 18, 2019

/retest this please

@medyagh medyagh changed the title Show information about the linux distribution Show information about the linux distro for none driver Jun 18, 2019
@medyagh medyagh changed the title Show information about the linux distro for none driver Show info about the linux distro for none driver Jun 18, 2019
@medyagh
Copy link
Member

medyagh commented Jun 19, 2019

there is a lint issue

cmd/minikube/cmd/start.go:546:53: unnecessary conversion (unconvert)
	osReleaseInfo, err := provision.NewOsRelease([]byte(osReleaseOut))
	                                                   ^
cmd/minikube/cmd/start.go:269:16: Error return value of `showOsRelease` is not checked (errcheck)
		showOsRelease()
		             ^

@RA489
Copy link

RA489 commented Jun 19, 2019

/lint

Copy link
Contributor

@k8s-ci-robot k8s-ci-robot left a comment

Choose a reason for hiding this comment

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

@RA489: 0 warnings.

In response to this:

/lint

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.

@RA489
Copy link

RA489 commented Jun 19, 2019

@minikube-bot OK to test

@medyagh medyagh added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jun 19, 2019
@tstromberg
Copy link
Contributor

tstromberg commented Jun 21, 2019

I like this PR. I do agree that showing the distro is of most importance for the none drivers, but I would also like to show it for other platforms. We have the perfect space for it here:

😄 minikube v1.1.1 on linux (amd64)

What I propose is to place it here:

😄 minikube v1.1.1 on CentOS 4.5 (amd64)

In the future I would also like to extend this to Mac OS X & Windows as well, but surprisingly, I can't find any good libraries for doing so. That said, I'm perfectly OK with this approach as a stop-gap measure.

@tstromberg
Copy link
Contributor

@minikube-bot OK to test

This can be merged once lint issues are addressed.

@afbjorklund
Copy link
Collaborator Author

I like this PR. I do agree that showing the distro is of most importance for the none drivers, but I would also like to show it for other platforms. We have the perfect space for it here:

😄 minikube v1.1.1 on linux (amd64)

What I propose is to place it here:

😄 minikube v1.1.1 on CentOS 4.5 (amd64)

They are talking about different things. One is showing information about the minikube binary (including the version and GOOS/GOARCH, which is defined to be one of "linux"/"windows/"darwin" and "amd64")

The other is showing information from the libmachine provisioner, i.e. what is being installed on the VM. Currently I used the same information also for the none driver, maybe that is what lead to the confusion.

@afbjorklund
Copy link
Collaborator Author

In the future I would also like to extend this to Mac OS X & Windows as well, but surprisingly, I can't find any good libraries for doing so. That said, I'm perfectly OK with this approach as a stop-gap measure.

Most other operating systems have this in their uname, since they don't have as many vendors as GNU/Linux does. So you would use the go equivalent of uname(2), with the "sysname" and "release"

@afbjorklund afbjorklund changed the title Show info about the linux distro for none driver Show info about the minikube linux distribution Jun 22, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 22, 2019
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

Looks good to me

@medyagh
Copy link
Member

medyagh commented Jun 25, 2019

/retest this please

1 similar comment
@medyagh
Copy link
Member

medyagh commented Jul 1, 2019

/retest this please

@tstromberg
Copy link
Contributor

@minikube-bot OK to test

@tstromberg
Copy link
Contributor

Curious failure:

 16:30:48 | > * Creating none VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
 16:33:49 | ! E0701 16:33:49.321193   12847 start.go:633] StartHost: DetectProvisioner: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded
 16:33:49 | ! I0701 16:33:49.321250   12847 utils.go:129] non-retriable error: DetectProvisioner: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded
 16:33:49 | ! W0701 16:33:49.321383   12847 exit.go:100] Unable to start VM: DetectProvisioner: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded
 16:33:49 | ! X Unable to start VM: DetectProvisioner: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded
 16:33:49 | ! * Sorry that minikube crashed. If this was unexpected, we would love to hear from you:

Also, the Travis timeout makes me wonder if a unit test is starting up a real minikube rather than using mocks.

@tstromberg
Copy link
Contributor

@minikube-bot OK to test

@tstromberg
Copy link
Contributor

Looks like this one has a merge conflict now :(

@afbjorklund
Copy link
Collaborator Author

Ok, rebase time perhaps

@afbjorklund afbjorklund force-pushed the distro branch 2 times, most recently from 793b8a4 to 44e50d4 Compare July 17, 2019 16:55
@afbjorklund
Copy link
Collaborator Author

Moved into a proper function

@tstromberg
Copy link
Contributor

go tests are still timing out in travis, so I wonder if additional mocking may be required?

ok  	k8s.io/minikube/pkg/minikube/bootstrapper/kubeadm	0.049s	coverage: 33.1% of statements
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

@tstromberg tstromberg added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 17, 2019
@afbjorklund
Copy link
Collaborator Author

go tests are still timing out in travis, so I wonder if additional mocking may be required?

Yes, there is something wrong with DetectProvisioner. Think we have seen this elsewhere too ?

Waiting for SSH to be available...

@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Jul 18, 2019

Maybe should scope out the provisioned linux distribution for now. There's only one, anyway...

MockDriver needs the MockProvisioner

@afbjorklund
Copy link
Collaborator Author

Here is where it was seen before: #4132

⌛  Waiting for SSH access ...
Waiting for SSH to be available...
Getting to WaitForSSH function...
Error getting ssh command 'exit 0' : driver does not support ssh commands

@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Jul 18, 2019

It seems that these tests have always been timing out, since they use VirtualBox and not Mock host...

Before: (6 minutes wasted!)
ok k8s.io/minikube/pkg/minikube/cluster 360.409s coverage: 50.6% of statements

After: (half a second now...)
ok k8s.io/minikube/pkg/minikube/cluster 0.467s coverage: 47.7% of statements

That is, we seem to be calling SSH a lot for drivers (none, unknown) that don't actually support it ?

@afbjorklund afbjorklund removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 18, 2019
@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Jul 18, 2019

/retest was checking translations, and some weird sshutil error ?

@tstromberg
Copy link
Contributor

/retest was checking translations, and some weird sshutil error ?

I think we've now addressed cluster_test, sshutil, and translation check issues. Sorry about the instability there!

Taking from /etc/os-release, via libmachine provision

Failure to show it is not fatal, just log an error...
@afbjorklund
Copy link
Collaborator Author

Seems there is a bug in the MockDriver, where it returns nil information with nil error. Thanks.

Makes it more clear that it is os-release(5)
Not very friendly to return nil without error
@afbjorklund afbjorklund merged commit e22b605 into kubernetes:master Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants