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

unified minikube cluster status query #18998

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

ComradeProgrammer
Copy link
Member

@ComradeProgrammer ComradeProgrammer commented May 31, 2024

feat: unified minikube cluster status query
FIX #18722

Now the cluster can show "Starting" when executing minikube profile

time comparison:
Before:

$ time  minikube profile list   
minikube profile list  0.17s user 0.06s system 63% cpu 0.368 total

After

$time ./out/minikube profile list
./out/minikube profile list  0.19s user 0.07s system 63% cpu 0.420 total

0.368s->0.420s on my own laptop. minikube profile light is not affected

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 31, 2024
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@ComradeProgrammer
Copy link
Member Author

/test all

@ComradeProgrammer ComradeProgrammer marked this pull request as ready for review June 3, 2024 16:09
@medyagh
Copy link
Member

medyagh commented Jun 3, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jun 3, 2024
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.

I am curious to see "time" differennce" and also before and after this PR

@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@ComradeProgrammer ComradeProgrammer changed the title WIP: feat: unified minikube cluster status query feat: unified minikube cluster status query Jun 16, 2024
@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 16, 2024
@medyagh
Copy link
Member

medyagh commented Jun 17, 2024

we have an option called minikube profile list --light, make sure this PR still does NOT query the status of the cluster.

pkg/minikube/cluster/status.go Show resolved Hide resolved
pkg/minikube/cluster/status.go Show resolved Hide resolved
pkg/minikube/cluster/status.go Outdated Show resolved Hide resolved
pkg/minikube/cluster/status.go Outdated Show resolved Hide resolved
pkg/minikube/cluster/status.go Outdated Show resolved Hide resolved
pkg/minikube/cluster/status.go Outdated Show resolved Hide resolved
pkg/minikube/cluster/status.go Outdated Show resolved Hide resolved
ComradeProgrammer and others added 2 commits June 29, 2024 20:40
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
@ComradeProgrammer
Copy link
Member Author

I am curious to see "time" differennce" and also before and after this PR

time difference updated in the description.

@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

pkg/minikube/cluster/status.go Outdated Show resolved Hide resolved
pkg/minikube/cluster/status.go Outdated Show resolved Hide resolved
@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
KVM_Linux_crio TestMultiControlPlane/serial/DegradedAfterControlPlaneNodeStop (gopogh) 0.00 (chart)
KVM_Linux TestFunctional/serial/ComponentHealth (gopogh) 0.73 (chart)
Docker_macOS TestMountStart/serial/VerifyMountPostStop (gopogh) 5.36 (chart)
Docker_macOS TestKubernetesUpgrade (gopogh) 12.28 (chart)
Docker_macOS TestMissingContainerUpgrade (gopogh) 12.28 (chart)
Docker_macOS TestInsufficientStorage (gopogh) 24.24 (chart)
Docker_macOS TestMultiNode/serial/AddNode (gopogh) 24.24 (chart)
Docker_macOS TestMultiNode/serial/DeleteNode (gopogh) 24.24 (chart)
Docker_macOS TestMultiNode/serial/DeployApp2Nodes (gopogh) 24.24 (chart)
Docker_macOS TestMultiNode/serial/FreshStart2Nodes (gopogh) 24.24 (chart)
Docker_macOS TestMultiNode/serial/MultiNodeLabels (gopogh) 24.24 (chart)
Docker_macOS TestMultiNode/serial/PingHostFrom2Pods (gopogh) 24.24 (chart)
Docker_macOS TestMultiNode/serial/ProfileList (gopogh) 24.24 (chart)
Docker_macOS TestMultiNode/serial/RestartKeepsNodes (gopogh) 24.24 (chart)
Docker_macOS TestMultiNode/serial/RestartMultiNode (gopogh) 24.24 (chart)
Docker_macOS TestMultiNode/serial/StartAfterStop (gopogh) 24.24 (chart)
Docker_macOS TestMultiNode/serial/StopMultiNode (gopogh) 24.24 (chart)
Docker_macOS TestMultiNode/serial/StopNode (gopogh) 24.24 (chart)
Docker_macOS TestOffline (gopogh) 24.24 (chart)
Docker_macOS TestScheduledStopUnix (gopogh) 24.24 (chart)
Docker_macOS TestSkaffold (gopogh) 31.82 (chart)

To see the flake rates of all tests by environment, click here.

Co-authored-by: Steven Powell <44844360+spowelljr@users.noreply.github.com>
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 18998) |
+----------------+----------+---------------------+
| minikube start | 49.9s    | 49.2s               |
| enable ingress | 25.7s    | 24.9s               |
+----------------+----------+---------------------+

Times for minikube start: 50.3s 50.4s 51.5s 50.5s 46.6s
Times for minikube (PR 18998) start: 50.8s 51.0s 46.6s 47.2s 50.4s

Times for minikube ingress: 24.9s 28.0s 27.4s 24.0s 24.4s
Times for minikube (PR 18998) ingress: 24.4s 24.4s 24.0s 28.0s 23.9s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 18998) |
+----------------+----------+---------------------+
| minikube start | 21.5s    | 22.1s               |
| enable ingress | 21.5s    | 21.8s               |
+----------------+----------+---------------------+

Times for minikube start: 20.9s 22.3s 22.0s 21.5s 20.8s
Times for minikube (PR 18998) start: 23.5s 21.3s 23.5s 21.0s 21.0s

Times for minikube ingress: 21.3s 21.3s 21.8s 21.3s 21.8s
Times for minikube (PR 18998) ingress: 21.2s 22.8s 21.8s 21.3s 21.8s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 18998) |
+----------------+----------+---------------------+
| minikube start | 20.7s    | 22.3s               |
| enable ingress | 35.0s    | 31.7s               |
+----------------+----------+---------------------+

Times for minikube start: 22.9s 20.5s 19.8s 19.8s 20.2s
Times for minikube (PR 18998) start: 20.0s 22.4s 22.9s 23.3s 22.7s

Times for minikube ingress: 32.2s 30.8s 31.8s 31.8s 48.3s
Times for minikube (PR 18998) ingress: 32.2s 32.3s 30.8s 31.8s 31.2s

@medyagh
Copy link
Member

medyagh commented Jul 23, 2024

@ComradeProgrammer lets also try the the benchmark for the --light or -l to ensure it does NOT check for the cluster status if users said -l

@medyagh
Copy link
Member

medyagh commented Aug 26, 2024

I did bencharmking for --light and it seems good ! this PR is good to be merged (just those function names need to be renamed)

thank you @ComradeProgrammer for making the code much cleaner after this PR !


$ time minikube profile list --light
|---------|-----------|---------|--------------|------|---------|---------|-------|----------------|--------------------|
| Profile | VM Driver | Runtime |      IP      | Port | Version | Status  | Nodes | Active Profile | Active Kubecontext |
|---------|-----------|---------|--------------|------|---------|---------|-------|----------------|--------------------|
| p1      | docker    | docker  | 192.168.58.2 | 8443 | v1.30.1 | Skipped |     1 |                |                    |
| p2      | docker    | docker  | 192.168.49.2 | 8443 | v1.30.1 | Skipped |     1 |                |                    |
|---------|-----------|---------|--------------|------|---------|---------|-------|----------------|--------------------|

real	0m0.063s
user	0m0.046s
sys	0m0.025s
10:09:28 medya/workspace/minikube
uni_status ✓
$ time mk profile list --light
|---------|-----------|---------|--------------|------|---------|---------|-------|----------------|--------------------|
| Profile | VM Driver | Runtime |      IP      | Port | Version | Status  | Nodes | Active Profile | Active Kubecontext |
|---------|-----------|---------|--------------|------|---------|---------|-------|----------------|--------------------|
| p1      | docker    | docker  | 192.168.58.2 | 8443 | v1.30.1 | Skipped |     1 |                |                    |
| p2      | docker    | docker  | 192.168.49.2 | 8443 | v1.30.1 | Skipped |     1 |                |                    |
|---------|-----------|---------|--------------|------|---------|---------|-------|----------------|--------------------|

real	0m0.063s
user	0m0.046s
sys	0m0.028s


@medyagh medyagh changed the title feat: unified minikube cluster status query unified minikube cluster status query Sep 18, 2024
@medyagh medyagh self-requested a review September 18, 2024 18:39
@medyagh
Copy link
Member

medyagh commented Sep 18, 2024

/lgtm

@medyagh medyagh merged commit c38897d into kubernetes:master Sep 18, 2024
25 of 38 checks passed
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 18, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ComradeProgrammer, medyagh

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 Sep 18, 2024
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Qemu driver: profile list shows "Stopped" instead of "Starting..."
6 participants