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

--interactive=false is ignored #19518

Closed
nirs opened this issue Aug 26, 2024 · 0 comments · Fixed by #19531
Closed

--interactive=false is ignored #19518

nirs opened this issue Aug 26, 2024 · 0 comments · Fixed by #19531
Assignees
Labels
co/qemu-driver QEMU related issues kind/bug Categorizes issue or PR as related to a bug. os/macos

Comments

@nirs
Copy link
Contributor

nirs commented Aug 26, 2024

What Happened?

Actual behavior:

When starting minikube with --interactive=false, minikube run sudo command without -n, triggering sudo password prompts.

Expected behavior:

If interaction is disabled use sudo -n and fail immediately if sudo without a password is not configured for the command.

Example run:

% minikube start --driver qemu --memory 2g --container-runtime containerd --interactive=false --alsologtostderr -v=4
...
| I0827 02:16:48.390075   16853 out.go:177] 🔑  Your firewall is blocking bootpd which is required for socket_vmnet. The following commands will be executed to unblock bootpd:

    $ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd 
    $ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblock /usr/libexec/bootpd 



🔑  Your firewall is blocking bootpd which is required for socket_vmnet. The following commands will be executed to unblock bootpd:

    $ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd 
    $ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblock /usr/libexec/bootpd 


I0827 02:16:48.395109   16853 firewall.go:73] testing: [sudo -n /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd]
I0827 02:16:48.414543   16853 firewall.go:75] [sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd] may require a password: exit status 1
W0827 02:16:48.414588   16853 firewall.go:77] [sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd] requires a password, and --interactive=false
I0827 02:16:48.414592   16853 firewall.go:80] running: [sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd]
Password:

Attach the log file

log.txt

Operating System

macOS (Default)

Driver

QEMU

nirs added a commit to nirs/ramen that referenced this issue Aug 27, 2024
Ensure that reading from stdin fails immediately instead of blocking
forever by running child processes with /dev/null as stdin.

This does not fix the issue on macOS - even when stdin is connected to
/dev/null, the system can display and read password from the shell:

    % sudo true </dev/null
    Password:

Minikube has an --interactive=false flag but unfortunately it seems to
be ignored in this code path.

[1] kubernetes/minikube#19518

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
nirs added a commit to nirs/ramen that referenced this issue Aug 27, 2024
Ensure that reading from stdin fails immediately instead of blocking
forever by running child processes with /dev/null as stdin.

This does not fix the issue on macOS - even when stdin is connected to
/dev/null, the system can display and read password from the shell:

    % sudo true </dev/null
    Password:

Minikube has an --interactive=false flag but unfortunately it seems to
be ignored in this code path.

[1] kubernetes/minikube#19518

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
@afbjorklund afbjorklund added co/qemu-driver QEMU related issues kind/bug Categorizes issue or PR as related to a bug. os/macos labels Aug 27, 2024
raghavendra-talur pushed a commit to RamenDR/ramen that referenced this issue Aug 27, 2024
Ensure that reading from stdin fails immediately instead of blocking
forever by running child processes with /dev/null as stdin.

This does not fix the issue on macOS - even when stdin is connected to
/dev/null, the system can display and read password from the shell:

    % sudo true </dev/null
    Password:

Minikube has an --interactive=false flag but unfortunately it seems to
be ignored in this code path.

[1] kubernetes/minikube#19518

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
@spowelljr spowelljr self-assigned this Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/qemu-driver QEMU related issues kind/bug Categorizes issue or PR as related to a bug. os/macos
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants