[PR #211] [MERGED] [fix] client.CreateTemplate must wait for completion of job #311

Closed
opened 2026-02-28 00:41:43 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/211
Author: @mizhka
Created: 10/24/2022
Status: Merged
Merged: 10/26/2022
Merged by: @mleone87

Base: masterHead: user/mizhka/long-convertion-fix


📝 Commits (1)

  • dc03063 [fix] client.CreateTemplate must wait for completion of job

📊 Changes

1 file changed (+16 additions, -1 deletions)

View changed files

📝 proxmox/client.go (+16 -1)

📄 Description

Before fix function client.CreateTemplate triggers creation of template instead of waiting of template creation. The patch adds wait for job completion.

The original problem is packer failures. Packer converts VM to template and set new name and description. As of now, client.CreateTemplate returns result immediately and Packer tries to set name. But VM is locked by template creation job. If template creation is longer than 10 seconds, then call to set name is timed out, Packer gets error and fails whole build.


🔄 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/Telmate/proxmox-api-go/pull/211 **Author:** [@mizhka](https://github.com/mizhka) **Created:** 10/24/2022 **Status:** ✅ Merged **Merged:** 10/26/2022 **Merged by:** [@mleone87](https://github.com/mleone87) **Base:** `master` ← **Head:** `user/mizhka/long-convertion-fix` --- ### 📝 Commits (1) - [`dc03063`](https://github.com/Telmate/proxmox-api-go/commit/dc0306366097735ee9bfcc68899357a0641ffd04) [fix] client.CreateTemplate must wait for completion of job ### 📊 Changes **1 file changed** (+16 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `proxmox/client.go` (+16 -1) </details> ### 📄 Description Before fix function client.CreateTemplate triggers creation of template instead of waiting of template creation. The patch adds wait for job completion. The original problem is packer failures. Packer converts VM to template and set new name and description. As of now, client.CreateTemplate returns result immediately and Packer tries to set name. But VM is locked by template creation job. If template creation is longer than 10 seconds, then call to set name is timed out, Packer gets error and fails whole build. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:41:43 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmox-api-go#311
No description provided.