From 0253b226a4c7ee1a7b52c45ac4f3cc1dc01b3275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C4=83rcziem=20=E2=84=A2?= <118485377+spalencsar@users.noreply.github.com> Date: Fri, 3 Oct 2025 13:06:52 +0200 Subject: [PATCH] docs: Update README.md and CHANGELOG.md for v2.1.1 - Update version to v2.1.1 in README.md - Add new features section for v2.1.1 including Docker auto-repair, NFS fixes, Netdata updates - Update CHANGELOG.md with detailed fixes and improvements - Update service descriptions to reflect optional nature of services - Add Docker repair script to directory structure and troubleshooting - Document new auto-repair functionality and optional unattended-upgrades --- CHANGELOG.md | 38 +++++++++++++++++++++++++++++++++++--- README.md | 52 +++++++++++++++++++++++++++++++++++++++++++--------- setup.sh | 17 +++++++++++++++++ 3 files changed, 95 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c81443..f69e2ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Performance tuning (live-restore, userland-proxy=false) - Resource limits and metrics endpoint configuration +- **Docker Auto-Repair Functionality** + - Automatic daemon.json validation and JSON syntax checking + - Intelligent retry logic for Docker installation failures + - Standalone repair script (`scripts/repair_docker.sh`) for troubleshooting + - User group management with fallback detection (ADMIN_USER > NEW_USER > auto-detect) + +- **Robust Error Recovery Mechanisms** + - NFS export deduplication to prevent duplicate entries + - Netdata installation via official Packagecloud repositories (replacing broken kickstart.sh) + - I/O scheduler path validation with automatic disk detection + - Optional unattended-upgrades (disabled by default for user control) + - **Enhanced Security Documentation** - New SECURITY.md with comprehensive security policy - Updated security features documentation @@ -42,16 +54,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Version Update**: Bumped to v2.1.1 for enhanced distribution detection - **Documentation Updates**: Comprehensive README, CHANGELOG, and SECURITY updates - **Code Organization**: Better separation of detection logic in lib/detection.sh +- **Unattended Upgrades**: Now optional (ENABLE_AUTO_UPDATES=false by default) #### Fixed -- **Distribution Compatibility**: Improved detection reliability across all supported distributions -- **Container Environment Handling**: Better warnings and compatibility checks -- **Version Parsing**: More robust version comparison and normalization +- **Docker Installation Issues** + - Fixed unbound SUDO variable errors + - Resolved invalid daemon.json generation + - Fixed user creation failures with proper group management + - Added auto-repair for Docker daemon start failures + +- **NFS Configuration** + - Prevented duplicate export entries causing exportfs errors + - Improved export management with clean function + +- **Netdata Installation** + - Replaced broken kickstart.sh URL with official Packagecloud repositories + - Ensured reliable installation across all distributions + +- **Performance Optimization** + - Added path validation for I/O scheduler configuration + - Fixed invalid scheduler path errors for root disks + +- **Distribution Compatibility** + - Improved detection reliability across all supported distributions + - Better container environment handling with user warnings #### Testing - **Unit Test Coverage**: 66+ comprehensive test cases with 98.5% success rate - **Distribution Testing**: Enhanced testing across Ubuntu, Debian, Fedora, Arch, openSUSE - **Container Testing**: Validation in Docker, Podman, LXC, and WSL environments +- **Error Recovery Testing**: Verified auto-repair functionality for Docker failures --- diff --git a/README.md b/README.md index cd24567..64141d1 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,21 @@ -# NAS Setup Script v2.1 +# NAS Setup Script v2.1.1 A fully automated script for setting up a professional Network Attached Storage (NAS) system with advanced security features and comprehensive service integration across multiple Linux distributions. -## πŸš€ New Features in v2.1 - 2025 Compatibility Update +## πŸš€ New Features in v2.1.1 - Distribution Detection Enhancement Release +- **Webmin Integration** for web-based system administration +- **Advanced Memory Optimization** with vm.swappiness and vfs_cache_pressure tuning +- **Enhanced Docker Configuration** with optimized daemon.json and log rotation +- **Docker Auto-Repair Functionality** with automatic daemon validation and restart +- **Robust Error Recovery** for Docker installation failures with retry logic +- **NFS Export Deduplication** to prevent duplicate export entries +- **Netdata Official Repositories** using Packagecloud instead of broken kickstart.sh +- **I/O Scheduler Path Validation** with automatic disk detection +- **Optional Unattended Upgrades** (disabled by default for user control) +- **Standalone Docker Repair Script** (`scripts/repair_docker.sh`) for troubleshooting + +### Previous v2.1 Features - **Full IPv6 Support** throughout the entire system - **Modern Distribution Support** (Ubuntu 24.04+, Fedora 41+, openSUSE 15.6+) - **Enhanced Security** with Ed25519 SSH keys, auditd logging, and MAC @@ -125,13 +137,14 @@ The script guides you through an interactive configuration: - **Gateway and DNS:** IPv4/IPv6 automatic detection with override capability ### Service Selection -- **Docker:** Container platform with Compose plugin (required for Vaultwarden, Jellyfin, Portainer) -- **NFS:** Network File System with IPv6 support -- **Netdata:** System monitoring -- **Vaultwarden:** Password manager with security hardening (requires Docker) -- **Jellyfin:** Media server with modern GPG keys (requires Docker) -- **Portainer:** Docker management with HTTPS (requires Docker) -- **Webmin:** Web-based system administration interface +- **Docker:** Container platform with Compose plugin and auto-repair functionality (required for Vaultwarden, Jellyfin, Portainer) +- **NFS:** Network File System with IPv6 support and export deduplication +- **Netdata:** System monitoring via official Packagecloud repositories +- **Vaultwarden:** Password manager with security hardening (requires Docker, optional) +- **Jellyfin:** Media server with modern GPG keys (requires Docker, optional) +- **Portainer:** Docker management with HTTPS (requires Docker, optional) +- **Webmin:** Web-based system administration interface (optional) +- **Unattended Upgrades:** Automatic security updates (optional, disabled by default) ### Security Configuration - **Firewall Rules:** IPv4/IPv6 automatic based on selected services @@ -144,6 +157,8 @@ The script guides you through an interactive configuration: ``` nas/ β”œβ”€β”€ setup.sh # Main installation script +β”œβ”€β”€ scripts/ +β”‚ └── repair_docker.sh # Docker repair and troubleshooting script β”œβ”€β”€ config/ β”‚ └── defaults.sh # Configuration variables and defaults β”œβ”€β”€ lib/ @@ -293,6 +308,25 @@ sudo netplan apply # Ubuntu/Debian sudo systemctl restart NetworkManager # Fedora/openSUSE ``` +#### Docker Issues +```bash +# Check Docker status +sudo systemctl status docker +sudo docker version + +# View Docker logs +sudo journalctl -u docker -f + +# Repair Docker configuration (new in v2.1.1) +sudo ./scripts/repair_docker.sh + +# Check daemon.json syntax +sudo docker daemon --validate-config + +# Restart Docker with validation +sudo systemctl restart docker +``` + #### Service Issues ```bash # Check service status diff --git a/setup.sh b/setup.sh index dcc9bef..a4e6cf0 100644 --- a/setup.sh +++ b/setup.sh @@ -502,6 +502,23 @@ show_installation_summary() { echo " βœ“ Webmin web interface: https://$(hostname -I | awk '{print $1}'):10000" fi + # Docker notes + if [[ "${INSTALL_DOCKER:-false}" != "true" ]]; then + echo + log_warning "Docker wurde nicht installiert oder wurde wΓ€hrend der Installation deaktiviert." + echo "If you need Docker later, repair the daemon and restart Docker with the helper script in the repository:" + echo " cd $(pwd) && sudo bash scripts/repair_docker.sh" + echo "Or create a minimal valid daemon.json and restart Docker manually:" + echo " sudo mv /etc/docker/daemon.json /tmp/daemon.json.broken.$(date +%s) || true" + echo " sudo tee /etc/docker/daemon.json > /dev/null <<'EOF'" + echo "{" + echo " \"storage-driver\": \"overlay2\"" + echo "}" + echo "EOF" + echo " sudo systemctl daemon-reload && sudo systemctl restart docker" + echo + fi + echo log_info "Next steps:" echo " 1. Reboot the system to ensure all changes take effect"