[PR #6142] [MERGED] [core]: Improved LXC Container Startup Handling #6396

Open
opened 2025-11-20 07:10:26 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/6142
Author: @MickLesk
Created: 7/22/2025
Status: Merged
Merged: 7/22/2025
Merged by: @tremor021

Base: mainHead: build_func_dns_precheck


📝 Commits (2)

  • 02f8f09 [core]: Improved LXC Container Startup Handling
  • b87ea8d Update build.func

📊 Changes

1 file changed (+48 additions, -3 deletions)

View changed files

📝 misc/build.func (+48 -3)

📄 Description

✍️ Description

  • Added status verification after start:
    After pct start, the script now loops until the container reports status: running, with a timeout and clear error handling.

  • Added network availability check (non-Alpine only):
    Waits for network connectivity inside the container by pinging deb.debian.org.

    • Logs warnings during retries.
    • Prompts to set fallback DNS (1.1.1.1/8.8.8.8) if the network is still unreachable.
    • Aborts with a clear error if network remains unavailable.

Benefits

  • More reliable container startup sequence.
  • Proactive detection of startup or networking issues.
  • Clear feedback and safe fallback options before proceeding with customization.

Link: #6081

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/6142 **Author:** [@MickLesk](https://github.com/MickLesk) **Created:** 7/22/2025 **Status:** ✅ Merged **Merged:** 7/22/2025 **Merged by:** [@tremor021](https://github.com/tremor021) **Base:** `main` ← **Head:** `build_func_dns_precheck` --- ### 📝 Commits (2) - [`02f8f09`](https://github.com/community-scripts/ProxmoxVE/commit/02f8f09c63ac140e9abe3591b00c76384bb696e4) [core]: Improved LXC Container Startup Handling - [`b87ea8d`](https://github.com/community-scripts/ProxmoxVE/commit/b87ea8d5358fcf200eb8813477ca2fbf6ab99db7) Update build.func ### 📊 Changes **1 file changed** (+48 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `misc/build.func` (+48 -3) </details> ### 📄 Description ## ✍️ Description - ✅ **Added status verification after start:** After `pct start`, the script now loops until the container reports `status: running`, with a timeout and clear error handling. - ✅ **Added network availability check (non-Alpine only):** Waits for network connectivity inside the container by pinging `deb.debian.org`. - Logs warnings during retries. - Prompts to set fallback DNS (`1.1.1.1`/`8.8.8.8`) if the network is still unreachable. - Aborts with a clear error if network remains unavailable. ## ✨ Benefits - More reliable container startup sequence. - Proactive detection of startup or networking issues. - Clear feedback and safe fallback options before proceeding with customization. ## 🔗 Related PR / Issue Link: #6081 ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. - [x] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [ ] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [x] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 07:10:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#6396