Commit Graph

3192 Commits (4d5265bba926e6fa79d2c3c344dea048ebac4955)

Author SHA1 Message Date
Steven Powell dda802b332 none driver: fix image build 2023-04-26 18:57:16 -07:00
x7upLime 8931619b01 Applied suggestions 2023-04-25 15:11:41 +03:00
x7upLime 455bcb19ef refactors removePid logic 2023-04-22 13:32:45 +03:00
x7upLime aab0cb6d2a Adds mechanism to remove pid from pidfile if mount is sigtermd 2023-04-22 00:50:00 +03:00
x7upLime 3d3e6a14e7 added stuff to reflect suggestions 2023-04-22 00:49:30 +03:00
x7upLime b196ee46af Apply suggestions from code review 2023-04-22 00:49:30 +03:00
x7upLime 0170981567 Saves us from passing func as parameter
:)
2023-04-22 00:49:30 +03:00
x7upLime b09cd43e1d Corrects style issue 2023-04-22 00:49:30 +03:00
x7upLime 8f50ee999a Corrects mendacious comment 2023-04-22 00:49:30 +03:00
x7upLime 595c8eeeda Adapts TestTryKillOne log for failing 2023-04-22 00:49:30 +03:00
x7upLime 82abc0dbee Adapts unit test to new dependency 2023-04-22 00:49:30 +03:00
x7upLime c55a4caacc Adds the ownership check as a dependency
Otherway I see no obvious way to pass this check
during (say) unit testing
2023-04-22 00:49:30 +03:00
x7upLime d72f2fb285 Changes pid owner conditional
What happened in the failed integration tests was that the starting
process was not "minikube", it was "minikube-linux-" and
"minikube-darwin-" instead.
2023-04-22 00:49:30 +03:00
x7upLime ddec3100b9 Ensures sigkilling only minikube started processes
Adds a helper function to check that the executable name
is minikube.
2023-04-22 00:49:30 +03:00
x7upLime b5e59b5db4 Renames sigkill function 2023-04-22 00:49:30 +03:00
x7upLime 1d5b316fda Makes comment more clear 2023-04-22 00:49:30 +03:00
x7upLime b368c64bb6 Update cmd/minikube/cmd/delete.go 2023-04-22 00:49:30 +03:00
x7upLime db14047b65 Changes helper killProcess function name 2023-04-22 00:49:30 +03:00
x7upLime 43ff38b27d Changes variable name in test 2023-04-22 00:49:30 +03:00
x7upLime ee22b47795 Apply suggestions from code review 2023-04-22 00:49:30 +03:00
x7upLime 51e46b6d8d Refactors GetPids
Moves GetPids inside cmd/delete.go as a helper function
Adds description
2023-04-22 00:49:30 +03:00
x7upLime ead0b401ae Changes name to unittest tool 2023-04-22 00:48:58 +03:00
x7upLime badc971403 Adds source for cross platform killable process to test
As a way to clean the minikube repo dir.
2023-04-22 00:48:58 +03:00
x7upLime b1bd26ab06 Adds unit test for new helper function tryKillOne
also adds that pleasedontkillme pkg, for the trykillone to be
tested against, so that we can run unit tests cross-platform:
no sure exec.Command("sleep", ....) is avail on windows...
2023-04-22 00:48:58 +03:00
x7upLime 3f47e72752 Modularizes killProcess()
adds helper functions for killing one process, given one pid
adds helper function to read pids out of a given pidfile
2023-04-22 00:48:34 +03:00
x7upLime 07d20708a5 Corrects error handling in killProcess
If we encountered just one err, we're returning it
If we're returning multiple errors, we're outing 'em
and return a multiple-errors error
2023-04-22 00:47:06 +03:00
x7upLime 9d4f296c1f Adjusts mount processes cleaning logic
The delete mechanism called by the --kill flag logic
inside the minikube mount command, relies on a .mount-process file
inside the .minikube dotfolder in home directory.

For this to work, the mount should've been instantiated
by some mechanism that also creates the file; like
k8s.io/minikube/pkg/minikube/node.configureMounts()

