Skip to content

fix: bug fixes, performance improvements and code cleanup (#17)#17

Merged
franklupo merged 1 commit intomasterfrom
fix/bug-fixes-and-perf-improvements
Apr 11, 2026
Merged

fix: bug fixes, performance improvements and code cleanup (#17)#17
franklupo merged 1 commit intomasterfrom
fix/bug-fixes-and-perf-improvements

Conversation

@franklupo
Copy link
Copy Markdown
Member

Summary

  • 6 bug fixes — wrong storage in Disks sheet, empty Node column in Networks, crash on SSL expiry, wrong count in Replication summary, duplicate TFA API call, firewall state not reset between runs
  • 4 performance improvements — Firewall, Replication, StorageContent and RRD all parallelized or optimized
  • Code cleanup — Firewall refactored to local functions, ProgressTracker made thread-safe, single-table sheets no longer show a redundant title

Test plan

  • Generate report on a cluster with VMs having disks on multiple storages — verify Disks sheet shows correct storage type/usage per disk
  • Verify Nodes Networks sheet shows the correct node name for each row
  • Verify report generates without crash when a node has a certificate with no expiry date
  • Verify Replication row count in Summary matches actual replication jobs
  • Verify Firewall sheet generates correctly with rules, aliases and IP sets
  • Verify report can be generated twice on the same ReportEngine instance without crash

Fixes:
- Disks sheet: use disk's own storage for lookup instead of VM primary storage
- Nodes Networks sheet: Node column was always null, now shows per-row node
- SSL certificate: DaysUntilExpiry no longer crashes when NotAfter is zero
- Replication sheet: Summary count now reports rows written not node count
- Cluster sheet: TFA table was making a duplicate API call
- Firewall: state variables are now local, safe for multiple GenerateAsync calls

Performance:
- Firewall: cluster and per-guest calls parallelized with Task.WhenAll
- Replication: all nodes fetched in parallel
- StorageContent: written in a single parallel pass with CreateTable
- RRD: TimeFrame/Consolidation evaluated once before the parallel loop

Code quality:
- Firewall: removed 4 class fields and 3 private methods, replaced with local functions
- ProgressTracker: Interlocked.Increment + Volatile.Write for thread safety
- Single-table sheets: removed redundant table title (null)
@franklupo franklupo merged commit 897867e into master Apr 11, 2026
4 checks passed
@franklupo franklupo deleted the fix/bug-fixes-and-perf-improvements branch April 11, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant