Skip to content

Conversation

@nirs
Copy link
Contributor

@nirs nirs commented Sep 14, 2025

Since #20852 minikube is broken on Fedora/RHEL. We add console.log (~/.minikube/machines/NAME/console.log) for dumping the console logs during startup. Libvirt is blocked by selinux policy:

$ sudo ausearch -m AVC --start today
...
----
time->Sat Sep 13 22:14:10 2025
type=AVC msg=audit(1757790850.921:4801): avc:  denied  { open } for  pid=215452 comm="virtlogd" path="/home/nsoffer/.minikube/machines/minikube/console.log" dev="vda3" ino=197349579 scontext=system_u:system_r:virtlogd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
----

Having better logs in the kvm driver can be helpful but it cannot break basic functionality. Remove the code to create the log file and dump the logs.

This is a manual revert of commit
2b81ce2. We cannot do a clean revert since all commits in #20852 were squashed during merge.

Tested using:

$ make out/docker-machine-driver-kvm2

$ cp out/docker-machine-driver-kvm2 ~/.minikube/bin/

$ out/minikube start --driver kvm
😄  minikube v1.37.0 on Fedora 42 (kvm/amd64)
✨  Using the kvm2 driver based on user configuration
👍  Starting "minikube" primary control-plane node in "minikube" cluster
🔥  Creating kvm2 VM (CPUs=2, Memory=6144MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.34.0 on Docker 28.4.0 ...
🔗  Configuring bridge CNI (Container Networking Interface) ...
🔎  Verifying Kubernetes components...
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass

❗  /usr/local/bin/kubectl is version 1.32.1, which may have incompatibilities with Kubernetes 1.34.0.
▪ Want kubectl v1.34.0? Try 'minikube kubectl -- get pods -A'
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

Tested on Fedora 42:

  • integartion tests
    • 3 mount tests failed (mount tests are broken on Fedora)
    • TestBinaryMirror looks invalid, /tmp and /home are no on the same filesystem on Fedora
      • Failed to move binary file: rename /home/nsoffer/.minikube/cache/linux/amd64/v1.34.0/kubectl /tmp/TestBinaryMirror3071116281/001/v1.34.0/bin/linux/amd64/kubectl: invalid cross-device link

Fixes #21548
Fedora bug https://bugzilla.redhat.com/2394975

Since kubernetes#20852 minikube is broken on Fedora/RHEL. We add console.log
(~/.minikube/machines/NAME/console.log) for dumping the console logs
during startup. Libvirt is blocked by selinux policy:

    $ sudo ausearch -m AVC --start today
    ...
    ----
    time->Sat Sep 13 22:14:10 2025
    type=AVC msg=audit(1757790850.921:4801): avc:  denied  { open } for  pid=215452 comm="virtlogd" path="/home/nsoffer/.minikube/machines/minikube/console.log" dev="vda3" ino=197349579 scontext=system_u:system_r:virtlogd_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
    ----

Having better logs in the kvm driver can be helpful but it cannot break
basic functionality. Remove the code to create the log file and dump the
logs.

This is a manual revert of commit
2b81ce2. We cannot do a clean revert
since all commits in kubernetes#20852 were squashed during merge.

Tested using:

    $ make out/docker-machine-driver-kvm2

    $ cp out/docker-machine-driver-kvm2 ~/.minikube/bin/

    $ out/minikube start --driver kvm
    😄  minikube v1.37.0 on Fedora 42 (kvm/amd64)
    ✨  Using the kvm2 driver based on user configuration
    👍  Starting "minikube" primary control-plane node in "minikube" cluster
    🔥  Creating kvm2 VM (CPUs=2, Memory=6144MB, Disk=20000MB) ...
    🐳  Preparing Kubernetes v1.34.0 on Docker 28.4.0 ...
    🔗  Configuring bridge CNI (Container Networking Interface) ...
    🔎  Verifying Kubernetes components...
	▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
    🌟  Enabled addons: storage-provisioner, default-storageclass

    ❗  /usr/local/bin/kubectl is version 1.32.1, which may have incompatibilities with Kubernetes 1.34.0.
	▪ Want kubectl v1.34.0? Try 'minikube kubectl -- get pods -A'
    🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 14, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nirs
Once this PR has been reviewed and has the lgtm label, please assign prezha for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 14, 2025
@nirs
Copy link
Contributor Author

nirs commented Sep 14, 2025

/cc @prezha

@k8s-ci-robot k8s-ci-robot requested a review from prezha September 14, 2025 13:04
@nirs
Copy link
Contributor Author

nirs commented Sep 14, 2025

/retest

@nirs
Copy link
Contributor Author

nirs commented Sep 14, 2025

/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 Sep 14, 2025
@k8s-ci-robot
Copy link
Contributor

@nirs: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-minikube-integration 0aba0a8 link true /test pull-minikube-integration

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@medyagh
Copy link
Member

medyagh commented Sep 15, 2025

KVM tests look suspiciously awful ! https://storage.googleapis.com/minikube-builds/logs/21550/41420/KVM_Linux.html

@medyagh
Copy link
Member

medyagh commented Sep 15, 2025

/retest-this-please

@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@nirs
Copy link
Contributor Author

nirs commented Sep 15, 2025

We need to fix the CI first, it fails for master: #21554

@medyagh
Copy link
Member

medyagh commented Sep 15, 2025

@nirs do you mind pasting output on fedoera

curl -Lo ~/.minikube/bin/docker-machine-driver-kvm2 https://storage.googleapis.com/minikube-builds/21550/docker-machine-driver-kvm2 && chmod +x ~/.minikube/bin/docker-machine-driver-kvm2

and then verify

~/.minikube/bin/docker-machine-driver-kvm2 version
./out/minikube start -d kvm

Link to the aux binary of this PR https://storage.googleapis.com/minikube-builds/21550/docker-machine-driver-kvm2

Copy link
Contributor

@obnoxxx obnoxxx left a comment

Choose a reason for hiding this comment

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

I can confirm that this changes fixes the breakage on my Fedora 42.

So IMO it should get merged.

@nirs
Copy link
Contributor Author

nirs commented Sep 16, 2025

@nirs do you mind pasting output on fedoera

I did this:

$ curl -fsSLO https://storage.googleapis.com/minikube-builds/21550/docker-machine-driver-kvm2

$ sha256sum docker-machine-driver-kvm2 
33176fa7adafb038da027bc0a745cf895cf10c361947983a2d4a565d9f0b615d  docker-machine-driver-kvm2

$ chmod +x docker-machine-driver-kvm2 

$ ./docker-machine-driver-kvm2 version
version: v1.37.0
commit: 9645d82b4d9ac69c7eed1420686bbdb2e6fe6da3

This does not match the commit of this change:

$ git rev-parse HEAD
0aba0a8e31d541259ffdeb45c9650281430067b8

So we have an issue with the build. Maybe we rebase the commit before building? We should build the actual commit in the PR.

@nirs
Copy link
Contributor Author

nirs commented Sep 16, 2025

Testing local build:

$ make out/docker-machine-driver-kvm2
GOARCH=amd64 \
go build \
        -buildvcs=false \
	-installsuffix "static" \
	-ldflags="-X k8s.io/minikube/pkg/drivers/kvm.version=v1.37.0 -X k8s.io/minikube/pkg/drivers/kvm.gitCommitID="0aba0a8e31d541259ffdeb45c9650281430067b8"" \
	-tags "libvirt_without_lxc" \
	-o out/docker-machine-driver-kvm2-amd64 \
	k8s.io/minikube/cmd/drivers/kvm
chmod +X out/docker-machine-driver-kvm2-amd64
cp out/docker-machine-driver-kvm2-amd64 out/docker-machine-driver-kvm2

$ sha256sum out/docker-machine-driver-kvm2
6dddadb8d0037725282bcd1cd8e229883646cd6d36a14ec82adc28e6d3df523c  out/docker-machine-driver-kvm2

$ make clean
rm -rf /home/nsoffer/minikube/out
rm -f pkg/minikube/assets/assets.go
rm -f pkg/minikube/translate/translations.go
rm -rf ./vendor
rm -rf /tmp/tmp.*.minikube_*
rm -rf test/integration/licenses

$ make out/docker-machine-driver-kvm2
GOARCH=amd64 \
go build \
        -buildvcs=false \
	-installsuffix "static" \
	-ldflags="-X k8s.io/minikube/pkg/drivers/kvm.version=v1.37.0 -X k8s.io/minikube/pkg/drivers/kvm.gitCommitID="0aba0a8e31d541259ffdeb45c9650281430067b8"" \
	-tags "libvirt_without_lxc" \
	-o out/docker-machine-driver-kvm2-amd64 \
	k8s.io/minikube/cmd/drivers/kvm
chmod +X out/docker-machine-driver-kvm2-amd64
cp out/docker-machine-driver-kvm2-amd64 out/docker-machine-driver-kvm2

$ sha256sum out/docker-machine-driver-kvm2
6dddadb8d0037725282bcd1cd8e229883646cd6d36a14ec82adc28e6d3df523c  out/docker-machine-driver-kvm2

Starting vm:

$ cp out/docker-machine-driver-kvm2 ~/.minikube/bin/

$ make
go build  -tags "" -ldflags="-X k8s.io/minikube/pkg/version.version=v1.37.0 -X k8s.io/minikube/pkg/version.isoVersion=v1.37.0 -X k8s.io/minikube/pkg/version.gitCommitID="0aba0a8e31d541259ffdeb45c9650281430067b8" -X k8s.io/minikube/pkg/version.storageProvisionerVersion=v5" -o out/minikube k8s.io/minikube/cmd/minikube

$ out/minikube start -d kvm
😄  minikube v1.37.0 on Fedora 42 (kvm/amd64)
✨  Using the kvm2 driver based on user configuration
👍  Starting "minikube" primary control-plane node in "minikube" cluster
🔥  Creating kvm2 VM (CPUs=2, Memory=6144MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.34.0 on Docker 28.4.0 ...
🔗  Configuring bridge CNI (Container Networking Interface) ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: default-storageclass, storage-provisioner

❗  /usr/local/bin/kubectl is version 1.32.1, which may have incompatibilities with Kubernetes 1.34.0.
    ▪ Want kubectl v1.34.0? Try 'minikube kubectl -- get pods -A'
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

@nirs
Copy link
Contributor Author

nirs commented Sep 16, 2025

@nirs do you mind pasting output on fedoera

Driver from this PR build

$ ~/.minikube/bin/docker-machine-driver-kvm2 version
version: v1.37.0
commit: 9645d82b4d9ac69c7eed1420686bbdb2e6fe6da3

Minikube 1.37.0

$ minikube version
minikube version: v1.37.0
commit: 65318f4cfff9c12cc87ec9eb8f4cdd57b25047f3

$ minikube start -d kvm
😄  minikube v1.37.0 on Fedora 42 (kvm/amd64)
✨  Using the kvm2 driver based on user configuration
👍  Starting "minikube" primary control-plane node in "minikube" cluster
🔥  Creating kvm2 VM (CPUs=2, Memory=6144MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.34.0 on Docker 28.4.0 ...
🔗  Configuring bridge CNI (Container Networking Interface) ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: default-storageclass, storage-provisioner

❗  /usr/local/bin/kubectl is version 1.32.1, which may have incompatibilities with Kubernetes 1.34.0.
    ▪ Want kubectl v1.34.0? Try 'minikube kubectl -- get pods -A'
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

Minikube from this PR

$ out/minikube version
minikube version: v1.37.0
commit: 0aba0a8e31d541259ffdeb45c9650281430067b8

$ out/minikube start -d kvm
😄  minikube v1.37.0 on Fedora 42 (kvm/amd64)
✨  Using the kvm2 driver based on user configuration
👍  Starting "minikube" primary control-plane node in "minikube" cluster
🔥  Creating kvm2 VM (CPUs=2, Memory=6144MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.34.0 on Docker 28.4.0 ...
🔗  Configuring bridge CNI (Container Networking Interface) ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: default-storageclass, storage-provisioner

❗  /usr/local/bin/kubectl is version 1.32.1, which may have incompatibilities with Kubernetes 1.34.0.
    ▪ Want kubectl v1.34.0? Try 'minikube kubectl -- get pods -A'
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

@medyagh
Copy link
Member

medyagh commented Sep 16, 2025

/retest-this-please

@minikube-pr-bot

This comment has been minimized.

@medyagh
Copy link
Member

medyagh commented Sep 16, 2025

/retest-this-please

@medyagh medyagh changed the title kvm: Unbreak minikube on Fedora/RHEL kvm: fix minikube on Fedora/RHEL with SELinux Sep 16, 2025
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

┌────────────────┬──────────┬────────────────────────┐
│    COMMAND     │ MINIKUBE │ MINIKUBE  ( PR 21550 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 45.0s    │ 44.3s                  │
│ enable ingress │ 16.7s    │ 17.3s                  │
└────────────────┴──────────┴────────────────────────┘

Times for minikube start: 45.7s 45.5s 45.5s 45.8s 42.7s
Times for minikube (PR 21550) start: 44.7s 44.4s 46.1s 43.6s 43.0s

Times for minikube ingress: 15.8s 16.4s 19.3s 16.3s 15.8s
Times for minikube (PR 21550) ingress: 16.4s 15.8s 15.8s 18.9s 19.8s

docker driver with docker runtime

┌────────────────┬──────────┬────────────────────────┐
│    COMMAND     │ MINIKUBE │ MINIKUBE  ( PR 21550 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 23.0s    │ 23.2s                  │
│ enable ingress │ 12.7s    │ 12.5s                  │
└────────────────┴──────────┴────────────────────────┘

Times for minikube start: 23.3s 22.4s 23.9s 22.9s 22.5s
Times for minikube (PR 21550) start: 23.0s 26.3s 22.0s 21.9s 23.0s

Times for minikube ingress: 13.7s 12.7s 12.7s 10.7s 13.7s
Times for minikube (PR 21550) ingress: 12.7s 12.7s 13.7s 10.7s 12.7s

docker driver with containerd runtime

┌────────────────┬──────────┬────────────────────────┐
│    COMMAND     │ MINIKUBE │ MINIKUBE  ( PR 21550 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 20.0s    │ 21.3s                  │
│ enable ingress │ 30.2s    │ 26.8s                  │
└────────────────┴──────────┴────────────────────────┘

Times for minikube start: 21.2s 19.9s 20.0s 19.0s 20.0s
Times for minikube (PR 21550) start: 21.9s 21.2s 20.9s 19.7s 22.8s

Times for minikube (PR 21550) ingress: 23.2s 39.2s 24.2s 23.2s 24.2s
Times for minikube ingress: 40.2s 39.2s 24.2s 24.2s 23.2s

@minikube-pr-bot

This comment has been minimized.

@medyagh medyagh merged commit 1af8bdc into kubernetes:master Sep 17, 2025
36 of 51 checks passed
@medyagh
Copy link
Member

medyagh commented Sep 17, 2025

/lgtm

@minikube-pr-bot
Copy link

Here are the number of top 10 failed tests in each environments with lowest flake rate.

Environment Test Name Flake Rate
Docker_Linux_crio_arm64 (6 failed) TestFunctional/parallel/ServiceCmdConnect(gopogh) 0.00% (chart)
Docker_Linux_crio_arm64 (6 failed) TestFunctional/parallel/ServiceCmd/DeployApp(gopogh) 0.00% (chart)
Docker_Linux_crio_arm64 (6 failed) TestFunctional/parallel/ServiceCmd/HTTPS(gopogh) 0.00% (chart)
Docker_Linux_crio_arm64 (6 failed) TestFunctional/parallel/ServiceCmd/Format(gopogh) 0.00% (chart)
Docker_Linux_crio_arm64 (6 failed) TestFunctional/parallel/ServiceCmd/URL(gopogh) 0.00% (chart)
Docker_Linux_docker_arm64 (8 failed) TestAddons/parallel/LocalPath(gopogh) 0.00% (chart)
Docker_Linux_docker_arm64 (8 failed) TestFunctional/parallel/DashboardCmd(gopogh) 0.00% (chart)
Docker_Linux_docker_arm64 (8 failed) TestFunctional/parallel/ServiceCmdConnect(gopogh) 0.00% (chart)
Docker_Linux_docker_arm64 (8 failed) TestFunctional/parallel/PersistentVolumeClaim(gopogh) 0.00% (chart)
Docker_Linux_docker_arm64 (8 failed) TestFunctional/parallel/ServiceCmd/DeployApp(gopogh) 0.00% (chart)
Docker_Linux_docker_arm64 (8 failed) TestFunctional/parallel/ServiceCmd/HTTPS(gopogh) 0.00% (chart)
Docker_Linux_docker_arm64 (8 failed) TestFunctional/parallel/ServiceCmd/Format(gopogh) 0.00% (chart)
Docker_Linux_docker_arm64 (8 failed) TestFunctional/parallel/ServiceCmd/URL(gopogh) 0.00% (chart)
KVM_Linux_crio (9 failed) TestFunctional/parallel/DashboardCmd(gopogh) 0.00% (chart)
KVM_Linux_crio (9 failed) TestFunctional/parallel/ServiceCmd/DeployApp(gopogh) 0.00% (chart)
KVM_Linux_crio (9 failed) TestFunctional/parallel/ServiceCmd/HTTPS(gopogh) 0.00% (chart)
KVM_Linux_crio (9 failed) TestFunctional/parallel/ServiceCmd/Format(gopogh) 0.00% (chart)
KVM_Linux_crio (9 failed) TestFunctional/parallel/ServiceCmd/URL(gopogh) 0.00% (chart)

Besides the following environments also have failed tests:

  • Docker_Linux_containerd: 15 failed (gopogh)

  • Docker_Linux_crio: 30 failed (gopogh)

  • Docker_Linux: 14 failed (gopogh)

  • Docker_Linux_containerd_arm64: 14 failed (gopogh)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

Minikube 1.37.0 --driver KVM2 failing to provision

5 participants