LunaNode / lobster

Hourly billing panel for virtual machines
http://lobster.lunanode.com
Other
84 stars 22 forks source link

Deleting a VM on Vultr deletes it from Lobster but not Vultr if done within the first 5 mins #69

Open jamesmr89 opened 8 years ago

jamesmr89 commented 8 years ago

Just came across this.

Steps:

  1. Deploy a new server.
  2. Wait for server to be ready.
  3. Immediately delete the newly created server.
  4. The server is removed from lobster.

Expected. (since the console logs the message about not being able to delete the server within 5 minutes of creation):

Lobster should catch the response from Vultr and relay it to the user, and not delete the VM from its local DB.

uakfdotb commented 8 years ago

Currently, if backend fails to delete VM, Lobster will catch the error and send an e-mail to the configured adminEmail address. The server is still immediately removed from the user's perspective since this is an issue on the backend, and the user should not be billed for that.

There seems to be two separate suggestions here, first to relay deletion errors to users instead of alerting administrator, and second to adjust Vultr backend to delay the deletion if it gets the five minutes error. Let me know if you have thoughts on this.

jamesmr89 commented 8 years ago

Oh i wasn't thinking of doing any delay, simply relaying the message to the user IMO is good enough and what I would see if i was using Vultr's site directly, but the adminEmail thing is sufficient I think. I think I just need to check my email filters, as I didn't see it come in.

rezabagh commented 8 years ago

hello,

i vote for option "relaying error message to client if he/she want to delete the VM within 5 min", just like what Vultr exactly do .

Thank you

uakfdotb commented 8 years ago

@rezabagh Vultr simply reports the error, it doesn't really relay it. The reason Lobster relays the error to the adminEmail (assuming SMTP is set up correctly in the configuration file) instead of reporting it to the user is because there could be a problem in the backend preventing VM deletion that the user shouldn't necessarily get charged for. I could see an option being useful though, and retrying the deletion in case of that specific error seems like another possibility.

rezabagh commented 8 years ago

@uakfdotb Thank you for your great explanation, relaying the error to the admin Email is great and no problem with that, but it is very necessary to put at least 5-6 min delay for deleting any VM in Lobster panel, and if any client want to delete his/her VM before 5-6 min of the creation time, faced to an error message and informing him/her that deleting is possible only after the 5-6 min of VM creation. recently i saw that some of my client delete the Vm just right after the creation and the VM do not actually remove from vultr this result to use from the VM free of charge till the admin manually delete that VM from the vultr and such case is a big and essional bug which need an immediate fix , Thanks

rezabagh commented 7 years ago

hello @uakfdotb,

any update regard the above mentioned issue ?

Thanks

rezabagh commented 7 years ago

any attempt to fix this issue ?