(bugfix) Surface rsync SSH failure details in run results
Include the selected SSH credential metadata and rsync log tail in dry-run and failed backup results so Django shows the actual SSH or rsync failure instead of only the exit code. Warn in host checks when a host still uses database-stored private key material, making it easier to spot old credentials after switching to generated filesystem keys.
This commit is contained in:
@@ -41,6 +41,13 @@ def _attach_credential_options(config: dict[str, Any], credential: SshCredential
|
||||
if paths.get("known_hosts") and not _has_ssh_option(options, "UserKnownHostsFile"):
|
||||
options.append(f"-oUserKnownHostsFile={paths['known_hosts']}")
|
||||
ssh["options"] = options
|
||||
config["ssh_credential"] = {
|
||||
"id": credential.pk,
|
||||
"name": credential.name,
|
||||
"identity_file": paths["identity_file"],
|
||||
"generated": credential.generated,
|
||||
"storage": "filesystem" if credential.key_path else "database",
|
||||
}
|
||||
|
||||
|
||||
def _materialize_credential(credential: SshCredential) -> dict[str, str]:
|
||||
|
||||
Reference in New Issue
Block a user