Commit Graph

21410 Commits (1398988d52f0a16f913f1f66d1167c79fb13400a)

Author SHA1 Message Date
x7upLime 1398988d52 Regenerates docs 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 9665bad429 Generates docs 2023-04-22 00:49:30 +03:00
x7upLime e5b57f8e89 Changes the way in which pid is written to mounts file
The integration test error was due to the fact that
multiple pids were written to the file without spaces
between them, breaking the pid-kill logic
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 3b3d2905a1 Changes variable name in integrataion test 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 e28a1b411b Removes pidfile util 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 b5d5bbe38c Removes external lib dependency
Since the test is failing on architectures/platform I can't reproduce
on.. I'm readapting the test in such a way to minimize the amount of
code that can be responsible for the error.

We're not looking for all system processes in order to find our
mount processes(ps -ef); we're looking directly at the mount
processes that have been spawned by our test instead.

To say that a process is no longer alive:
We try to wait for conclusion to get the processState.
If the wait results in an *ExitError, it means that either
the proc has failed to run, or it exited failing(see doc);
in both cases we're happy.. since we previously made a check
to know that those same processes were alive.
2023-04-22 00:48:58 +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 e91f041802 Stops govet from complaining
also this err message got me thinking....
"syscall.SIGKILL cannot be trapped (did you mean syscall.SIGTERM?)"
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 60c3863f87 Changes klog version and adds it to go.sum
uses klog/v2.. hopefully getting rid of the ci error.
2023-04-22 00:48:56 +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 70a0ed2aac Modifies integration test label
yeah.. perhaps that's a better name
2023-04-22 00:47:06 +03:00
x7upLime e34548f9ae Adds description to lock.AppendToFile 2023-04-22 00:47:06 +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 849de9086b Adds documentation for validateMountCmd test
working towards #11571 :)
2023-04-22 00:47:06 +03:00
x7upLime 07f3f440ff Fixes lint error
The message from the linter makes a good point..
we're storing a reference for the mount processes, but we're not
using them.. Thus the committed lines.
2023-04-22 00:47:06 +03:00
x7upLime 47981b75d9 Add integration test for mount-clean mechanism
I copied as much code as I could from the previous tests
that seemed more alike to the one I was trying to build.

I put it inside the functional mount tests,
with the other mount-command related tests,
as I thought (as per comments on "TestFunctional()") it
could safely share a profile in parallel..
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 ba71ee071f
Merge pull request #16359 from kubernetes/dependabot/go_modules/github.com/otiai10/copy-1.11.0
Bump github.com/otiai10/copy from 1.10.0 to 1.11.0
2023-04-21 11:01:20 -07:00
Steven Powell c20fe6fb14
Merge pull request #16358 from kubernetes/dependabot/go_modules/google.golang.org/api-0.119.0
Bump google.golang.org/api from 0.118.0 to 0.119.0
2023-04-21 11:00:49 -07:00
dependabot[bot] 19b7a574c6
Bump github.com/otiai10/copy from 1.10.0 to 1.11.0
Bumps [github.com/otiai10/copy](https://github.com/otiai10/copy) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/otiai10/copy/releases)
- [Commits](https://github.com/otiai10/copy/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/otiai10/copy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-21 17:14:39 +00:00
dependabot[bot] 4207387a88
Bump google.golang.org/api from 0.118.0 to 0.119.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.118.0 to 0.119.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.118.0...v0.119.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-21 17:14:29 +00:00
Medya Ghazizadeh 37709e44e5
Merge pull request #16341 from spowelljr/fixRuncVersion
CI: Fix runc version in PR title
2023-04-21 16:19:14 +02:00
Medya Ghazizadeh 8e539a40d3
Merge pull request #16355 from spowelljr/fixCloudShellTouch
CI: Cloud Shell file touch failing to due no dir
2023-04-21 16:18:18 +02:00
Steven Powell d62681b58f CI: Cloud Shell file touch failing to due no dir 2023-04-20 13:45:37 -07:00
Steven Powell 7a79f70916
Merge pull request #16352 from minikube-bot/auto_bump_cloud_spanner_emulator_version
Addon cloud-spanner: Update cloud-spanner-emulator/emulator image from 1.5.3 to 1.5.4
2023-04-20 13:18:43 -07:00
minikube-bot 0797de325c Addon cloud-spanner: Update cloud-spanner-emulator/emulator image from 1.5.3 to 1.5.4 2023-04-20 14:59:06 +00:00
Steven Powell ae5749725a
Merge pull request #16334 from uos-ljtian/master
update slack link
2023-04-19 09:55:12 -07:00
Steven Powell 2ec814feab
Merge pull request #16347 from kubernetes/dependabot/go_modules/github.com/docker/cli-23.0.4incompatible
Bump github.com/docker/cli from 23.0.3+incompatible to 23.0.4+incompatible
2023-04-18 14:06:21 -07:00
Steven Powell 836dca7a6d
Merge pull request #16345 from kubernetes/dependabot/go_modules/libvirt.org/go/libvirt-1.9002.0
Bump libvirt.org/go/libvirt from 1.9000.0 to 1.9002.0
2023-04-18 14:05:34 -07:00
dependabot[bot] c05dd76f54
Bump github.com/docker/cli
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 23.0.3+incompatible to 23.0.4+incompatible.
- [Release notes](https://github.com/docker/cli/releases)
- [Commits](https://github.com/docker/cli/compare/v23.0.3...v23.0.4)

---
updated-dependencies:
- dependency-name: github.com/docker/cli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-18 20:12:38 +00:00
dependabot[bot] 922b490a77
Bump libvirt.org/go/libvirt from 1.9000.0 to 1.9002.0
Bumps [libvirt.org/go/libvirt](https://gitlab.com/libvirt/libvirt-go-module) from 1.9000.0 to 1.9002.0.
- [Release notes](https://gitlab.com/libvirt/libvirt-go-module/tags)
- [Commits](https://gitlab.com/libvirt/libvirt-go-module/compare/v1.9000.0...v1.9002.0)

---
updated-dependencies:
- dependency-name: libvirt.org/go/libvirt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-18 20:12:11 +00:00
Steven Powell aa27e1ba05 CI: Fix runc version in PR title 2023-04-18 09:39:00 -07:00
Medya Ghazizadeh e27c7d6bc4
Merge pull request #16338 from spowelljr/fixWrongPreloads
CI: Fix incorrect preload images
2023-04-17 15:23:07 -07:00
Steven Powell f4d8f258a1 CI: Fix incorrect preload images 2023-04-17 13:56:09 -07:00
Steven Powell 03fa6d3796
Merge pull request #16337 from kubernetes/dependabot/go_modules/github.com/cenkalti/backoff/v4-4.2.1
Bump github.com/cenkalti/backoff/v4 from 4.2.0 to 4.2.1
2023-04-17 10:58:45 -07:00