-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Use noninteractive sudo when running podman #7959
Conversation
[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 |
@medyagh : why do we need to run an extra cleanup like this, outside all machines etc ? isn't enough to delete the volume when the container is removed, since they are all "named" |
To avoid asking for a password in the middle of minikube commands. The setup process is supposed to involve adding podman to sudoers...
When deleting all minikube profiles, that is
Avoids spamming the log with extra drivers
We want to verify that "NOPASSWD" has been set up properly Otherwise the sudo timestamp might time out (after 15 mins)
/ok-to-test |
errs = oci.PruneAllVolumesByLabel(oci.Docker, delLabel) | ||
if ociBin == oci.Podman { | ||
// podman prune does not support --filter | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this line it seems to return and wont go to the deleteall process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The operation is not supported (volume prune) on podman, so we can only list-and-delete
@@ -137,7 +142,8 @@ func runDelete(cmd *cobra.Command, args []string) { | |||
} | |||
|
|||
if deleteAll { | |||
deleteContainersAndVolumes() | |||
deleteContainersAndVolumes(oci.Docker) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe do them in parallel ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possibly, the theory is that one of them will be "empty"
kvm2 Driver Times for Minikube (PR 7959): [68.42498932000001 69.372956699 66.063275534] Averages Time Per Log
docker Driver Times for Minikube (PR 7959): [28.681519867000002 29.911240598000003 27.528685352] Averages Time Per Log
|
To avoid asking for a password in the middle of minikube commands.
The setup process is supposed to involve adding podman to sudoers...
Fixes #7958
Related to #7960 in that it runs podman, no matter what driver is used.