Conversation
tis24dev
commented
Jan 22, 2026
- Translate comments and docs from Italian to English
- Improve network rollback handling and reporting
- Improve network rollback handling and logging
- Add prompt countdowns and improve network restore safety
- Add network rollback countdown and abort info display
- Normalize cloud log path handling in CloudStorage
- Clarify cloud path formats and network rollback status
- Refine cluster detection and BACKUP_CLUSTER_CONFIG behavior
- Handle non-root and ignorable errors in datastore ownership
- Improve rclone cloud scan timeout handling and docs
Updated code comments, documentation, and user-facing strings from Italian to English across multiple files for improved accessibility and consistency. No functional changes were made to the code.
Refactors network rollback logic to keep rollback armed if not committed, and updates error reporting to indicate whether rollback is still armed or has executed. Also enhances logging in the restore workflow to clarify the rollback state and current IP address. This provides clearer diagnostics and safer handling of uncommitted network changes.
Enhances network rollback logic to better detect if rollback is already running and prevents late commits. Refactors rollback disarm to only stop the timer, adds detailed logging and state checks to the rollback script, and improves error handling for network reload commands.
Introduces visible 90-second countdowns for critical prompts (network apply and smart /etc/fstab merge) to prevent hangs in automated/remote scenarios, defaulting to safe actions if unanswered. Refactors network rollback logic for better diagnostics and logging, adds new helper functions for input abort detection, and improves error handling throughout the restore workflow to support user-initiated aborts. Updates documentation to reflect new prompt timeout behavior and smart merge safety features.
Implements a countdown display for network rollback when a restore is aborted, providing detailed status and IP information to the user. Adds extraction of original IP from network snapshots, extends error and abort info structures to include rollback marker and deadline, and ensures abort info is available for display after restore aborts. Also improves logging and messaging for network rollback events.
Introduces the cloudLogBase helper to consistently normalize cloud log paths, ensuring remote prefixes are applied when needed. Updates countLogFiles and deleteAssociatedLog to use the normalized path, and adds tests to verify correct behavior when CloudLogPath is specified without a remote.
Improved documentation for cloud storage configuration, recommending consistent path-only formats for remote and log paths. Added detailed explanations and examples for network rollback status in restore guide and troubleshooting, including footer output and reconnection instructions after SSH/IP changes.
Improves cluster detection logic to require both multiple node directories and a valid corosync config, preventing false positives on standalone nodes. BACKUP_CLUSTER_CONFIG now controls both cluster config and runtime command collection (pvecm status/nodes, HA status). Documentation and tests updated to clarify and verify the new behavior.
Updated setDatastoreOwnership to skip chown/chmod operations when running as non-root and to treat EPERM, EACCES, and EROFS errors as non-fatal. This improves robustness in CI/test environments and on restricted filesystems by logging warnings and continuing execution.
Cloud restore/decrypt workflows now use RCLONE_TIMEOUT_CONNECTION to cap scan duration, with improved error messages and debug logging for timeouts. Documentation and config templates have been updated to clarify the timeout's role in cloud scanning, and troubleshooting steps for slow remotes or large directories are provided.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fafdf5d71d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case err := <-errCh: | ||
| fmt.Fprintln(os.Stderr) | ||
| if errors.Is(err, context.DeadlineExceeded) { | ||
| logging.DebugStep(logger, "prompt yes/no", "Input timed out: proceeding with No") | ||
| logger.Info("No response within %ds; proceeding with No.", int(timeout.Seconds())) |
There was a problem hiding this comment.
Treat ErrInputAborted as timeout in countdown prompt
promptYesNoWithCountdown runs input.ReadLineWithContext with a deadline; that helper returns ErrInputAborted when the context deadline expires. The errCh handler only checks context.DeadlineExceeded, so on timeout the error can bubble up as ErrInputAborted and upstream input.IsAborted treats it as a user abort. In non-interactive runs this causes the restore to abort instead of auto-skipping when the countdown hits zero. Consider handling ErrInputAborted (or input.IsAborted) here as the timeout case and returning false, nil.
Useful? React with 👍 / 👎.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |