feat(oci): add Scanopy and force the stop of a container that ignores it

This commit is contained in:
MacRimi
2026-11-01 01:25:04 +01:00
parent cb97fc4c98
commit e8e9e07e6b
16 changed files with 1397 additions and 3 deletions
+5 -1
View File
@@ -824,7 +824,11 @@ def candidate_host_sources(journal, state):
def stop(vmid):
if run('pct', 'status', str(vmid)).strip() == b'status: running':
run('pct', 'shutdown', str(vmid), '--timeout', '60')
try:
run('pct', 'shutdown', str(vmid), '--timeout', '60')
except RuntimeError:
# What `docker stop` does with a process that ignores the signal.
run('pct', 'stop', str(vmid))
if run('pct', 'status', str(vmid)).strip() != b'status: stopped':
raise ValueError(translate('The container did not stop; its disks are not touched'))