[PR #80] [CLOSED] Fixed issue when parsing mountpoints from received from Proxmox API #213

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

📋 Pull Request Information

Original PR: https://github.com/Telmate/proxmox-api-go/pull/80
Author: @johnknott
Created: 7/10/2020
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • f176a2e Fixed issue when parsing mountpoints from received from Proxmox API

📊 Changes

1 file changed (+8 additions, -9 deletions)

View changed files

📝 proxmox/config_lxc.go (+8 -9)

📄 Description

This was causing problems when creating LXC containers with mountpoints in the Terraform Provider.

https://github.com/Telmate/terraform-provider-proxmox/issues/157

mpConfMap.readDeviceConfig expects a list of strings of the form ["key1=value","key2=value"]
But when parsing the mountpoints it was sent a list like ["/mnt/pve/storage-box","mp=/mnt/something"]
Note the missing '=' in the first entry, which cause an entry in the confMap with an empty string as a key and nil as a value. So I rejigged this a bit, and also included the 'volume' key.

This was previously causing an 'Error writing fields: Invalid address to set: []string{"mountpoint", "3317302270", ""}' in the Terraform Provider. when creating an LXC resource with mountpoints. The resource would be created but state wouldn't not be written.


🔄 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/80 **Author:** [@johnknott](https://github.com/johnknott) **Created:** 7/10/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`f176a2e`](https://github.com/Telmate/proxmox-api-go/commit/f176a2e6db4b72f42f80a2dbd847113b05c52543) Fixed issue when parsing mountpoints from received from Proxmox API ### 📊 Changes **1 file changed** (+8 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `proxmox/config_lxc.go` (+8 -9) </details> ### 📄 Description This was causing problems when creating LXC containers with mountpoints in the Terraform Provider. https://github.com/Telmate/terraform-provider-proxmox/issues/157 mpConfMap.readDeviceConfig expects a list of strings of the form ["key1=value","key2=value"] But when parsing the mountpoints it was sent a list like ["/mnt/pve/storage-box","mp=/mnt/something"] Note the missing '=' in the first entry, which cause an entry in the confMap with an empty string as a key and nil as a value. So I rejigged this a bit, and also included the 'volume' key. This was previously causing an 'Error writing fields: Invalid address to set: []string{"mountpoint", "3317302270", ""}' in the Terraform Provider. when creating an LXC resource with mountpoints. The resource would be created but state wouldn't not be written. --- <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:14 +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#213
No description provided.