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

HTTP/500 on /console when instance uuid is changing #379

Closed
pznamensky opened this issue Oct 20, 2020 · 11 comments
Closed

HTTP/500 on /console when instance uuid is changing #379

pznamensky opened this issue Oct 20, 2020 · 11 comments

Comments

@pznamensky
Copy link

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?

@catborise
Copy link
Collaborator

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.

@Real-Gecko
Copy link
Contributor

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

@pznamensky pznamensky changed the title HTTP/500 on /console when instance uuid HTTP/500 on /console when instance uuid is changing Oct 21, 2020
@pznamensky
Copy link
Author

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).

@catborise
Copy link
Collaborator

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

@pznamensky
Copy link
Author

Are there any chances it will be fixed? :)

@catborise
Copy link
Collaborator

@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...

@catborise
Copy link
Collaborator

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

thanks

@pznamensky
Copy link
Author

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

@pznamensky
Copy link
Author

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!

@catborise
Copy link
Collaborator

@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.

@pznamensky
Copy link
Author

Thank you!

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

3 participants