From 19b817ae03ec9915ad4e43a1c4c2ed2b6b845041 Mon Sep 17 00:00:00 2001 From: Jason Lynch Date: Sat, 11 Apr 2026 09:17:56 -0400 Subject: [PATCH] chore: quit circus in dev-lima-reset Circus can keep running after your shell is disconnected, for example if your terminal program restarts. This commit updates the lima Makefile to ensure that circus and its control-plane processes are stopped in the `teardown`, `reset`, and `run` targets. --- lima/.gitignore | 1 + lima/Makefile | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 lima/.gitignore diff --git a/lima/.gitignore b/lima/.gitignore new file mode 100644 index 00000000..143dbbee --- /dev/null +++ b/lima/.gitignore @@ -0,0 +1 @@ +circus.pid diff --git a/lima/Makefile b/lima/Makefile index 95446403..63ad471e 100644 --- a/lima/Makefile +++ b/lima/Makefile @@ -1,17 +1,22 @@ ansible_playbook=ansible-playbook \ --extra-vars='@vars.yaml' +.PHONY: quit +quit: + [ -e ./circus.pid ] && circusctl --timeout 2 quit 2>/dev/null || true + rm -f ./circus.pid + .PHONY: deploy deploy: $(ansible_playbook) deploy.yaml .PHONY: teardown -teardown: +teardown: quit $(ansible_playbook) teardown.yaml rm -rf ./data .PHONY: reset -reset: +reset: quit $(ansible_playbook) stop-dbs.yaml rm -rf ./data @@ -27,5 +32,5 @@ fix-clocks: ansible --become -i ./inventory.yaml all -m command -a 'chronyc -a makestep' .PHONY: run -run: build fix-clocks - LIMA_DIR=$(shell pwd) circusd ./circus.ini +run: quit build fix-clocks + LIMA_DIR=$(shell pwd) circusd --pidfile ./circus.pid ./circus.ini