[PR #57] [MERGED] fixes for agent exec #111

Closed
opened 2026-03-03 15:30:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/luthermonson/go-proxmox/pull/57
Author: @boyvinall
Created: 4/13/2023
Status: Merged
Merged: 4/15/2023
Merged by: @luthermonson

Base: mainHead: agent-exec


📝 Commits (1)

📊 Changes

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

View changed files

📝 virtual_machine.go (+32 -25)

📄 Description

Hi, I'm new to proxmox, so was just nosing through the source code to get a feel for some things. Spotted a couple of likely issues, but I've not verified them. Hope this might help.

  • WaitForAgentExecExit would never timeout because time.After was evaluated on each iteration of the loop
  • WaitForAgentExecExit could also cause a very busy spin on the client machine, bad if the exec took a while to complete
  • I think AgentExec probably isn't returning the pid properly anyway?
  • couple other related minor style improvements

🔄 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/luthermonson/go-proxmox/pull/57 **Author:** [@boyvinall](https://github.com/boyvinall) **Created:** 4/13/2023 **Status:** ✅ Merged **Merged:** 4/15/2023 **Merged by:** [@luthermonson](https://github.com/luthermonson) **Base:** `main` ← **Head:** `agent-exec` --- ### 📝 Commits (1) - [`743d9fd`](https://github.com/luthermonson/go-proxmox/commit/743d9fd5ad7d6b58955465d092905dffb4b2b6a4) fixes for agent exec ### 📊 Changes **1 file changed** (+32 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `virtual_machine.go` (+32 -25) </details> ### 📄 Description Hi, I'm new to proxmox, so was just nosing through the source code to get a feel for some things. Spotted a couple of likely issues, but I've not verified them. Hope this might help. - `WaitForAgentExecExit` would never timeout because time.After was evaluated on each iteration of the loop - `WaitForAgentExecExit` could also cause a very busy spin on the client machine, bad if the exec took a while to complete - I think `AgentExec` probably isn't returning the pid properly anyway? - couple other related minor style improvements --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 15:30:15 +03:00
Sign in to join this conversation.
No labels
pull-request
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/go-proxmox#111
No description provided.