zmgr/docs/ai/gap-analysis.md
Till Wegmueller 49b4847715
Update docs/ai for DX improvements
Refresh architecture, implementation-state, and gap-analysis docs to
reflect all DX changes: validate, completions, JSON output, boot/halt,
auto-width tables, confirmation flow, progress output, and partial
failure handling. Move resolved gaps to the Resolved section.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:35:27 +01:00

3.1 KiB

Gap Analysis

Current Gaps

Publishers Not Applied During Install

Publishers are stored and listed but not yet passed to zonecfg/zoneadm during zone creation. Future: configure IPS publishers inside the zone after install via zlogin or sysding.

No Template Create/Edit via CLI

Templates must be edited as KDL files directly. Could add zmgr template create / zmgr template edit commands.

No Pool Create/Edit via CLI

Same as templates — pools are managed by editing files. Could add CLI commands.

No ZFS Dataset Management

The original VM scripts create ZFS volumes (zfs create -V). zmgr doesn't manage ZFS datasets. For zone brands, zoneadm install handles the zonepath ZFS dataset automatically.

No Cloud-Init / Sysding Integration

The VM scripts generate cloud-init configs (user-data, meta-data, network-config). Zones don't use cloud-init but could benefit from sysding config generation for first-boot setup (hostname, SSH keys, networking).

No VNIC Naming Customization

VNICs are always <zonename><index>. Could support custom VNIC naming patterns per net.

Import Matching is Best-Effort

Import matches zones to templates by brand and IPs to pools by network containment. Zones with unusual configs may get poor matches. Manual editing of the resulting KDL files may be needed.

No IPv6 Support

IPAM only handles IPv4 pools. Could extend to dual-stack.

No Automatic Rollback on Create Failure

On partial failure, zmgr prints cleanup guidance but does not automatically undo. Could add --rollback-on-failure flag.

No Colored Output

Could add colored state indicators (green=running, red=halted) using owo-colors. Should respect NO_COLOR env var.

Resolved

  • No Dry-Run Mode--dry-run / -n flag on create and destroy
  • Single network per zone — Templates define multiple net blocks
  • No public/hoster IP support — Pools support explicit address lists
  • No destructive operation confirmation — Destroy requires typing zone name (or --yes)
  • No progress output — Create/destroy show numbered step-by-step progress
  • No partial failure guidance — Prints cleanup commands on failure
  • No config validationzmgr validate checks syntax, integrity, pool sanity
  • No machine-readable output--json flag on all list/show/status commands
  • No shell completionszmgr completions bash|zsh|fish
  • No version flagzmgr --version
  • No boot/halt commandszmgr boot and zmgr halt
  • Publisher naming confusion — Remove accepts both publisher name and filename stem
  • Hardcoded column widths — Tables auto-size based on content
  • Import empty created date — Uses current date, matches template net names

Future Considerations

  • Zone ordering: Dependencies between zones (e.g., start DNS zone before app zones)
  • Snapshots: ZFS snapshot management for zone rollback
  • Migration: Move zones between hosts
  • Monitoring: Health checks, resource usage
  • Drift detection: Dedicated command to compare registry vs system state