error in health polling fixed

This commit is contained in:
Philipp
2026-05-21 10:34:44 +02:00
parent 87682a777f
commit 30e2afdc79
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ async function checkZvolAccess() {
async function checkResticRepository() {
try {
const result = await runRestic(['snapshots', '--json'], { ignoreExitCode: true });
const result = await runRestic(['--no-lock', 'snapshots', '--json'], { ignoreExitCode: true });
return checkValue(result.exitCode === 0, result.exitCode === 0 ? 'ok' : result.stderr.trim() || 'restic repository check failed');
} catch (error) {
return checkValue(false, error.message);
+1 -1
View File
@@ -16,7 +16,7 @@ snapshotsRouter.get('/:vmName/:snapshotId/files', async (req, res, next) => {
try {
const snapshot = await validateSnapshotForVm(req.params.vmName, req.params.snapshotId);
assertSnapshotIdShape(snapshot.id);
const result = await runRestic(['ls', '--json', snapshot.id]);
const result = await runRestic(['--no-lock', 'ls', '--json', snapshot.id]);
const entries = result.stdout
.split('\n')
.filter(Boolean)
+1 -1
View File
@@ -40,7 +40,7 @@ export async function validateVmExists(vmName) {
export async function listSnapshotsForVm(vmName) {
await validateVmExists(vmName);
const result = await runRestic(['snapshots', '--json', '--tag', vmName]);
const result = await runRestic(['--no-lock', 'snapshots', '--json', '--tag', vmName]);
const snapshots = JSON.parse(result.stdout || '[]');
return snapshots.sort((a, b) => String(b.time || '').localeCompare(String(a.time || '')));
}