To just add the local.WriteFile() logic from configureMounts()
is not enough for the usecase in #15778:
user's consequent "minikube mount" calls would break the cleaning
logic, since the file's content gets overwritten at each new call.
So on subsequent minikube mounts, a call to "minikube mount
--kill=true" would remove just the last pid, leaving the other
mounts unaltered, and no trace of them in any place...(leak?)

For the same mechanism to work here,
we should rely on some local.AppendFile() function, to add
separated pids consequently.
This way only "minikube mount" would use this new append logic,
leaving unaltered the other functions.

We now have a new behaviour for the .mount-process file,
in order to address this, we should modify the delete logic from
cmd/minikube/cmd/delete.go -- killProcess(),
so that we can both kill a single pid, as well as multiple
space-separated pids in the same way.

...

Ah yes..
we're slightly modifying the "minikube mount" RunE anon function,
in order to write the pid into the .mount-process file;
as well as modifying cluster.Mount()'s signature to accept the pid.
That should be more than safe, since cluster.Mount() is used only here
2023-04-22 00:47:06 +03:00
Steven Powell c30c183dac remove deprecated functions 2023-04-12 15:03:13 -07:00
Medya Ghazizadeh 9d9403c50f
Merge pull request #16206 from spowelljr/checkForScannerErrors
cleanup: Check for scanner errors
2023-04-11 10:54:38 -07:00
Oldřich Jedlička 4a8688218d Add PowerShell code completion
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
2023-04-07 22:58:47 +02:00
Steven Powell 15b0ad0e13 update message 2023-04-04 11:15:24 -07:00
Steven Powell 2f17549d79 add exit message if user tries to use virtualbox driver 2023-04-04 09:29:36 -07:00
Anders F Björklund ae7b5dc362 Require crictl to be installed for none driver
Before Kubernetes 1.24, it was possible to use the Docker runtime
without installing the "crictl" debugging tool (from cri-tools).
2023-04-02 22:05:57 +02:00
Steven Powell 5dd0f26cd7 cleanup: Check for scanner errors 2023-03-31 11:15:34 -07:00
Medya Ghazizadeh 51474d4327
Merge pull request #16174 from spowelljr/noneDriverVersion
none driver: don't check for kicbase/ISO version
2023-03-27 16:31:02 -07:00
Steven Powell b296ae8c47
Merge pull request #16139 from kadern0/issue-15432
Fix: check if addon is enabled before doing validation
2023-03-27 14:42:07 -07:00
Steven Powell f86772b487 none driver: don't check for kicabse/ISO version 2023-03-27 13:52:42 -07:00
Pablo Caderno af02a8522a Fix: check if addon is enabled before doing validation
Signed-off-by: Pablo Caderno <kaderno@gmail.com>
2023-03-25 18:46:22 +11:00
Steven Powell 10145a2381
Merge pull request #15834 from OmSaran/tunnel
Ensure only one instance of tunnel process runs
2023-03-24 10:03:15 -07:00
Pablo Caderno 5c261e80e9 Fix: check if addon is enabled before doing validation
Signed-off-by: Pablo Caderno <kaderno@gmail.com>
2023-03-24 09:15:30 +11:00
Pablo Caderno 56c99ef91b Fix: check if addon is enabled before doing validation
Signed-off-by: Pablo Caderno <kaderno@gmail.com>
2023-03-23 18:28:23 +11:00
Steven Powell 7f1383fb89 Revert: "Add shell completion for minikube kubectl subcommand" 2023-03-22 13:33:46 -07:00
Om Saran b0547a1caf Remove unnecessary file creation for lock 2023-03-22 00:53:03 -05:00
Steven Powell 50e9147e4e fix lint errors 2023-03-20 12:43:07 -07:00
Steven Powell 50b0730e5d
Merge pull request #15984 from spowelljr/fixAddons
Fix image related bugs when enabling addons
2023-03-10 11:11:41 -08:00
Steven Powell 949ab16609 use decoder 2023-03-09 13:34:09 -08:00
Steven Powell 270a985651 test: Fix having to change test byte size on new addon 2023-03-09 11:35:09 -08:00
Steven Powell 1c0bc567dd fixup error messaging 2023-03-07 11:40:30 -08:00
Om Saran 0db6f80b09 Fix format specifiers 2023-03-07 11:11:40 -08:00
Om Saran 0930723c09 Handle unexpected error for lock acquisition 2023-03-07 11:11:40 -08:00