Skip to content

Commit

Permalink
Test lima fix for running in background
Browse files Browse the repository at this point in the history
With the fix[1] lima starts the hostagenet process in a new process
group so we can run limactl normally as it should. When we terminate
after errors limactl is terminated without harming the hostagenet
process.

The fix is available in upstream but not released yet. It should
available in lima around October.

[1] lima-vm/lima#2574

Signed-off-by: Nir Soffer <[email protected]>
  • Loading branch information
nirs committed Sep 1, 2024
1 parent a58f4ea commit e6d40fe
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions test/drenv/providers/lima/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from drenv import kubeconfig
from drenv import yaml

LIMACTL = "limactl"
LIMACTL = "/Users/nsoffer/src/lima/_output/bin/limactl"

# Important lima statuses
RUNNING = "Running"
Expand Down Expand Up @@ -234,15 +234,7 @@ def _create_cluster(profile, config):


def _start_cluster(profile):
# Start limactl in a new process group to prevnet killing limactl hostagent on drenv shutdown.
# Should be fixed in lima, but this should be good enough for now.
_watch(
LIMACTL,
"start",
profile["name"],
context=profile["name"],
process_group=0,
)
_watch(LIMACTL, "start", profile["name"], context=profile["name"])


def _stop_cluster(profile):
Expand Down

0 comments on commit e6d40fe

Please sign in to comment.