Decommission an Organization¶
Decommissioning tears down an organization and all its resources, and closes its billing. The portal does the teardown, and Odoo closes the sale order automatically once it is safe to do so.
Trigger the decommission¶
In the Servala Portal staff section:
- Open the organization to decommission in the staff section.
- Click the Start decommission button.
- Review the confirmation page. It lists every service instance that will be deleted and every control plane where a namespace will be deleted.
- Confirm to run the decommission.
What the portal does¶
On confirmation, the portal performs the teardown automatically, in order:
- Deletes all service instances of the organization (removing their Kubernetes resources).
- Deletes the organization's namespace on every control plane.
- Archives the organization (sets
archived_at). An archived organization can no longer create instances. - Sets the
decommission_dateon the organization's linked Odoo sale order.
The steps are guarded: if deleting an instance or a namespace fails, the decommission aborts before the organization is archived, the error is shown to staff and recorded in the audit log, and the action can be retried once the cause is fixed.
Setting decommission_date on Odoo is best-effort: if it fails, the organization
is still archived and the date can be reconciled later by the Odoo sync.
What Odoo does¶
Once the portal has set decommission_date, a daily Odoo job closes the sale order
automatically, but only when it is safe:
decommission_dateis set, and- the order is still open (in
salestate), and - there is nothing left to invoice, and
- no event-based instance is still running (every event-based line that has a start time also has an end time).
When all of these hold, the job locks the order (marks it done), posts a note on
the order documenting the auto-close, and archives it. Setting decommission_date
does not affect billing: any remaining usage is still invoiced before the order
closes.
If an order is still being invoiced or still has a running instance, the job leaves it open and re-checks on the next run. So an order may take a day or more after decommissioning to close.
Verify and follow up¶
- Confirm the organization shows as archived in the portal.
- Confirm the Odoo sale order eventually closes (locked and archived). If it stays open longer than expected, check the guards above: usage still to invoice, or an instance that was not fully torn down.
- If the decommission was requested through a Helpdesk ticket (for example an Exoscale offboarding ticket), ask for feedback there and close it.