You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was running a deployment in shell 1 and wanted to start a second one in shell 2
./batou deploy -P production
batou/2.4.1 (cpython 3.11.8-final0, Darwin 23.4.0 arm64)
Could not acquire lock .batou-lock
Traceback (most recent call last):
File "/Users/me/myprj/.appenv/a2ac3148/lib/python3.11/site-packages/batou/utils.py", line 71, in locked
fcntl.lockf(lockfile, fcntl.LOCK_EX | fcntl.LOCK_NB)
BlockingIOError: [Errno 35] Resource temporarily unavailable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/me/myprj/./.appenv/a2ac3148/bin/batou", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/me/myprj/.appenv/a2ac3148/lib/python3.11/site-packages/batou/main.py", line 221, in main
return args.func(**func_args)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/me/myprj/.appenv/a2ac3148/lib/python3.11/site-packages/batou/deploy.py", line 364, in main
with locked(".batou-lock"):
File "/Users/flanitz/.nix-profile/lib/python3.11/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/Users/me/myprj/.appenv/a2ac3148/lib/python3.11/site-packages/batou/utils.py", line 74, in locked
raise RuntimeError(
RuntimeError: ('cannot create lock "<_io.TextIOWrapper name=\'.batou-lock\' mode=\'a+\' encoding=\'UTF-8\'>": more than one instance running concurrently?', <_io.TextIOWrapper name='.batou-lock' mode='a+' encoding='UTF-8'>)
The text was updated successfully, but these errors were encountered:
Currently, batou is locking the deployment host, so that only one pid can deploy the project on a host. Since frlan wanted to deploy two projects at the same time, the lock mechanism seems to be too restrictive.
We are currently locking on the deployment host, so that only one pid can deploy the project on a host. We are not locking on the target systems, and also not environment-granular.
What should be the semantics of the lock mechanism? I think a good design would be a lock per environment, so that only one deployment can run in an environment at a time, as well as a lock per target system, so that only one deployment can run on a target system at a time, which is #450
I was running a deployment in shell 1 and wanted to start a second one in shell 2
The text was updated successfully, but these errors were encountered: