Pause optional ai-rem update jobs during backup snapshots

This commit is contained in:
admin committed 2026-10-18 11:43:20 +02:00
1 parent be48ee85ef
commit 68c21db454
4 files changed
+39 -2

No files matched your search

+9 -1
View File
@@ -821,7 +821,13 @@ else: raise SystemExit('Unexpected Docker command')
f.write(f'EXTRA_PATHS=("{old_extra}")\n')
package=self.build_package()
self.env['TEST_METADATA_ONLY']='true'
for attempt in range(2):
for attempt in range(3):
if attempt == 1:
optional=['ai-rem-managed-update.timer','ai-rem-managed-update.service']
state=json.loads(self.state.read_text())
for unit in optional: state['services'][unit]='active'
self.state.write_text(json.dumps(state))
units=optional+units
self.events.write_text('')
result=subprocess.run(['bash',str(package),'--foreground','--enable-ai-rem'],
env=self.env,capture_output=True,text=True,timeout=120)
@@ -834,6 +840,8 @@ else: raise SystemExit('Unexpected Docker command')
self.assertEqual([(a['label'],a['source']) for a in extra],
[('extra-0',str(old_extra)),('extra-1','/srv/ai-rem'),('extra-2','/etc/ai-rem')])
events=self.events.read_text()
if attempt == 0:
self.assertNotIn('systemctl stop ai-rem-managed-update.',events)
for unit in units:
self.assertEqual(events.count('systemctl stop '+unit+' '),1)
self.assertLess(events.index('systemctl stop '+unit+' '),events.index('mariadb-dump'))