Skip to content

Prevent orphaned containers and duplicate hosts#318

Open
cmyers-mieweb wants to merge 1 commit into
mainfrom
cmyers_issue317
Open

Prevent orphaned containers and duplicate hosts#318
cmyers-mieweb wants to merge 1 commit into
mainfrom
cmyers_issue317

Conversation

@cmyers-mieweb
Copy link
Copy Markdown
Collaborator

Issue: #317

  • Add safeguards to container creation and deletion to avoid orphaned Proxmox containers and duplicate hostnames.
  • Import Job model and check for cancelled creation jobs during provisioning; if cancelled, abort creation.
  • After provisioning but before applying config, verify the DB record still exists and if it was deleted, destroy the orphaned
  • Proxmox container and abort.
  • In the containers router, enforce a unique hostname-per-site check (with transaction lock) and return 409 for API requests or flash an error for web UI to prevent duplicates.
  • Also cancel any pending/running creation job when a container is deleted.

Changes affect

  1. create-a-container/bin/create-container.js

  2. create-a-container/routers/containers.js.

Add safeguards to container creation and deletion to avoid orphaned Proxmox containers and duplicate hostnames. Import Job model and check for cancelled creation jobs during provisioning; if cancelled, abort creation. After provisioning but before applying config, verify the DB record still exists and if it was deleted, destroy the orphaned Proxmox container and abort. In the containers router, enforce a unique hostname-per-site check (with transaction lock) and return 409 for API requests or flash an error for web UI to prevent duplicates. Also cancel any pending/running creation job when a container is deleted. Changes affect create-a-container/bin/create-container.js and create-a-container/routers/containers.js.
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