mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-01 10:22:08 +00:00
Merge pull request #517 from f3rs3n/fix/optimization-description-wording
fix(post-install): align optimization descriptions with existing behavior
This commit is contained in:
@@ -0,0 +1,135 @@
|
||||
"""Wording contracts through the real metadata parser and exact-match formatter.
|
||||
|
||||
No post-install function or scanner is imported or executed. Node 22.6+ is
|
||||
required, as in test_command_descriptions.py; no npm dependencies are needed.
|
||||
"""
|
||||
import ast
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[3]
|
||||
|
||||
|
||||
class OptimizationDescriptionWordingTests(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
# Admit only the pure parser and its actual dependencies, not the scanner.
|
||||
path = ROOT / "AppImage/scripts/post_install_versions.py"
|
||||
functions = {"_read_text", "_version_tuple", "parse_post_install_script"}
|
||||
constants = {"_FN_DEF_RE", "_VERSION_RE", "_DESC_RE", "_REGISTER_RE", "_HEREDOC_RE"}
|
||||
nodes: list[ast.stmt] = [node for node in ast.parse(path.read_text(encoding="utf-8")).body
|
||||
if (isinstance(node, ast.FunctionDef) and node.name in functions)
|
||||
or (isinstance(node, ast.Assign) and any(
|
||||
isinstance(target, ast.Name) and target.id in constants
|
||||
for target in node.targets))]
|
||||
if len(nodes) != len(functions) + len(constants):
|
||||
raise AssertionError("Metadata parser seam changed: review its dependencies")
|
||||
scope = {"re": re, "Path": Path}
|
||||
exec(compile(ast.Module(body=nodes, type_ignores=[]), str(path), "exec"), scope)
|
||||
cls.metadata = {
|
||||
source: scope["parse_post_install_script"](ROOT / "scripts/post_install" / filename)
|
||||
for source, filename in (("auto", "auto_post_install.sh"),
|
||||
("custom", "customizable_post_install.sh"))
|
||||
}
|
||||
cls.catalogs = {
|
||||
locale: json.loads((ROOT / f"AppImage/messages/{locale}/common.json").read_text(encoding="utf-8"))
|
||||
for locale in ("en", "it")
|
||||
}
|
||||
node = os.environ.get("NODE_BINARY") or shutil.which("node")
|
||||
if not node:
|
||||
raise AssertionError("Install Node.js 22.6+ or set NODE_BINARY")
|
||||
cls.node = node
|
||||
version = subprocess.run([node, "--version"], capture_output=True, text=True, check=True).stdout
|
||||
match = re.fullmatch(r"v(\d+)\.(\d+)\.(\d+)\s*", version)
|
||||
if not match or tuple(map(int, match.groups())) < (22, 6, 0):
|
||||
raise AssertionError(f"Node.js 22.6+ required; detected {version.strip()}")
|
||||
# Replace only the JSON import; the formatter body executes unchanged.
|
||||
formatter = (ROOT / "AppImage/lib/optimization-descriptions.ts").read_text(encoding="utf-8")
|
||||
json_import = 'import enMessages from "../messages/en/common.json"'
|
||||
if formatter.count(json_import) != 1:
|
||||
raise AssertionError("Formatter import seam changed")
|
||||
fixture = formatter.replace(json_import, "const enMessages = " + json.dumps(cls.catalogs["en"]))
|
||||
fixture += '''
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
const [key, description, italian, catalogs] = JSON.parse(readFileSync(0, "utf8"));
|
||||
for (const locale of ["en", "it"]) {
|
||||
const calls: string[] = [];
|
||||
const t = (path: string) => {
|
||||
calls.push(path);
|
||||
return path.split(".").reduce((value, part) => value[part], catalogs[locale]);
|
||||
};
|
||||
assert.equal(optimizationDescription(description, t), locale === "en" ? description : italian);
|
||||
assert.deepEqual(calls, [`settings.optimizations.toolDescriptions.${key}`]);
|
||||
calls.length = 0;
|
||||
const unknown = description + " [new server wording]";
|
||||
assert.equal(optimizationDescription(unknown, t), unknown);
|
||||
assert.deepEqual(calls, []);
|
||||
}
|
||||
console.log("PASS actual exact lookup: EN/IT and unknown-description fallback");
|
||||
'''
|
||||
cls.directory = tempfile.TemporaryDirectory(prefix="optimization-wording-")
|
||||
cls.addClassCleanup(cls.directory.cleanup)
|
||||
cls.fixture = Path(cls.directory.name) / "formatter.mts"
|
||||
cls.fixture.write_text(fixture, encoding="utf-8")
|
||||
|
||||
def assert_description(self, key, source, tool, function, english, italian):
|
||||
for locale, expected in (("en", english), ("it", italian)):
|
||||
with self.subTest(key=key, locale=locale):
|
||||
self.assertEqual(self.catalogs[locale]["settings"]["optimizations"]["toolDescriptions"][key], expected)
|
||||
metadata = self.metadata[source][tool]
|
||||
self.assertEqual(metadata["function"], function)
|
||||
self.assertEqual(metadata["description"], english)
|
||||
result = subprocess.run(
|
||||
[self.node, "--experimental-strip-types", str(self.fixture)],
|
||||
input=json.dumps([key, metadata["description"], italian, self.catalogs]),
|
||||
capture_output=True, text=True)
|
||||
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
|
||||
self.assertIn("PASS actual exact lookup", result.stdout)
|
||||
|
||||
def test_log2ram_auto_fresh_install_detection_and_update_size(self):
|
||||
self.assert_description(
|
||||
"log2ramAuto", "auto", "log2ram", "install_log2ram_auto",
|
||||
"Fresh installs size Log2RAM from host RAM and ask for confirmation if storage is not detected as SSD. Updates preserve the configured size.",
|
||||
"Alla prima installazione, dimensiona Log2RAM in base alla RAM dell'host e chiede conferma se il dispositivo di archiviazione non viene rilevato come SSD. Gli aggiornamenti mantengono la dimensione configurata.")
|
||||
|
||||
def test_kexec_prepares_unit_and_alias_not_hotkey(self):
|
||||
self.assert_description(
|
||||
"kexec", "custom", "kexec", "enable_kexec",
|
||||
"Install kexec-tools and prepare a systemd unit plus the reboot-quick alias for fast reboots that skip BIOS/POST.",
|
||||
"Installa kexec-tools e prepara un'unità systemd e l'alias reboot-quick per riavvii rapidi che saltano BIOS/POST.")
|
||||
|
||||
def test_amd_only_claims_idle_parameter_and_kvm_module_options(self):
|
||||
self.assert_description(
|
||||
"amd", "custom", "amd_fixes", "apply_amd_fixes",
|
||||
"Apply idle=nomwait and KVM module options on AMD EPYC/Ryzen hosts.",
|
||||
"Applica idle=nomwait e opzioni del modulo KVM sugli host AMD EPYC/Ryzen.")
|
||||
|
||||
def test_guest_agent_only_lists_supported_environments_and_skip(self):
|
||||
self.assert_description(
|
||||
"guestAgent", "custom", "guest_agent", "install_guest_agent",
|
||||
"Detect QEMU/KVM, VMware or VirtualBox and install the matching guest agent; skip other environments.",
|
||||
"Rileva QEMU/KVM, VMware o VirtualBox e installa il guest agent corrispondente; salta gli altri ambienti.")
|
||||
|
||||
def test_backup_describes_global_defaults_without_speed_guarantee(self):
|
||||
self.assert_description(
|
||||
"backupLimits", "custom", "vzdump_speed", "optimize_vzdump",
|
||||
"Set global vzdump defaults to bwlimit: 0 and ionice: 5. This does not guarantee faster backups.",
|
||||
"Imposta i valori predefiniti globali di vzdump su bwlimit: 0 e ionice: 5. Questo non garantisce backup più veloci.")
|
||||
|
||||
def test_log2ram_custom_choices_and_update_preservation(self):
|
||||
self.assert_description(
|
||||
"log2ramCustom", "custom", "log2ram", "configure_log2ram",
|
||||
"Install Log2RAM with a chosen size, sync interval and optional autosync. Updates preserve the size and autosync choice.",
|
||||
"Installa Log2RAM con dimensione e intervallo di sincronizzazione a scelta e autosync facoltativo. Gli aggiornamenti mantengono la dimensione e la scelta sull'autosync.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -2473,11 +2473,11 @@
|
||||
"aptIpv4": "APT zur Verwendung von IPv4 zwingen, um Hänger auf Hosts mit fehlerhafter IPv6-Konnektivität zu vermeiden.",
|
||||
"network": "TCP-Puffer, somaxconn und IPv4-Härtung abstimmen und rp_filter auf fw-Bridges deaktivieren (kompatibel mit PVE 9).",
|
||||
"bashrc": "Den verwalteten ProxMenux-Bash-Prompt und die Aliase installieren und sicher migrieren, wobei der kurze/vollständige Stil des Arbeitsverzeichnisses beibehalten oder ausgewählt wird.",
|
||||
"log2ramAuto": "Log2RAM mit automatisch an den Host-RAM angepasster Größe installieren (128M/256M/512M); die SSD/M.2-Erkennung überspringt rotierende Festplatten.",
|
||||
"log2ramAuto": "Bei einer Neuinstallation die Größe von Log2RAM am RAM des Hosts ausrichten und nachfragen, wenn der Speicher nicht als SSD erkannt wird. Aktualisierungen behalten die eingestellte Größe bei.",
|
||||
"zfsAutotrim": "ZFS-Autotrim auf erkannten Pools aktivieren und nur die von ProxMenux geänderten Pools erfassen.",
|
||||
"persistentNetwork": "NIC-Namen über systemd-.link-Dateien an MAC-Adressen binden, damit Kernel-Updates die Schnittstellennamen nicht vertauschen.",
|
||||
"kexec": "kexec-tools installieren und ein Tastenkürzel Strg+Alt+K + systemd-Unit für schnelle Neustarts ohne BIOS/POST hinzufügen.",
|
||||
"amd": "AMD-EPYC/Ryzen-CPUs erkennen und Microcode + IOMMU + KVM-spezifische Kernel-Bootparameter anwenden.",
|
||||
"kexec": "kexec-tools installieren und eine systemd-Unit sowie den Alias reboot-quick für schnelle Neustarts ohne BIOS/POST einrichten.",
|
||||
"amd": "idle=nomwait und Optionen des KVM-Moduls auf AMD-EPYC/Ryzen-Hosts anwenden.",
|
||||
"openVSwitch": "OpenVSwitch für softwaredefinierte Netzwerke in VMs und Containern installieren.",
|
||||
"tcpBbr": "TCP Fast Open (Clients + Server) und BBR-Überlastkontrolle für bessere Latenz unter Last aktivieren.",
|
||||
"ceph": "Ceph (Client- + Serverpakete) für verteilten RBD/CephFS-Speicher installieren; Repository-Auswahl passend zu PVE 8/9.",
|
||||
@@ -2485,17 +2485,17 @@
|
||||
"zfsSnapshots": "zfs-auto-snapshot mit Cron-Zeitplänen für stündliche/tägliche/wöchentliche/monatliche Snapshots installieren.",
|
||||
"rpc": "rpcbind-Dienst/-Socket deaktivieren und dabei den genauen vorherigen systemd-Zustand für ein Rollback bewahren.",
|
||||
"pigz": "gzip durch pigz (parallele Implementierung) ersetzen, um die vzdump-Backup-Komprimierung zu beschleunigen.",
|
||||
"guestAgent": "Den Hypervisor des Hosts (qemu/vmware/hyperv/virtualbox) erkennen und den passenden Gastagenten installieren.",
|
||||
"guestAgent": "QEMU/KVM, VMware oder VirtualBox erkennen und den passenden Gast-Agenten installieren; andere Umgebungen werden übersprungen.",
|
||||
"vfio": "IOMMU aktivieren und VFIO-Module laden, um GPU/PCI-Passthrough an VMs zu ermöglichen.",
|
||||
"motd": "Das ProxMenux-MOTD-Banner hinzufügen und dabei den ursprünglichen Dateiinhalt oder das Fehlen der Datei für ein Rollback bewahren.",
|
||||
"subscriptionCustom": "Die Proxmox-Weboberfläche patchen, um den Dialog \"no valid subscription\" zu unterdrücken (Varianten für PVE 8 + 9 unterstützt).",
|
||||
"zram": "Ein optionales ZRAM-Swap-Profil mit einem Zehntel der RAM-Größe aktivieren.",
|
||||
"backupLimits": "Bandbreiten-/IO-Limits von vzdump aufheben, damit Backups mit dem tatsächlichen Durchsatz des Speichers laufen.",
|
||||
"backupLimits": "Die globalen vzdump-Standardwerte auf bwlimit: 0 und ionice: 5 setzen. Das garantiert keine schnelleren Backups.",
|
||||
"ovh": "Bei OVH gemietete Hardware per whois-Abfrage erkennen und OVH Real-Time Monitoring installieren (ohne Wirkung außerhalb von OVH).",
|
||||
"ha": "Den Proxmox-HA-Stack (pve-ha-lrm, pve-ha-crm, corosync) für Cluster-Failover aktivieren.",
|
||||
"fastfetch": "Das Systemübersichtstool Fastfetch mit dem ProxMenux-Logo + Statusblock als SSH-Anmeldebanner installieren.",
|
||||
"figurine": "Figurine (ASCII-Art-Banner mit dem Hostnamen) installieren und in die SSH-Anmeldung einbinden.",
|
||||
"log2ramCustom": "Log2RAM mit vom Benutzer gewählter RAM-Größe installieren; fragt vor der Anwendung nach Größe und SSD/M.2-Berücksichtigung.",
|
||||
"log2ramCustom": "Log2RAM mit gewählter Größe, Synchronisierungsintervall und optionaler automatischer Synchronisierung installieren. Aktualisierungen behalten Größe und Wahl der automatischen Synchronisierung bei.",
|
||||
"systemUtilities": "Ausgewählte Systemdienstprogramme installieren und nur die Pakete erfassen, die von ProxMenux neu hinzugefügt wurden."
|
||||
},
|
||||
"toolNames": {
|
||||
|
||||
@@ -2600,11 +2600,11 @@
|
||||
"aptIpv4": "Force APT to use IPv4 to avoid stalls on hosts with broken IPv6 connectivity.",
|
||||
"network": "Tune TCP buffers, somaxconn, IPv4 hardening and disable rp_filter on fw bridges (PVE 9 compatible).",
|
||||
"bashrc": "Install and safely migrate the managed ProxMenux Bash prompt and aliases while preserving or selecting the short/full working-directory style.",
|
||||
"log2ramAuto": "Install Log2RAM with size auto-tuned to host RAM (128M/256M/512M); SSD/M.2 detection skips on rotational disks.",
|
||||
"log2ramAuto": "Fresh installs size Log2RAM from host RAM and ask for confirmation if storage is not detected as SSD. Updates preserve the configured size.",
|
||||
"zfsAutotrim": "Enable ZFS autotrim on detected pools and record only pools changed by ProxMenux.",
|
||||
"persistentNetwork": "Pin NIC names to MAC addresses via systemd .link files so kernel updates don't shuffle interface names.",
|
||||
"kexec": "Install kexec-tools and add a Ctrl+Alt+K hotkey + systemd unit for fast reboots that skip BIOS/POST.",
|
||||
"amd": "Detect AMD EPYC/Ryzen CPUs and apply microcode + IOMMU + KVM-specific kernel boot params.",
|
||||
"kexec": "Install kexec-tools and prepare a systemd unit plus the reboot-quick alias for fast reboots that skip BIOS/POST.",
|
||||
"amd": "Apply idle=nomwait and KVM module options on AMD EPYC/Ryzen hosts.",
|
||||
"openVSwitch": "Install OpenVSwitch for software-defined networking inside VMs and containers.",
|
||||
"tcpBbr": "Enable TCP Fast Open (clients + server) and BBR congestion control for better latency under load.",
|
||||
"ceph": "Install Ceph (client + server packages) for distributed RBD/CephFS storage; PVE 8/9 aware repo selection.",
|
||||
@@ -2612,17 +2612,17 @@
|
||||
"zfsSnapshots": "Install zfs-auto-snapshot with cron schedules for hourly/daily/weekly/monthly snapshots.",
|
||||
"rpc": "Disable rpcbind service/socket while preserving their exact previous systemd state for rollback.",
|
||||
"pigz": "Replace gzip with pigz (parallel implementation) for faster vzdump backup compression.",
|
||||
"guestAgent": "Detect the host's hypervisor (qemu/vmware/hyperv/virtualbox) and install the matching guest agent.",
|
||||
"guestAgent": "Detect QEMU/KVM, VMware or VirtualBox and install the matching guest agent; skip other environments.",
|
||||
"vfio": "Enable IOMMU and load VFIO modules to allow GPU/PCI passthrough into VMs.",
|
||||
"motd": "Add the ProxMenux MOTD banner while preserving the original file contents or absence for rollback.",
|
||||
"subscriptionCustom": "Patch the Proxmox web UI to suppress the \"no valid subscription\" dialog (PVE 8 + 9 variants supported).",
|
||||
"zram": "Enable an opt-in ZRAM swap profile sized to one tenth of RAM.",
|
||||
"backupLimits": "Lift vzdump bandwidth/IO limits so backups run at the storage's real throughput.",
|
||||
"backupLimits": "Set global vzdump defaults to bwlimit: 0 and ionice: 5. This does not guarantee faster backups.",
|
||||
"ovh": "Detect OVH-rented hardware via whois lookup and install OVH Real-Time Monitoring (no-op on non-OVH).",
|
||||
"ha": "Enable the Proxmox HA stack (pve-ha-lrm, pve-ha-crm, corosync) for cluster failover.",
|
||||
"fastfetch": "Install Fastfetch system summary tool with the ProxMenux logo + status block as the SSH login banner.",
|
||||
"figurine": "Install Figurine (ASCII-art hostname banner) and wire it into the SSH login flow.",
|
||||
"log2ramCustom": "Install Log2RAM with user-chosen RAM size; prompts for size and SSD/M.2 awareness before applying.",
|
||||
"log2ramCustom": "Install Log2RAM with a chosen size, sync interval and optional autosync. Updates preserve the size and autosync choice.",
|
||||
"systemUtilities": "Install selected system utilities and track only packages that were newly added by ProxMenux."
|
||||
},
|
||||
"toolNames": {
|
||||
|
||||
@@ -2626,11 +2626,11 @@
|
||||
"aptIpv4": "Fuerza a APT a usar IPv4 para evitar bloqueos en hosts con conectividad IPv6 defectuosa.",
|
||||
"network": "Ajusta los buffers TCP, somaxconn y el endurecimiento de IPv4, y desactiva rp_filter en los puentes fw (compatible con PVE 9).",
|
||||
"bashrc": "Instala y migra de forma segura el prompt de Bash y los alias gestionados por ProxMenux, conservando o seleccionando el estilo corto/completo del directorio de trabajo.",
|
||||
"log2ramAuto": "Instala Log2RAM con un tamaño ajustado automáticamente a la RAM del host (128M/256M/512M); la detección de SSD/M.2 lo omite en discos rotacionales.",
|
||||
"log2ramAuto": "En una instalación nueva, ajusta el tamaño de Log2RAM a la RAM del host y pide confirmación si el almacenamiento no se detecta como SSD. Las actualizaciones conservan el tamaño configurado.",
|
||||
"zfsAutotrim": "Activa el autotrim de ZFS en los pools detectados y registra solo los pools modificados por ProxMenux.",
|
||||
"persistentNetwork": "Fija los nombres de las NIC a las direcciones MAC mediante archivos .link de systemd para que las actualizaciones del kernel no cambien los nombres de las interfaces.",
|
||||
"kexec": "Instala kexec-tools y añade un atajo Ctrl+Alt+K + una unidad de systemd para reinicios rápidos que omiten BIOS/POST.",
|
||||
"amd": "Detecta CPU AMD EPYC/Ryzen y aplica microcódigo + IOMMU + parámetros de arranque del kernel específicos de KVM.",
|
||||
"kexec": "Instala kexec-tools y prepara una unidad de systemd y el alias reboot-quick para reinicios rápidos que omiten BIOS/POST.",
|
||||
"amd": "Aplica idle=nomwait y opciones del módulo KVM en hosts AMD EPYC/Ryzen.",
|
||||
"openVSwitch": "Instala OpenVSwitch para redes definidas por software dentro de VM y contenedores.",
|
||||
"tcpBbr": "Activa TCP Fast Open (clientes + servidor) y el control de congestión BBR para mejorar la latencia bajo carga.",
|
||||
"ceph": "Instala Ceph (paquetes cliente + servidor) para almacenamiento distribuido RBD/CephFS; selección de repositorio adaptada a PVE 8/9.",
|
||||
@@ -2638,17 +2638,17 @@
|
||||
"zfsSnapshots": "Instala zfs-auto-snapshot con programaciones cron para snapshots horarios/diarios/semanales/mensuales.",
|
||||
"rpc": "Desactiva el servicio/socket rpcbind conservando su estado previo exacto de systemd para poder revertirlo.",
|
||||
"pigz": "Sustituye gzip por pigz (implementación paralela) para comprimir más rápido los backups de vzdump.",
|
||||
"guestAgent": "Detecta el hipervisor del host (qemu/vmware/hyperv/virtualbox) e instala el agente invitado correspondiente.",
|
||||
"guestAgent": "Detecta QEMU/KVM, VMware o VirtualBox e instala el agente invitado correspondiente; omite los demás entornos.",
|
||||
"vfio": "Activa IOMMU y carga los módulos VFIO para permitir el passthrough de GPU/PCI a las VM.",
|
||||
"motd": "Añade el banner MOTD de ProxMenux conservando el contenido original del archivo, o su ausencia, para poder revertirlo.",
|
||||
"subscriptionCustom": "Parchea la interfaz web de Proxmox para suprimir el diálogo \"no valid subscription\" (compatible con las variantes de PVE 8 y 9).",
|
||||
"zram": "Activa un perfil opcional de swap con ZRAM con un tamaño de una décima parte de la RAM.",
|
||||
"backupLimits": "Elimina los límites de ancho de banda/IO de vzdump para que los backups se ejecuten al rendimiento real del almacenamiento.",
|
||||
"backupLimits": "Establece los valores globales de vzdump bwlimit: 0 e ionice: 5. No garantiza backups más rápidos.",
|
||||
"ovh": "Detecta hardware alquilado a OVH mediante una consulta whois e instala OVH Real-Time Monitoring (no hace nada fuera de OVH).",
|
||||
"ha": "Activa la pila HA de Proxmox (pve-ha-lrm, pve-ha-crm, corosync) para la conmutación por error del clúster.",
|
||||
"fastfetch": "Instala la herramienta de resumen del sistema Fastfetch con el logo de ProxMenux + bloque de estado como banner de inicio de sesión SSH.",
|
||||
"figurine": "Instala Figurine (banner ASCII con el nombre de host) y lo integra en el inicio de sesión SSH.",
|
||||
"log2ramCustom": "Instala Log2RAM con el tamaño de RAM que elija el usuario; pregunta el tamaño y tiene en cuenta SSD/M.2 antes de aplicarlo.",
|
||||
"log2ramCustom": "Instala Log2RAM con el tamaño, el intervalo de sincronización y la sincronización automática opcional que elijas. Las actualizaciones conservan el tamaño y la opción de sincronización automática.",
|
||||
"systemUtilities": "Instala las utilidades del sistema seleccionadas y registra solo los paquetes que ProxMenux ha añadido."
|
||||
},
|
||||
"toolNames": {
|
||||
|
||||
@@ -2473,11 +2473,11 @@
|
||||
"aptIpv4": "Forcer APT à utiliser IPv4 pour éviter les blocages sur les hôtes dont la connectivité IPv6 est défaillante.",
|
||||
"network": "Ajuster les tampons TCP, somaxconn et le durcissement IPv4, et désactiver rp_filter sur les ponts fw (compatible PVE 9).",
|
||||
"bashrc": "Installer et migrer en toute sécurité l'invite Bash et les alias gérés par ProxMenux, en conservant ou en choisissant le style court/complet du répertoire de travail.",
|
||||
"log2ramAuto": "Installer Log2RAM avec une taille ajustée automatiquement à la RAM de l'hôte (128M/256M/512M) ; la détection SSD/M.2 l'ignore sur les disques rotatifs.",
|
||||
"log2ramAuto": "Lors d’une nouvelle installation, dimensionner Log2RAM selon la RAM de l’hôte et demander confirmation si le stockage n’est pas détecté comme SSD. Les mises à jour conservent la taille configurée.",
|
||||
"zfsAutotrim": "Activer l'autotrim ZFS sur les pools détectés et n'enregistrer que les pools modifiés par ProxMenux.",
|
||||
"persistentNetwork": "Associer les noms des cartes réseau aux adresses MAC via des fichiers systemd .link pour que les mises à jour du noyau ne mélangent pas les noms d'interface.",
|
||||
"kexec": "Installer kexec-tools et ajouter un raccourci Ctrl+Alt+K + une unité systemd pour des redémarrages rapides qui évitent le BIOS/POST.",
|
||||
"amd": "Détecter les CPU AMD EPYC/Ryzen et appliquer le microcode + IOMMU + des paramètres de démarrage du noyau propres à KVM.",
|
||||
"kexec": "Installer kexec-tools et préparer une unité systemd ainsi que l’alias reboot-quick pour des redémarrages rapides qui évitent le BIOS/POST.",
|
||||
"amd": "Appliquer idle=nomwait et des options du module KVM sur les hôtes AMD EPYC/Ryzen.",
|
||||
"openVSwitch": "Installer OpenVSwitch pour la mise en réseau définie par logiciel dans les VM et les conteneurs.",
|
||||
"tcpBbr": "Activer TCP Fast Open (clients + serveur) et le contrôle de congestion BBR pour une meilleure latence sous charge.",
|
||||
"ceph": "Installer Ceph (paquets client + serveur) pour le stockage distribué RBD/CephFS ; sélection du référentiel adaptée à PVE 8/9.",
|
||||
@@ -2485,17 +2485,17 @@
|
||||
"zfsSnapshots": "Installer zfs-auto-snapshot avec des planifications cron pour des instantanés horaires/quotidiens/hebdomadaires/mensuels.",
|
||||
"rpc": "Désactiver le service/socket rpcbind en conservant leur état systemd précédent exact pour le retour arrière.",
|
||||
"pigz": "Remplacer gzip par pigz (implémentation parallèle) pour une compression plus rapide des sauvegardes vzdump.",
|
||||
"guestAgent": "Détecter l'hyperviseur de l'hôte (qemu/vmware/hyperv/virtualbox) et installer l'agent invité correspondant.",
|
||||
"guestAgent": "Détecter QEMU/KVM, VMware ou VirtualBox et installer l’agent invité correspondant ; ignorer les autres environnements.",
|
||||
"vfio": "Activer l'IOMMU et charger les modules VFIO pour permettre le passthrough GPU/PCI vers les VM.",
|
||||
"motd": "Ajouter la bannière MOTD de ProxMenux en conservant le contenu d'origine du fichier, ou son absence, pour le retour arrière.",
|
||||
"subscriptionCustom": "Patcher l'interface web de Proxmox pour supprimer la boîte de dialogue « no valid subscription » (variantes PVE 8 + 9 prises en charge).",
|
||||
"zram": "Activer un profil d'échange ZRAM facultatif dimensionné à un dixième de la RAM.",
|
||||
"backupLimits": "Lever les limites de bande passante/E/S de vzdump pour que les sauvegardes s'exécutent au débit réel du stockage.",
|
||||
"backupLimits": "Définir les valeurs globales de vzdump à bwlimit: 0 et ionice: 5. Cela ne garantit pas des sauvegardes plus rapides.",
|
||||
"ovh": "Détecter le matériel loué chez OVH via une recherche whois et installer OVH Real-Time Monitoring (sans effet hors OVH).",
|
||||
"ha": "Activer la pile HA de Proxmox (pve-ha-lrm, pve-ha-crm, corosync) pour le basculement du cluster.",
|
||||
"fastfetch": "Installer l'outil de résumé système Fastfetch avec le logo ProxMenux + un bloc d'état comme bannière de connexion SSH.",
|
||||
"figurine": "Installer Figurine (bannière ASCII-art du nom d'hôte) et l'intégrer au flux de connexion SSH.",
|
||||
"log2ramCustom": "Installer Log2RAM avec une taille de RAM choisie par l'utilisateur ; demande la taille et la prise en compte SSD/M.2 avant l'application.",
|
||||
"log2ramCustom": "Installer Log2RAM avec la taille, l’intervalle de synchronisation et la synchronisation automatique facultative de votre choix. Les mises à jour conservent la taille et le choix de synchronisation automatique.",
|
||||
"systemUtilities": "Installer les utilitaires système sélectionnés et ne suivre que les paquets nouvellement ajoutés par ProxMenux."
|
||||
},
|
||||
"toolNames": {
|
||||
|
||||
@@ -2473,11 +2473,11 @@
|
||||
"aptIpv4": "Forza APT a usare IPv4 per evitare blocchi sugli host con connettività IPv6 non funzionante.",
|
||||
"network": "Regola i buffer TCP, somaxconn, l'hardening IPv4 e disabilita rp_filter sui bridge fw (compatibile con PVE 9).",
|
||||
"bashrc": "Installa e migra in modo sicuro il prompt Bash e gli alias gestiti da ProxMenux, mantenendo o selezionando lo stile breve/completo della directory di lavoro.",
|
||||
"log2ramAuto": "Installa Log2RAM con dimensione regolata automaticamente in base alla RAM dell'host (128M/256M/512M); il rilevamento SSD/M.2 lo salta sui dischi rotazionali.",
|
||||
"log2ramAuto": "Alla prima installazione, dimensiona Log2RAM in base alla RAM dell'host e chiede conferma se il dispositivo di archiviazione non viene rilevato come SSD. Gli aggiornamenti mantengono la dimensione configurata.",
|
||||
"zfsAutotrim": "Abilita l'autotrim ZFS sui pool rilevati e registra solo i pool modificati da ProxMenux.",
|
||||
"persistentNetwork": "Associa i nomi delle NIC agli indirizzi MAC tramite file .link di systemd, così gli aggiornamenti del kernel non cambiano i nomi delle interfacce.",
|
||||
"kexec": "Installa kexec-tools e aggiunge una scorciatoia Ctrl+Alt+K + un'unità systemd per riavvii rapidi che saltano BIOS/POST.",
|
||||
"amd": "Rileva le CPU AMD EPYC/Ryzen e applica microcode + IOMMU + parametri di avvio del kernel specifici per KVM.",
|
||||
"kexec": "Installa kexec-tools e prepara un'unità systemd e l'alias reboot-quick per riavvii rapidi che saltano BIOS/POST.",
|
||||
"amd": "Applica idle=nomwait e opzioni del modulo KVM sugli host AMD EPYC/Ryzen.",
|
||||
"openVSwitch": "Installa OpenVSwitch per il networking software-defined all'interno di VM e container.",
|
||||
"tcpBbr": "Abilita TCP Fast Open (client + server) e il controllo della congestione BBR per una latenza migliore sotto carico.",
|
||||
"ceph": "Installa Ceph (pacchetti client + server) per lo storage distribuito RBD/CephFS; selezione del repository in base a PVE 8/9.",
|
||||
@@ -2485,17 +2485,17 @@
|
||||
"zfsSnapshots": "Installa zfs-auto-snapshot con pianificazioni cron per snapshot orari/giornalieri/settimanali/mensili.",
|
||||
"rpc": "Disabilita il servizio/socket rpcbind conservandone l'esatto stato systemd precedente per il rollback.",
|
||||
"pigz": "Sostituisce gzip con pigz (implementazione parallela) per una compressione più rapida dei backup vzdump.",
|
||||
"guestAgent": "Rileva l'hypervisor dell'host (qemu/vmware/hyperv/virtualbox) e installa il guest agent corrispondente.",
|
||||
"guestAgent": "Rileva QEMU/KVM, VMware o VirtualBox e installa il guest agent corrispondente; salta gli altri ambienti.",
|
||||
"vfio": "Abilita IOMMU e carica i moduli VFIO per consentire il passthrough di GPU/PCI nelle VM.",
|
||||
"motd": "Aggiunge il banner MOTD di ProxMenux conservando il contenuto originale del file, o la sua assenza, per il rollback.",
|
||||
"subscriptionCustom": "Applica una patch all'interfaccia web di Proxmox per eliminare la finestra \"no valid subscription\" (supporta le varianti PVE 8 + 9).",
|
||||
"zram": "Abilita un profilo swap ZRAM facoltativo dimensionato a un decimo della RAM.",
|
||||
"backupLimits": "Rimuove i limiti di banda/IO di vzdump affinché i backup vengano eseguiti alla velocità reale dello storage.",
|
||||
"backupLimits": "Imposta i valori predefiniti globali di vzdump su bwlimit: 0 e ionice: 5. Questo non garantisce backup più veloci.",
|
||||
"ovh": "Rileva l'hardware noleggiato da OVH tramite whois e installa OVH Real-Time Monitoring (nessuna azione su sistemi non OVH).",
|
||||
"ha": "Abilita lo stack HA di Proxmox (pve-ha-lrm, pve-ha-crm, corosync) per il failover del cluster.",
|
||||
"fastfetch": "Installa lo strumento di riepilogo del sistema Fastfetch con il logo ProxMenux + un blocco di stato come banner di accesso SSH.",
|
||||
"figurine": "Installa Figurine (banner del nome host in ASCII art) e lo integra nel flusso di accesso SSH.",
|
||||
"log2ramCustom": "Installa Log2RAM con dimensione della RAM scelta dall'utente; chiede la dimensione e il rilevamento SSD/M.2 prima di applicarlo.",
|
||||
"log2ramCustom": "Installa Log2RAM con dimensione e intervallo di sincronizzazione a scelta e autosync facoltativo. Gli aggiornamenti mantengono la dimensione e la scelta sull'autosync.",
|
||||
"systemUtilities": "Installa le utilità di sistema selezionate e tiene traccia solo dei pacchetti aggiunti da ProxMenux."
|
||||
},
|
||||
"toolNames": {
|
||||
|
||||
@@ -2473,11 +2473,11 @@
|
||||
"aptIpv4": "Força o APT a utilizar IPv4 para evitar bloqueios em hosts com conectividade IPv6 defeituosa.",
|
||||
"network": "Ajusta os buffers TCP, o somaxconn e o reforço de segurança IPv4, e desativa o rp_filter nas bridges fw (compatível com PVE 9).",
|
||||
"bashrc": "Instala e migra com segurança o prompt Bash e os aliases geridos pelo ProxMenux, preservando ou selecionando o estilo de diretório de trabalho curto/completo.",
|
||||
"log2ramAuto": "Instala o Log2RAM com o tamanho ajustado automaticamente à RAM do host (128M/256M/512M); a deteção de SSD/M.2 omite-o em discos rotacionais.",
|
||||
"log2ramAuto": "Numa instalação nova, ajusta o tamanho do Log2RAM à RAM do host e pede confirmação se o armazenamento não for detetado como SSD. As atualizações mantêm o tamanho configurado.",
|
||||
"zfsAutotrim": "Ativa o autotrim do ZFS nos pools detetados e regista apenas os pools alterados pelo ProxMenux.",
|
||||
"persistentNetwork": "Fixa os nomes das NIC aos endereços MAC através de ficheiros .link do systemd, para que as atualizações do kernel não alterem os nomes das interfaces.",
|
||||
"kexec": "Instala o kexec-tools e adiciona um atalho Ctrl+Alt+K + unidade systemd para reinícios rápidos que ignoram a BIOS/POST.",
|
||||
"amd": "Deteta CPU AMD EPYC/Ryzen e aplica microcódigo + IOMMU + parâmetros de arranque do kernel específicos para KVM.",
|
||||
"kexec": "Instala o kexec-tools e prepara uma unidade systemd e o alias reboot-quick para reinícios rápidos que ignoram a BIOS/POST.",
|
||||
"amd": "Aplica idle=nomwait e opções do módulo KVM em hosts AMD EPYC/Ryzen.",
|
||||
"openVSwitch": "Instala o OpenVSwitch para redes definidas por software dentro de VM e contentores.",
|
||||
"tcpBbr": "Ativa o TCP Fast Open (clientes + servidor) e o controlo de congestionamento BBR para uma melhor latência sob carga.",
|
||||
"ceph": "Instala o Ceph (pacotes de cliente + servidor) para armazenamento distribuído RBD/CephFS; seleção de repositório adaptada ao PVE 8/9.",
|
||||
@@ -2485,17 +2485,17 @@
|
||||
"zfsSnapshots": "Instala o zfs-auto-snapshot com agendamentos cron para snapshots horários/diários/semanais/mensais.",
|
||||
"rpc": "Desativa o serviço/socket rpcbind, preservando o seu estado systemd anterior exato para a reversão.",
|
||||
"pigz": "Substitui o gzip pelo pigz (implementação paralela) para uma compressão mais rápida dos backups vzdump.",
|
||||
"guestAgent": "Deteta o hipervisor do host (qemu/vmware/hyperv/virtualbox) e instala o guest agent correspondente.",
|
||||
"guestAgent": "Deteta QEMU/KVM, VMware ou VirtualBox e instala o agente convidado correspondente; ignora os restantes ambientes.",
|
||||
"vfio": "Ativa o IOMMU e carrega os módulos VFIO para permitir o passthrough de GPU/PCI para VM.",
|
||||
"motd": "Adiciona o banner MOTD do ProxMenux, preservando o conteúdo original do ficheiro ou a sua ausência para a reversão.",
|
||||
"subscriptionCustom": "Aplica um patch à interface web do Proxmox para suprimir o diálogo \"no valid subscription\" (variantes PVE 8 + 9 suportadas).",
|
||||
"zram": "Ativa um perfil opcional de swap ZRAM dimensionado para um décimo da RAM.",
|
||||
"backupLimits": "Remove os limites de largura de banda/IO do vzdump para que os backups sejam executados à velocidade real do armazenamento.",
|
||||
"backupLimits": "Define os valores globais do vzdump como bwlimit: 0 e ionice: 5. Não garante backups mais rápidos.",
|
||||
"ovh": "Deteta hardware alugado à OVH através de uma consulta whois e instala o OVH Real-Time Monitoring (não faz nada fora da OVH).",
|
||||
"ha": "Ativa a pilha de HA do Proxmox (pve-ha-lrm, pve-ha-crm, corosync) para failover do cluster.",
|
||||
"fastfetch": "Instala a ferramenta de resumo do sistema Fastfetch com o logótipo do ProxMenux + bloco de estado como banner de início de sessão SSH.",
|
||||
"figurine": "Instala o Figurine (banner de nome de anfitrião em arte ASCII) e integra-o no início de sessão SSH.",
|
||||
"log2ramCustom": "Instala o Log2RAM com o tamanho de RAM escolhido pelo utilizador; pergunta o tamanho e considera SSD/M.2 antes de aplicar.",
|
||||
"log2ramCustom": "Instala o Log2RAM com o tamanho, o intervalo de sincronização e a sincronização automática opcional escolhidos. As atualizações mantêm o tamanho e a escolha de sincronização automática.",
|
||||
"systemUtilities": "Instala os utilitários do sistema selecionados e regista apenas os pacotes adicionados de novo pelo ProxMenux."
|
||||
},
|
||||
"toolNames": {
|
||||
|
||||
@@ -2473,11 +2473,11 @@
|
||||
"aptIpv4": "Tvingar APT att använda IPv4 för att undvika avbrott på värdar med trasig IPv6-anslutning.",
|
||||
"network": "Justerar TCP-buffertar och somaxconn, härdar IPv4 och inaktiverar rp_filter på fw-bryggor (kompatibelt med PVE 9).",
|
||||
"bashrc": "Installerar och migrerar på ett säkert sätt den hanterade Bash-prompten och de alias som ProxMenux tillhandahåller, och behåller eller väljer kort/fullständig stil för arbetskatalogen.",
|
||||
"log2ramAuto": "Installerar Log2RAM med storlek automatiskt anpassad till värdens RAM (128M/256M/512M); identifieringen av SSD/M.2 hoppar över roterande diskar.",
|
||||
"log2ramAuto": "Vid en ny installation anpassas Log2RAM:s storlek efter värdens RAM, och du ombeds bekräfta om lagringen inte identifieras som SSD. Uppdateringar behåller den inställda storleken.",
|
||||
"zfsAutotrim": "Aktiverar ZFS autotrim på identifierade pooler och registrerar endast pooler som ändrats av ProxMenux.",
|
||||
"persistentNetwork": "Låser nätverkskortens namn till MAC-adresser via systemd .link-filer så att kärnuppdateringar inte blandar om gränssnittsnamnen.",
|
||||
"kexec": "Installerar kexec-tools och lägger till kortkommandot Ctrl+Alt+K + en systemd-enhet för snabba omstarter som hoppar över BIOS/POST.",
|
||||
"amd": "Identifierar AMD EPYC/Ryzen-processorer och tillämpar mikrokod + IOMMU + KVM-specifika startparametrar för kärnan.",
|
||||
"kexec": "Installerar kexec-tools och förbereder en systemd-enhet samt aliaset reboot-quick för snabba omstarter som hoppar över BIOS/POST.",
|
||||
"amd": "Tillämpar idle=nomwait och alternativ för KVM-modulen på AMD EPYC/Ryzen-värdar.",
|
||||
"openVSwitch": "Installerar OpenVSwitch för mjukvarudefinierade nätverk i VM:ar och containrar.",
|
||||
"tcpBbr": "Aktiverar TCP Fast Open (klienter + server) och BBR-överbelastningskontroll för bättre latens under belastning.",
|
||||
"ceph": "Installerar Ceph (klient- och serverpaket) för distribuerad RBD/CephFS-lagring; val av arkiv anpassat för PVE 8/9.",
|
||||
@@ -2485,17 +2485,17 @@
|
||||
"zfsSnapshots": "Installerar zfs-auto-snapshot med cron-scheman för ögonblicksbilder varje timme/dag/vecka/månad.",
|
||||
"rpc": "Inaktiverar tjänsten/socketen rpcbind och bevarar deras exakta tidigare systemd-tillstånd för återställning.",
|
||||
"pigz": "Ersätter gzip med pigz (parallell implementering) för snabbare komprimering av vzdump-säkerhetskopior.",
|
||||
"guestAgent": "Identifierar värdens hypervisor (qemu/vmware/hyperv/virtualbox) och installerar motsvarande gästagent.",
|
||||
"guestAgent": "Identifierar QEMU/KVM, VMware eller VirtualBox och installerar motsvarande gästagent; andra miljöer hoppas över.",
|
||||
"vfio": "Aktiverar IOMMU och läser in VFIO-moduler för att möjliggöra GPU/PCI-passthrough till VM:ar.",
|
||||
"motd": "Lägger till ProxMenux MOTD-banner och bevarar originalfilens innehåll, eller att den saknades, för återställning.",
|
||||
"subscriptionCustom": "Patchar Proxmox webbgränssnitt för att dölja dialogen \"no valid subscription\" (varianter för PVE 8 + 9 stöds).",
|
||||
"zram": "Aktiverar en valfri ZRAM-swapprofil med en storlek på en tiondel av RAM.",
|
||||
"backupLimits": "Tar bort bandbredds-/IO-gränserna för vzdump så att säkerhetskopior körs med lagringens verkliga genomströmning.",
|
||||
"backupLimits": "Ställer in globala vzdump-standardvärden på bwlimit: 0 och ionice: 5. Det garanterar inte snabbare backuper.",
|
||||
"ovh": "Identifierar hårdvara som hyrs från OVH via en whois-sökning och installerar OVH Real-Time Monitoring (gör inget på annan hårdvara än OVH).",
|
||||
"ha": "Aktiverar Proxmox HA-stacken (pve-ha-lrm, pve-ha-crm, corosync) för failover i klustret.",
|
||||
"fastfetch": "Installerar systemsammanfattningsverktyget Fastfetch med ProxMenux-logotypen + statusblock som inloggningsbanner för SSH.",
|
||||
"figurine": "Installerar Figurine (värdnamnsbanner i ASCII-konst) och kopplar in det i SSH-inloggningen.",
|
||||
"log2ramCustom": "Installerar Log2RAM med en RAM-storlek som användaren väljer; frågar efter storlek och om SSD/M.2 innan det tillämpas.",
|
||||
"log2ramCustom": "Installerar Log2RAM med vald storlek, synkroniseringsintervall och valfri automatisk synkronisering. Uppdateringar behåller storleken och valet av automatisk synkronisering.",
|
||||
"systemUtilities": "Installerar valda systemverktyg och spårar endast paket som lagts till nya av ProxMenux."
|
||||
},
|
||||
"toolNames": {
|
||||
|
||||
@@ -1104,7 +1104,7 @@ install_log2ram_auto() {
|
||||
local existing_log2ram_bin=""
|
||||
pmx_journal_context "install_log2ram_auto" "$FUNC_VERSION"
|
||||
|
||||
# description: Install Log2RAM with size auto-tuned to host RAM (128M/256M/512M); SSD/M.2 detection skips on rotational disks.
|
||||
# description: Fresh installs size Log2RAM from host RAM and ask for confirmation if storage is not detected as SSD. Updates preserve the configured size.
|
||||
|
||||
existing_log2ram_bin="$(command -v log2ram 2>/dev/null || true)"
|
||||
if [[ -f /etc/log2ram.conf || -n "$existing_log2ram_bin" \
|
||||
|
||||
@@ -187,7 +187,7 @@ $(translate "Do you want to continue anyway?")" 13 70
|
||||
enable_kexec() {
|
||||
local FUNC_VERSION="1.1"
|
||||
pmx_journal_context "enable_kexec" "$FUNC_VERSION"
|
||||
# description: Install kexec-tools and add a Ctrl+Alt+K hotkey + systemd unit for fast reboots that skip BIOS/POST.
|
||||
# description: Install kexec-tools and prepare a systemd unit plus the reboot-quick alias for fast reboots that skip BIOS/POST.
|
||||
msg_info2 "$(translate "Configuring kexec for quick reboots...")"
|
||||
NECESSARY_REBOOT=1
|
||||
|
||||
@@ -695,7 +695,7 @@ configure_time_sync() {
|
||||
apply_amd_fixes() {
|
||||
local FUNC_VERSION="1.0"
|
||||
pmx_journal_context "apply_amd_fixes" "$FUNC_VERSION"
|
||||
# description: Detect AMD EPYC/Ryzen CPUs and apply microcode + IOMMU + KVM-specific kernel boot params.
|
||||
# description: Apply idle=nomwait and KVM module options on AMD EPYC/Ryzen hosts.
|
||||
msg_info2 "$(translate "Detecting AMD CPU and applying fixes if necessary...")"
|
||||
NECESSARY_REBOOT=1
|
||||
|
||||
@@ -1812,7 +1812,7 @@ EOF
|
||||
|
||||
install_guest_agent() {
|
||||
local FUNC_VERSION="1.0"
|
||||
# description: Detect the host's hypervisor (qemu/vmware/hyperv/virtualbox) and install the matching guest agent.
|
||||
# description: Detect QEMU/KVM, VMware or VirtualBox and install the matching guest agent; skip other environments.
|
||||
msg_info2 "$(translate "Detecting virtualization and installing guest agent...")"
|
||||
NECESSARY_REBOOT=1
|
||||
|
||||
@@ -2730,7 +2730,7 @@ configure_zram_swap() {
|
||||
optimize_vzdump() {
|
||||
local FUNC_VERSION="1.0"
|
||||
pmx_journal_context "optimize_vzdump" "$FUNC_VERSION"
|
||||
# description: Lift vzdump bandwidth/IO limits so backups run at the storage's real throughput.
|
||||
# description: Set global vzdump defaults to bwlimit: 0 and ionice: 5. This does not guarantee faster backups.
|
||||
msg_info2 "$(translate "Optimizing vzdump backup speed...")"
|
||||
|
||||
local vzdump_conf="/etc/vzdump.conf"
|
||||
@@ -3411,7 +3411,7 @@ configure_log2ram() {
|
||||
local FUNC_VERSION="1.8"
|
||||
local existing_log2ram_bin=""
|
||||
pmx_journal_context "configure_log2ram" "$FUNC_VERSION"
|
||||
# description: Install Log2RAM with user-chosen RAM size; prompts for size and SSD/M.2 awareness before applying.
|
||||
# description: Install Log2RAM with a chosen size, sync interval and optional autosync. Updates preserve the size and autosync choice.
|
||||
|
||||
existing_log2ram_bin="$(command -v log2ram 2>/dev/null || true)"
|
||||
if [[ -f /etc/log2ram.conf || -n "$existing_log2ram_bin" \
|
||||
|
||||
Reference in New Issue
Block a user