Repository navigation
Description
Restoring a cluster from a downloaded cluster backup file fails on a Debian 13 node: the file is rejected with the error "not_valid_gpg_file", even though the file and the password are correct.
Steps to reproduce
- Install NethServer 8 on a Debian 13 node and create a cluster (do not use Rocky Linux 9 or Debian 12).
- On a working cluster, download a cluster backup file (action
download-cluster-backup, with any password). - On a new Debian 13 node that has no cluster yet, run the action
retrieve-cluster-backupwithtypeset tofile, the downloaded file, and the same password.
Expected behavior
The file is accepted, and the cluster can be restored with restore-cluster.
Actual behavior
The action stops with the validation error not_valid_gpg_file and the restore cannot start. The check in retrieve-cluster-backup (step 10validate) expects the word "GPG" in the output of the file command. On Debian 13 the same encrypted file is described as "PGP symmetric key encrypted data - AES with 256-bit key ...", so the check fails.
I checked the same backup file creation (gpg --batch -c) and the exact check on several systems:
- Rocky Linux 9 (file 5.39, GnuPG 2.3.3): "GPG symmetrically encrypted data (AES256 cipher)" — accepted
- Debian 12 (file 5.44, GnuPG 2.2.40): "GPG symmetrically encrypted data (AES256 cipher)" — accepted
- Debian 13 (file 5.46, GnuPG 2.4.7): "PGP symmetric key encrypted data - AES with 256-bit key ..." — rejected
Other systems that ship GnuPG 2.4 (Ubuntu 24.04, Rocky Linux 10, AlmaLinux 10) give the same "PGP" text. When the request type is url instead of file, the error handling itself fails with a Python KeyError: 'file' (the action stops with a traceback), which hides the real validation error.
Components
core 3.23.2 on Debian 13 (trixie), single-node cluster in a virtual machine. The code in the main branch of ns8-core has the same check.
See also
Found while testing backup and restore of a cluster on a second test node. Pull request with the fix: NethServer/ns8-core#1443
Assisted-by: Hermes Agent:claude-sonnet-5-5
Activity