Skip to content

[Tech Debt]: Cloud-init secret creation is sequential #126

Description

@mrhillsman

Category

Performance

Description

Cloud-init secrets are created one at a time in a for loop in runE. With many VMs (e.g., --vm-count 50 across multiple workloads), this becomes the bottleneck before the concurrent VM creation phase. These are independent API calls with no ordering dependency that could be parallelized.

Severity

Low — cosmetic or minor inconvenience

Affected Files

  • cmd/virtwork/main.go — secret creation loop iterates plans sequentially, calling resources.CreateCloudInitSecret one at a time

Proposed Fix

Use an errgroup.Group (with a concurrency limit) to create secrets in parallel, similar to the existing VM creation pattern. This should be done as part of or after the orchestrator extraction (#123) to avoid further complicating runE.

Area: VM provisioning
Architecture Layer: Layer 4 - Orchestration (cmd, cleanup)

Metadata

Metadata

Assignees

No one assigned

    Labels

    size/SDenotes a PR that changes 10-29 lines, ignoring generated files.tech-debtTechnical debt, code quality, or maintenance concern

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions