HPCCloud icon indicating copy to clipboard operation
HPCCloud copied to clipboard

EC2 instance persists in mongo after being terminated

Open chetnieter opened this issue 8 years ago • 7 comments

I have noticed that after I terminate an EC2 instance via the UI I can not create a new EC2 instance with the same name. I get an error stating that name already exists. Digging though the mongo database I see that the entry in the cluster table that corresponds to the terminated EC2 instance remains in the database. Is that by design or should the database entries be removed when an instance is successfully terminated?

chetnieter avatar Aug 08 '16 15:08 chetnieter

Yes, these should be cleaned up.

cjh1 avatar Aug 08 '16 17:08 cjh1

related to #429? Right now you can delete them manually on the Preferences/Status page.

TristanWright avatar Aug 22 '16 16:08 TristanWright

also related to #238, more db clean up everywhere.

TristanWright avatar Sep 01 '16 16:09 TristanWright

Been looking into this more ~~in the branch db-cleanup~~.

Is that by design or should the database entries be removed when an instance is successfully terminated?

They should only be removed if:

  • the instance is terminated and there is a new cluster replacing it. We still use the db entry of a terminated cluster to get its logs and its status.
  • the instance is terminated and the simulation for the instance is deleted.

TristanWright avatar Sep 02 '16 18:09 TristanWright

• the instance is terminated and the simulation for the instance is deleted.

Still wrong. If the cluster is used on multiple simulations and is terminated status? We can't delete it because we might still need the logs for the other simulation!

TristanWright avatar Sep 02 '16 18:09 TristanWright

related to #422 (on duplicate cluster names)

TristanWright avatar Sep 07 '16 16:09 TristanWright

The image for the procedure has been sitting around on my desktop, transferring it here:

TristanWright avatar Oct 24 '16 16:10 TristanWright