Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unchecked "Reuse allocated virtual machines" does not delete VMs #61

Closed
btdevopsteam opened this issue Aug 11, 2017 · 11 comments
Closed

Comments

@btdevopsteam
Copy link

Good day

Enhancement #36 works well and consolidate resources into a Resource Group

We notice that when "Reuse allocated virtual machines" is unchecked, the plugin simple "forgets" about it in TeamCity and does not really stop the VM nor delete it

@dtretyakov
Copy link
Contributor

@btdevopsteam, thanks for reporting. I tried to fix the possible cause in the latest plugin build. Could you please try updating plugin, then go to Administration -> Diagnostics -> Troubleshooting page and enable debug-cloud logging preset. Then start a new build agent and stop them. After that enable default logging preset and check whether VM and associated resources has been properly deleted. If you find leftovers please create a new issue in the TeamCity issue tracker and securely attach in it teamcity-clouds.log file for investigation.

@konste
Copy link

konste commented Aug 11, 2017

Could you please try updating plugin

I'm lost - where shall we download the very latest version of the plugin?

@dtretyakov
Copy link
Contributor

@konste, here it.

@dtretyakov
Copy link
Contributor

@btdevopsteam, @konste, please let me know whether it was solved in the latest plugin builds?

@btdevopsteam
Copy link
Author

Thank you for working on this and sorry for the non-reply

Just installed SNAPSHOT-20170816163918 and restarted TeamCity service, the behavior is as before updating

  • stop a machine
  • the machine disappears from TeamCity
  • checked portal.azure.com, that VM is still running
  • after a while that machine reappears on the TeamCity

Is there any steps we need to take after updating the plugin?
Is there anything we can provide to assist the investigation?

@dtretyakov
Copy link
Contributor

@btdevopsteam, interesting could not reproduce it on my side, so I need logs to investigate the cause.

Please follow the instructions in #61 (comment) and attach logs into new issue in TeamCity tracker.

@btdevopsteam
Copy link
Author

Thanks @dtretyakov

TW-51243

@dtretyakov
Copy link
Contributor

@btdevopsteam, got it. It seems that you have missing deployments metadata for image azbuild19- in the group multiple. Could not realize who did it, so could you please open Audit log for this group and try to find Delete Deployments event for deployment with name azbuild19-5? Whether it was TeamCity app and when it happens?

When used build agents deployment into specific resource group the plugin deeply depends on metadata stored for deployment, so when it is missing TeamCity could not find list of allocated resources and remove them.

Could you please try to cleanup this group manually or remove and recreate it (if possible, since it is faster). Then try to start a new build agent in it, stop agent and it should properly remove all allocated resources.

I will try to improve logging for such cases when no metadata for deployment are available in resource group.

@btdevopsteam
Copy link
Author

Made a new Image and retry

Logs uploaded to youtrack, let's continue the discussion on youtrack for the moment

@dtretyakov
Copy link
Contributor

@btdevopsteam, oh, thanks, it should be fixed in the snapshot build 103+. Please let me know if it properly works.

@btdevopsteam
Copy link
Author

Thanks!

VMs (network interfaces and OS disks) are now being deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants