From c73133d32fed9d2c2cf9cb1f0ea87444354ab688 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Sat, 31 Aug 2024 05:09:28 +0300 Subject: [PATCH] Test lima fix for running in background 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] https://github.com/lima-vm/lima/pull/2574 Signed-off-by: Nir Soffer --- test/drenv/providers/lima/__init__.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/test/drenv/providers/lima/__init__.py b/test/drenv/providers/lima/__init__.py index 5ed355719f..395b511434 100644 --- a/test/drenv/providers/lima/__init__.py +++ b/test/drenv/providers/lima/__init__.py @@ -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" @@ -241,15 +241,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):