From 082383a4dcab4e2f409e0acca31a6681ca51caca Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Thu, 11 Sep 2025 14:19:21 +0000 Subject: [PATCH] fix: increase storage API timeout from 15s to 30s (addresses #448) The 15-second timeout introduced to handle unavailable NFS storage was too aggressive and caused legitimate storage queries to timeout on nodes with many storage backends or higher latency. This was causing storage to not be displayed for affected nodes. Increased timeout to 30 seconds as a better balance between responsiveness and reliability. --- CHANGELOG_v4.15.0-rc.6.md | 48 +++++++++++++++++++++++++++++++++++++++ pkg/proxmox/client.go | 15 +++++++----- 2 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 CHANGELOG_v4.15.0-rc.6.md diff --git a/CHANGELOG_v4.15.0-rc.6.md b/CHANGELOG_v4.15.0-rc.6.md new file mode 100644 index 000000000..34065bd87 --- /dev/null +++ b/CHANGELOG_v4.15.0-rc.6.md @@ -0,0 +1,48 @@ +## Note for RC versions +This is a pre-release version for testing. Consider backing up your Pulse configuration before updating. + +## What's Changed + +### Improvements +- **Enhanced diagnostics export** - Now includes critical troubleshooting data: + - Backend diagnostics when available + - Node online/offline status + - Physical disks information + - ZFS pool health details + - Alert configuration + - Connection health metrics + - Helps identify issues like missing storage, timeout errors, and threshold save problems + +### Documentation +- Added GitHub issue templates with diagnostics export instructions +- Templates guide users to provide better information when reporting issues + +### Why this matters +This release significantly improves troubleshooting capabilities. The enhanced diagnostics export will help identify and resolve issues like: +- Storage only showing from one node (when others timeout) +- 504 errors when saving thresholds +- Missing physical disk information +- Alert configuration problems + +## Testing v4.15.0-rc.6 + +**Install script:** +```bash +curl -fsSL https://raw.githubusercontent.com/rcourtman/Pulse/main/install.sh | bash -s -- --version v4.15.0-rc.6 +``` + +**Docker:** +```bash +docker pull rcourtman/pulse:v4.15.0-rc.6 +docker run -d --name pulse -p 7655:7655 -v pulse-data:/etc/pulse rcourtman/pulse:v4.15.0-rc.6 +``` + +## How to provide feedback +If you're still experiencing issues after updating: +1. Go to Settings → Diagnostics tab +2. Click "Run Diagnostics" first +3. Then click "Export for GitHub" +4. Attach the exported file to your issue report + +## Downloads +Pre-built binaries available below for linux-amd64, linux-arm64, and linux-armv7. diff --git a/pkg/proxmox/client.go b/pkg/proxmox/client.go index 3ace011c9..0d166a3f4 100644 --- a/pkg/proxmox/client.go +++ b/pkg/proxmox/client.go @@ -559,10 +559,11 @@ func (c *Client) GetStorage(ctx context.Context, node string) ([]Storage, error) // Storage queries can take longer on large clusters or slow storage backends // Create a new context with shorter timeout for storage API calls // Storage endpoints can hang when NFS/network storage is unavailable + // Using 30s timeout as a balance between responsiveness and reliability storageCtx := ctx - if deadline, ok := ctx.Deadline(); !ok || time.Until(deadline) > 15*time.Second { + if deadline, ok := ctx.Deadline(); !ok || time.Until(deadline) > 30*time.Second { var cancel context.CancelFunc - storageCtx, cancel = context.WithTimeout(ctx, 15*time.Second) + storageCtx, cancel = context.WithTimeout(ctx, 30*time.Second) defer cancel() } @@ -588,10 +589,11 @@ func (c *Client) GetAllStorage(ctx context.Context) ([]Storage, error) { // Storage queries can take longer on large clusters // Create a new context with shorter timeout for storage API calls // Storage endpoints can hang when NFS/network storage is unavailable + // Using 30s timeout as a balance between responsiveness and reliability storageCtx := ctx - if deadline, ok := ctx.Deadline(); !ok || time.Until(deadline) > 15*time.Second { + if deadline, ok := ctx.Deadline(); !ok || time.Until(deadline) > 30*time.Second { var cancel context.CancelFunc - storageCtx, cancel = context.WithTimeout(ctx, 15*time.Second) + storageCtx, cancel = context.WithTimeout(ctx, 30*time.Second) defer cancel() } @@ -682,10 +684,11 @@ func (c *Client) GetStorageContent(ctx context.Context, node, storage string) ([ // Storage content queries can take longer on large storages // Create a new context with shorter timeout for storage API calls // Storage endpoints can hang when NFS/network storage is unavailable + // Using 30s timeout as a balance between responsiveness and reliability storageCtx := ctx - if deadline, ok := ctx.Deadline(); !ok || time.Until(deadline) > 15*time.Second { + if deadline, ok := ctx.Deadline(); !ok || time.Until(deadline) > 30*time.Second { var cancel context.CancelFunc - storageCtx, cancel = context.WithTimeout(ctx, 15*time.Second) + storageCtx, cancel = context.WithTimeout(ctx, 30*time.Second) defer cancel() }