me-box-archive / databox-netdev

Old Dev version Databox OS container manager and dashboard server (do not use)
MIT License
3 stars 6 forks source link

Delete saved SLAs from DB on container removal #40

Closed yousefamar closed 7 years ago

yousefamar commented 7 years ago

When removing a container through the dashboard, the previously made SLA remains, so the next time it's launched, and the user goes through the SLA flow again, the new one can't be saved because "it violates the unique constraint". (Alternatively, the old one could be automatically replaced).

yousefamar commented 7 years ago

It seems that this happens in dev mode only when a container ends unnaturally by crashing rather than exiting. The workaround is to manually rm -rf slaStore/stadatastore.db but there may be a way to handle that and remove the SLA automatically as normal.