[GH-ISSUE #379] HTTP/500 on /console when instance uuid is changing #238

Closed
opened 2026-02-27 15:57:55 +03:00 by kerem · 11 comments
Owner

Originally created by @pznamensky on GitHub (Oct 20, 2020).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/379

We've got lots of VMs which are recreating via our scripts or terraform.
That VMs preserve their names, but uuid changes each recreation.
One of the places where it breaks webvirtcloud is virtual console.
When VM is changing its uuid virtual console stops working and return 500 error.
As a workaround, we're deleting everything from table instances_instance, but it doesn't look very good :)
Is there any config parameter or something else which can help to fix the problem?

Originally created by @pznamensky on GitHub (Oct 20, 2020). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/379 We've got lots of VMs which are recreating via our scripts or terraform. That VMs preserve their names, but uuid changes each recreation. One of the places where it breaks webvirtcloud is virtual console. When VM is changing its uuid virtual console stops working and return 500 error. As a workaround, we're deleting everything from table `instances_instance`, but it doesn't look very good :) Is there any config parameter or something else which can help to fix the problem?
kerem closed this issue 2026-02-27 15:57:56 +03:00
Author
Owner

@catborise commented on GitHub (Oct 20, 2020):

Yes that is a problem i knew it, but i forgot. A few times ago app was updating whenever is changed . But now it is not update it every time. It should be fixed. Otherwise it Requires manual db manipulation.
@Real-Gecko minimizing db calls operation occurs that. How we can solve it.

<!-- gh-comment-id:712991925 --> @catborise commented on GitHub (Oct 20, 2020): Yes that is a problem i knew it, but i forgot. A few times ago app was updating whenever is changed . But now it is not update it every time. It should be fixed. Otherwise it Requires manual db manipulation. @Real-Gecko minimizing db calls operation occurs that. How we can solve it.
Author
Owner

@Real-Gecko commented on GitHub (Oct 20, 2020):

Can you please show exact error, with stacktrace if possible?

<!-- gh-comment-id:713001683 --> @Real-Gecko commented on GitHub (Oct 20, 2020): Can you please show exact error, with stacktrace if possible?
Author
Owner

@pznamensky commented on GitHub (Oct 21, 2020):

Thank you all for the quick reply.

Can you please show exact error, with stacktrace if possible?

Unfortunately, I can't see the stacktrace although I have Debug = True in my config file (but it is possible that there are some issues in my setup though).

<!-- gh-comment-id:713413519 --> @pznamensky commented on GitHub (Oct 21, 2020): Thank you all for the quick reply. >Can you please show exact error, with stacktrace if possible? Unfortunately, I can't see the stacktrace although I have `Debug = True` in my config file (but it is possible that there are some issues in my setup though).
Author
Owner

@catborise commented on GitHub (Oct 21, 2020):

steps:

  1. login webvirtcloud
  2. open an instance console.
  3. shutdown instance
  4. go to host
    4.1 copy instance xml
    4.2. undefine instance
    4.3 paste copied xml
    4.4 change only uuid
    4.5. redefine instance and run it.
  5. go to webvirtcloud try to open console
    Result:
    image
<!-- gh-comment-id:713433261 --> @catborise commented on GitHub (Oct 21, 2020): steps: 1. login webvirtcloud 2. open an instance console. 3. shutdown instance 4. go to host 4.1 copy instance xml 4.2. undefine instance 4.3 paste copied xml 4.4 change only uuid 4.5. redefine instance and run it. 5. go to webvirtcloud try to open console Result: ![image](https://user-images.githubusercontent.com/1725643/96699713-44314080-1397-11eb-9db1-5917d4742241.png)
Author
Owner

@pznamensky commented on GitHub (Dec 1, 2020):

Are there any chances it will be fixed? :)

<!-- gh-comment-id:736309899 --> @pznamensky commented on GitHub (Dec 1, 2020): Are there any chances it will be fixed? :)
Author
Owner

@catborise commented on GitHub (Dec 2, 2020):

@pznamensky i am not sure how to solve that problem. going back or different way...

i think we should solve it with bulk operations. otherwise query cost increase every listing time.
we can add a menu to refresh vm info, it updates database uuid...

<!-- gh-comment-id:737035909 --> @catborise commented on GitHub (Dec 2, 2020): @pznamensky i am not sure how to solve that problem. going back or different way... i think we should solve it with bulk operations. otherwise query cost increase every listing time. we can add a menu to refresh vm info, it updates database uuid...
Author
Owner

@catborise commented on GitHub (Dec 15, 2020):

@pznamensky i think problem is solved with adding uuid update...
please feedback.

thanks

<!-- gh-comment-id:745142129 --> @catborise commented on GitHub (Dec 15, 2020): @pznamensky i think problem is solved with adding uuid update... please feedback. thanks
Author
Owner

@pznamensky commented on GitHub (Dec 18, 2020):

@catborise thank you very much for the fix!
I'll check if everything works fine the next week

<!-- gh-comment-id:747940125 --> @pznamensky commented on GitHub (Dec 18, 2020): @catborise thank you very much for the fix! I'll check if everything works fine the next week
Author
Owner

@pznamensky commented on GitHub (Dec 30, 2020):

I can confirm, that we're able to connect to console now.
But I've noticed that after changing VMs uuid old records in instances_instance table are not updated and deleted.
Thus after changing uuid, new records are added.
Nevertheless, console is working fine now.
Thank you!

<!-- gh-comment-id:752363583 --> @pznamensky commented on GitHub (Dec 30, 2020): I can confirm, that we're able to connect to console now. But I've noticed that after changing VMs uuid old records in `instances_instance` table are not updated and deleted. Thus after changing uuid, new records are added. Nevertheless, console is working fine now. Thank you!
Author
Owner

@catborise commented on GitHub (Dec 31, 2020):

@pznamensky thanks. there was a problem with old record. i fixed it. i think this way is more apropriate. it deletes changed uuids and add new ones.

<!-- gh-comment-id:752889506 --> @catborise commented on GitHub (Dec 31, 2020): @pznamensky thanks. there was a problem with old record. i fixed it. i think this way is more apropriate. it deletes changed uuids and add new ones.
Author
Owner

@pznamensky commented on GitHub (Dec 31, 2020):

Thank you!

<!-- gh-comment-id:752897541 --> @pznamensky commented on GitHub (Dec 31, 2020): Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#238
No description provided.