Sandbox-Optionen aus der systemd-Unit entfernen
Als Dienst schlug jeder Snapshot mit "cfs-lock 'storage-data' error: got lock request timeout" fehl, waehrend derselbe Aufruf in der Shell funktionierte. Ursache war ProtectSystem=full in unserer eigenen Unit: das haengt /etc im Namespace des Dienstes schreibgeschuetzt ein. pvesh fuehrt die Proxmox-API im eigenen Prozess aus, der Snapshot-Task ist also ein Kindprozess von pvesnap und erbt diese Einschraenkung. pmxcfs legt seine Sperren aber als Verzeichnisse unter /etc/pve/priv/lock/ an - das mkdir scheitert, Proxmox wiederholt es erfolglos und meldet am Ende einen Lock-Timeout statt eines Rechtefehlers. ProtectHome=yes war aus demselben Grund schaedlich: es blendet /root aus, womit die SSH-Schluessel fuer die uebrigen Cluster-Nodes fehlen. * Unit enthaelt keine Sandbox-Optionen mehr, mit Kommentar, warum nicht. * Neu: pvesnap/preflight.py prueft root-Rechte, Schreibzugriff auf /etc/pve und Sichtbarkeit von /root. Der Dienst schreibt das beim Start ins Journal, "pvesnap check" zeigt es ebenfalls an - damit faellt so etwas sofort auf, statt sich als Lock-Timeout zu tarnen. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
e26d966a8b
commit
1be13ad294
@@ -13,6 +13,7 @@ from .config import DEFAULT_CONFIG_PATH, ConfigError, load_config
|
||||
from .daemon import Daemon, SingleInstanceLock
|
||||
from .engine import run_group, select_guests
|
||||
from .naming import parse_name
|
||||
from .preflight import check_environment
|
||||
from .proxmox import Proxmox, ProxmoxError, pvesh_available
|
||||
from .schedule import describe, next_due
|
||||
from .state import State
|
||||
@@ -331,6 +332,13 @@ def cmd_check(args):
|
||||
for problem in problems:
|
||||
print(" - %s" % problem, file=sys.stderr)
|
||||
return 1
|
||||
environment = check_environment(require_pve=pvesh_available())
|
||||
if environment:
|
||||
print("Hinweise zur Umgebung:", file=sys.stderr)
|
||||
for problem in environment:
|
||||
print(" - %s" % problem, file=sys.stderr)
|
||||
print("", file=sys.stderr)
|
||||
|
||||
print("Konfiguration in Ordnung: %d Gruppe(n)." % len(config.groups))
|
||||
for group in config.groups:
|
||||
print(" - %s: %s, behalte %s / %s%s"
|
||||
|
||||
Reference in New Issue
Block a user