[PR #247] [MERGED] Fix GetTaskExitStatus success criteria #337

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

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/247
Author: @jonglezb
Created: 3/21/2023
Status: Merged
Merged: 3/28/2023
Merged by: @mleone87

Base: masterHead: fix_success_warning


📝 Commits (1)

  • e79247d Fix GetTaskExitStatus success criteria

📊 Changes

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

View changed files

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

📄 Description

GetTaskExitStatus considers any exitstatus other than "OK" as an error. But the Proxmox API can return "WARNINGS: XXX" in the some cases. This should be considered a success as well.

This bug causes the Terraform provider to try to start the VM three times, and then to return an error because all attempts apparently "fail" (but the VM is actually correctly started).

Example output when starting a VM:

POST /api2/json/nodes/dahu-2/qemu/100/status/start
GET /api2/json/nodes/dahu-2/tasks/UPID:dahu-2:00007323:001036A5:6419CAF8:qmstart:100:root@pam:/status
{"data":{"id":"100","pid":29475,"status":"stopped","type":"qmstart","pstart":1062565,"exitstatus":"WARNINGS: 1","upid":"UPID:dahu-2:00007323:001036A5:6419CAF8:qmstart:100:root@pam:","starttime":1679411960,"user":"root@pam","node":"dahu-2"}}

The exit status is "WARNINGS: 1", not "OK", but the operation still worked.

The corresponding warning in the web interface is:

WARN: no efidisk configured! Using temporary efivars disk.
TASK WARNINGS: 1

🔄 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/247 **Author:** [@jonglezb](https://github.com/jonglezb) **Created:** 3/21/2023 **Status:** ✅ Merged **Merged:** 3/28/2023 **Merged by:** [@mleone87](https://github.com/mleone87) **Base:** `master` ← **Head:** `fix_success_warning` --- ### 📝 Commits (1) - [`e79247d`](https://github.com/Telmate/proxmox-api-go/commit/e79247d189085f2e20426a85a9748701b1816129) Fix GetTaskExitStatus success criteria ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `proxmox/client.go` (+2 -1) </details> ### 📄 Description GetTaskExitStatus considers any exitstatus other than "OK" as an error. But the Proxmox API can return "WARNINGS: XXX" in the some cases. This should be considered a success as well. This bug causes the Terraform provider to try to start the VM three times, and then to return an error because all attempts apparently "fail" (but the VM is actually correctly started). Example output when starting a VM: POST /api2/json/nodes/dahu-2/qemu/100/status/start GET /api2/json/nodes/dahu-2/tasks/UPID:dahu-2:00007323:001036A5:6419CAF8:qmstart:100:root@pam:/status {"data":{"id":"100","pid":29475,"status":"stopped","type":"qmstart","pstart":1062565,"exitstatus":"WARNINGS: 1","upid":"UPID:dahu-2:00007323:001036A5:6419CAF8:qmstart:100:root@pam:","starttime":1679411960,"user":"root@pam","node":"dahu-2"}} The exit status is "WARNINGS: 1", not "OK", but the operation still worked. The corresponding warning in the web interface is: WARN: no efidisk configured! Using temporary efivars disk. TASK WARNINGS: 1 --- <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:49 +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#337
No description provided.