[PR #2128] [MERGED] [core]: Enhance LXC template handling and improve error recovery #3438

Closed
opened 2025-11-20 06:04:48 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/2128
Author: @MickLesk
Created: 2/7/2025
Status: Merged
Merged: 2/7/2025
Merged by: @michelroegl-brunner

Base: mainHead: MickLesk-patch-1


📝 Commits (4)

  • 73c6335 [core]: Enhance LXC template handling and improve error recovery
  • ec26556 merge from dev
  • aad8833 fix spinner
  • 93162ee Update create_lxc.sh

📊 Changes

1 file changed (+25 additions, -12 deletions)

View changed files

📝 ct/create_lxc.sh (+25 -12)

📄 Description

✍️ Description

Improves robustness by automatically deleting and re-downloading corrupted LXC templates when container creation fails. Ensures all msg_info logs have corresponding msg_ok messages for consistency. Also adds validation for subuid and subgid to prevent permission issues.

Currently affected 1344 of 7354 failed installations.

image
image
image

now breaking an template (truncate file hard, lol ):

truncate -s 500K /var/lib/vz/template/cache/ubuntu-24.10-standard_24.10-1_amd64.tar.zst

Now create an new LXC, you see on bottom you get an issue in pct create, after this the Re-Download runs.

image

Prerequisites

The following steps must be completed for the pull request to be considered:

  • Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.)
  • Testing performed (I have thoroughly tested my changes and verified expected functionality.)

🛠️ Type of Change

Please check the relevant options:

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change unexpectedly)

🔄 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/2128 **Author:** [@MickLesk](https://github.com/MickLesk) **Created:** 2/7/2025 **Status:** ✅ Merged **Merged:** 2/7/2025 **Merged by:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Base:** `main` ← **Head:** `MickLesk-patch-1` --- ### 📝 Commits (4) - [`73c6335`](https://github.com/community-scripts/ProxmoxVE/commit/73c63357ebc8a6865a3cb0c66db74efc524c690e) [core]: Enhance LXC template handling and improve error recovery - [`ec26556`](https://github.com/community-scripts/ProxmoxVE/commit/ec26556f76b88da014b0ca89f3eb72248e59e263) merge from dev - [`aad8833`](https://github.com/community-scripts/ProxmoxVE/commit/aad8833573a7d9756eaa5bfa56fa6b23ea64d73c) fix spinner - [`93162ee`](https://github.com/community-scripts/ProxmoxVE/commit/93162ee3c855712b25fea3f281bdea04b2f0fdfd) Update create_lxc.sh ### 📊 Changes **1 file changed** (+25 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `ct/create_lxc.sh` (+25 -12) </details> ### 📄 Description ## ✍️ Description Improves robustness by automatically deleting and **re-downloading corrupted LXC** templates when container creation fails. Ensures all _msg_info_ logs have corresponding _msg_ok_ messages for consistency. Also adds validation for _subuid_ and _subgid_ to prevent permission issues. Currently affected 1344 of 7354 failed installations. ![image](https://github.com/user-attachments/assets/d7f34923-791c-45f6-8726-a00e3749c674) ![image](https://github.com/user-attachments/assets/e9881caf-a6f7-4802-8878-9abefc19967c) ![image](https://github.com/user-attachments/assets/9f040503-145c-482b-abe9-89424d8ca695) now breaking an template (truncate file hard, lol ): ```bash truncate -s 500K /var/lib/vz/template/cache/ubuntu-24.10-standard_24.10-1_amd64.tar.zst ``` Now create an new LXC, you see on bottom you get an issue in pct create, after this the Re-Download runs. ![image](https://github.com/user-attachments/assets/39a6d164-e50e-4a23-ba93-936a0217e80a) ## ✅ Prerequisites The following steps must be completed for the pull request to be considered: - [x] Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.) - [x] Testing performed (I have thoroughly tested my changes and verified expected functionality.) ## 🛠️ Type of Change Please check the relevant options: - [x] Bug fix (non-breaking change that resolves an issue) - [x] New feature (non-breaking change that adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change unexpectedly) --- <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 06:04:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#3438