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

[VirtualizationServerController2012] Error while converting VHD: Thread was being aborted. #103

Open
berkut1 opened this issue Jan 27, 2022 · 1 comment

Comments

@berkut1
Copy link
Contributor

berkut1 commented Jan 27, 2022

Describe the bug

Error while converting VHD: Thread was being aborted.
Thread was being aborted.
at System.Threading.Thread.SleepInternal(Int32 millisecondsTimeout)
at System.Threading.Thread.Sleep(Int32 millisecondsTimeout)
at SolidCP.EnterpriseServer.VirtualizationServerController2012.JobCompleted(VirtualizationServer2012 vs, ConcreteJob job)
at SolidCP.EnterpriseServer.VirtualizationServerController2012.CreateVirtualMachineInternal(String taskId, VirtualMachine vm, LibraryItem osTemplate, Int32 externalAddressesNumber, Boolean randomExternalAddresses, Int32[] externalAddresses, Int32 privateAddressesNumber, Boolean randomPrivateAddresses, String[] privateAddresses, String summaryLetterEmail)
Unhandled error while creating VPS: Thread was being aborted.
Thread was being aborted.
at SolidCP.EnterpriseServer.VirtualizationServerController2012.CreateVirtualMachineInternal(String taskId, VirtualMachine vm, LibraryItem osTemplate, Int32 externalAddressesNumber, Boolean randomExternalAddresses, Int32[] externalAddresses, Int32 privateAddressesNumber, Boolean randomPrivateAddresses, String[] privateAddresses, String summaryLetterEmail)
VPS was not created

Possible solution
Wrap the JobCompleted function in a try catch and if we get an exception, check the JobState, if JobState is fine then continue, if not, then complete the task and show an error.

To Reproduce
random

SolidCP Info

  • SolidCP Version: any

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@berkut1
Copy link
Contributor Author

berkut1 commented May 11, 2023

This issue still exist.
After thread aborted need to reactivate it, or we still get exception (as unhandled) if try to get job state

Should we use Thread.ResetAbort(); ?

Need find a way how to test the best solution.

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

No branches or pull requests

1 participant