mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-08-16 12:49:14 +00:00
* fix: regenerate stale cloud-init secret name after VM name change When creating a VM, the cloud-init/sysprep secret name was generated once and cached for the component's lifetime (needNewSecret is always false during create). If a first create attempt was rejected by the API (e.g. duplicate name) and the user corrected the name and retried, the VM was created successfully but reused the secret name derived from the rejected attempt, and any subsequent secret-creation failure surfaced as a stale error after the VM already existed. Now the secret name (and Windows sysprep secret name) is regenerated whenever the VM name prefix used to generate it no longer matches the current name, and is proactively reset on a failed create attempt so retries always start fresh. Fixes harvester/harvester#11174 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: copilot review Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: remove console Signed-off-by: Andy Lee <andy.lee@suse.com> --------- Signed-off-by: Andy Lee <andy.lee@suse.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>