Newer Older
c299213 3 months ago History
104 lines | 4.749kb
Bogdan Timofte authored 3 months ago
1
# PGS - Changelog
2

            
3
## [1.5] - 2026-03-07
4

            
5
### Added
6
- Added `pgs cleanup` to scan image storages for orphan/stale `vm-*-state-suspend-YYYY-MM-DD.raw` volumes and remove them safely
7

            
8
### Fixed
9
- Stopped VMs are no longer classified as "already suspended to disk" from config flags alone; `bin/pgs` now requires `lock: suspended`, `vmstate:`, and a resolvable backing saved-state volume
10
- Added cleanup for inconsistent suspend artifacts on stopped VMs, including stale suspend locks, stale `vmstate:` metadata, and orphaned saved-state volumes on storage
11
- `pgs suspend` now runs suspend-artifact cleanup as a preflight, reducing same-day collisions with stale `state-suspend` volumes
12
- Cleanup explicitly ignores `vm-*-state-cp*.raw` checkpoint files and only targets `vm-*-state-suspend-YYYY-MM-DD.raw`
13
- Repeated `pgs suspend` runs now merge with the existing state file instead of discarding prior `to_resume` intent
14
- State now records `vm_details.suspend_volume` and `vm_details.suspend_file_date`, and `resume` skips auto-restore when a VM's suspend artifact changed after the state was saved
Bogdan Timofte authored 3 months ago
15
- Suspend-artifact cleanup now scans only local `dir` storages; remote storages such as NFS are skipped so planned maintenance cannot block in kernel I/O wait on a stale mount [ISSUE-2026-002]
Bogdan Timofte authored 3 months ago
16

            
17
## [1.4] - 2026-03-06
18

            
19
### Changed
20
- Standardized install layout around `xdev` paths for uninstall, documentation, and runtime state
21
- Added dedicated `scripts/install.sh` and `scripts/uninstall.sh` and reduced `setup.sh` to a local/remote wrapper
22
- Updated `bin/pgs` to migrate legacy state from `/var/lib/pve-manager/pgs-state.json` to `/var/lib/xdev/pve-guests-state/pgs-state.json`
23
- Promoted `bin/pgs` as the canonical executable and removed the duplicate top-level `pgs` file
24
- Marked `systemd/` artifacts as legacy reference material instead of active install targets
25

            
26
### Fixed
27
- Fixed documentation to reflect the current manual workflow and the standardized host layout
28

            
29
## [1.2] - 2026-03-05
30

            
31
### Added
32
- LXC container (CT) support: graceful shutdown before maintenance, auto-start after maintenance
33
- New `ct_to_start` array in state JSON for CT restoration
34
- `load_ct_info()` function using single `pct list` call
35
- `shutdown_ct()` function with 120s timeout for graceful shutdown
36
- `start_ct()` function for post-maintenance startup
37
- TODO placeholder for critical VM/CT migration support
38

            
39
### Changed
40
- State file now includes `ct_to_start` array
41
- Suspend operation processes VMs then CTs
42
- Resume operation resumes VMs then starts CTs
43

            
44
### Fixed
45
- Fixed `pct list` column parsing (Status/Lock/Name column order)
46
- Handle empty Lock column in `pct list` output
47

            
48
## [1.1] - 2026-03-05
49

            
50
### Fixed
51
- Fixed `load_state()` outputting log messages to stdout, corrupting JSON parsing
52
- Fixed empty arrays in JSON state file (was generating `[""]` instead of `[]`)
53
- Fixed paused VMs being treated as "running" - now properly detects `paused` status
54

            
55
### Changed
56
- Optimized VM info loading: single `qm list` call instead of per-VM calls
57
- Optimized suspend lock detection: read config files directly, no extra `qm` calls
58
- Optimized status checking: only verify actual status for "running" VMs, rest trust `qm list`
59
- Reduced scan time from ~180 seconds to ~2.5 seconds for 30+ VMs
60

            
61
### Added
62
- Proper systemd service setup for manual suspend before maintenance
63
- Proper systemd service setup for manual resume after maintenance
64
- Better handling of paused VMs: suspend to disk but don't auto-resume
65
- Comprehensive journal logging with severity levels (INFO, WARNING, ERROR, SUCCESS)
66
- Dry-run mode for testing without effects
67

            
68
## [1.0] - 2026-03-05
69

            
70
### Initial Release
71
- Basic suspend/resume functionality
72
- State file preservation
73
- Manual testing scripts
74

            
75
---
76

            
77
## Performance Improvements
78

            
79
| Operation | v1.0 | v1.1 | Improvement |
80
|-----------|------|------|-------------|
81
| Scan 30 VMs | ~180s | ~2.5s | **72x faster** |
82
| System calls | Per-VM qm calls | Single qm list + file I/O | **Drastically reduced** |
83

            
84
## Known Limitations
85

            
86
- Requires passwordless SSH for cluster-wide operations
87
- No critical VM/CT migration support yet (TODO)
88

            
89
## Testing
90

            
91
Tested on:
92
- Proxmox VE 8.x with 30+ VMs and CTs
93
- Mixed VM configurations (4GB-16GB RAM)
94
- LXC containers with running services
95
- Storage: local-dir, NFS mount points
Bogdan Timofte authored 3 months ago
96
- Planned reboot validation on `baobab`: shutdown-to-ICMP-loss improved from ~106s to ~15s once NFS over Thunderbolt stopped losing transport before unmount
Bogdan Timofte authored 3 months ago
97

            
98
## Future Enhancements
99

            
100
- [ ] Support for LXC container shutdown
101
- [ ] Configurable exclusion list for VMs
102
- [ ] Metrics/performance monitoring
103
- [ ] Multi-node coordination for cluster-wide operations
104
- [ ] Backup integration for backup snapshots before suspend