mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-04-27 08:25:53 +03:00
[GH-ISSUE #336] @real-gecko instances branch issues #215
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/webvirtcloud#215
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @catborise on GitHub (Jun 27, 2020).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/336
branch real-gecko/instances
@Real-Gecko inbound or outbound qos adding to instance network card does not work.
@catborise commented on GitHub (Jun 27, 2020):
@Real-Gecko cloning an instance does not work
@catborise commented on GitHub (Jun 27, 2020):
@Real-Gecko console does not work. token value is wrong (run console from instance detail)

and console also not working because of similar error (run console from all instances list)

@catborise commented on GitHub (Jun 27, 2020):
@Real-Gecko brief info about ram and cpu does not show

@catborise commented on GitHub (Jun 27, 2020):
changing instance title&description second time is not working
@catborise commented on GitHub (Jun 27, 2020):
@Real-Gecko regular user(not superuser/staff) cannot pause his instance.
reguler user clone instance does not work also.
@Real-Gecko commented on GitHub (Jun 29, 2020):
Fixed that. 05f1ec179e336a44d4329552d5235da84b404d8f
@Real-Gecko commented on GitHub (Jun 29, 2020):
Fixed a060be8ceb8c0d82459eb2a2ff5c00366666bbae
@catborise commented on GitHub (Jun 29, 2020):
if an instance removed from libvirt but not webvirtcloud database it causes error and does not load allinstances page.

@Real-Gecko commented on GitHub (Jun 29, 2020):
Yep, that's because we do not call refresh_instance_database on every compute in allinstances, I'll add it, but it'll slow down the page.
I think all refreshes must be performed on application start and then removed completely from views. If host is controlled only by WVC then no desync will happen. If not then we will have to call refresh every time we go to allinstances/compute instances views.
@Real-Gecko commented on GitHub (Jun 29, 2020):
93c15c806a5ef73620dcaccc6b95189460cc2a42
@Real-Gecko commented on GitHub (Jun 29, 2020):
bbd770ce9f48e7f9744442f0134b05d949b6b42f
@catborise commented on GitHub (Jun 29, 2020):
selected options does not show

@catborise commented on GitHub (Jun 29, 2020):
this situation appears not only remove instance manually from libvirt. sometimes some actions raising an exception and prevents removing db records...
we can provide an option to users, wvc control instances strictly or not. if user select instance control strictly from appsettings, wvc checks duplicate instances, refreshing db records everytime, name and uuid control as before.
or
may be we could async batch jobs which updates db records time to time.
beside that we need also some batch implementations: like move all instances to another hosts. shutdown/suspend/restart all instances on a host. live backup. live clone etc.
adding celery to project can help us, isnt it? what do you think?
@catborise commented on GitHub (Jun 29, 2020):
clone instance does not work yet.

@Real-Gecko commented on GitHub (Jun 29, 2020):
I did not work with Celery, so I cannot say anything about it.
This is due to
virDomain.XMLDesc(0), if instance is running then it returns XML that was active on domain start, title and description won't change until domain is restarted. To get XML that will be active on next domain start we need to call `virDomain.XMLDesc(2):https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainGetXMLDesc
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainXMLFlags
@Real-Gecko commented on GitHub (Jun 29, 2020):
Does not work in master too
This part causes trouble:
github.com/retspen/webvirtcloud@f23e6b000f/instances/templates/instance.html (L1238-L1240)@Real-Gecko commented on GitHub (Jun 29, 2020):
Something is wrong with DB, did you apply migrations?
@catborise commented on GitHub (Jun 29, 2020):
they are all applied.
problem is related with instance id. which should different from source instance.
"The above exception (NOT NULL constraint failed: accounts_userinstance.instance_id) was the direct cause of the following exception:"
i remove db and migrate it again.. problem continues...
@catborise commented on GitHub (Jun 29, 2020):
another problem with instance db records.
we have to find a solution to this hiccup.
@Real-Gecko commented on GitHub (Jun 29, 2020):
Yep, because of things described here
https://github.com/retspen/webvirtcloud/issues/336#issuecomment-650910903
Will fix that
@Real-Gecko commented on GitHub (Jun 29, 2020):
Can you provide reproduction steps? Does cloned instance belong to any user?
@catborise commented on GitHub (Jun 29, 2020):
i control it. it does not belong any user.

i track it the problem exception misleading.
the problem is related with not cloned disk instances: stg.createXMLFrom(vol_clone_xml, vol, meta_prealloc) fires an exception.
except Exception as e: messages.error(request, e) catches it print messages then try to save instances to user instance, but there is no new_instance uuid and new_instance.id
( user_instance = UserInstance(instance_id=new_instance.id, user_id=request.user.id, is_delete=True) )
there should be return in except. or move user_instance create/save to in try/except will solve that
@Real-Gecko commented on GitHub (Jun 29, 2020):
github.com/Real-Gecko/webvirtcloud@703de02e5cI reworked console form, check it out.
@catborise commented on GitHub (Jun 29, 2020):
create a group. then click to see details... does not work
@Real-Gecko commented on GitHub (Jun 29, 2020):
github.com/Real-Gecko/webvirtcloud@63c8151f28@catborise commented on GitHub (Jun 29, 2020):
appsettings page also show two notification

@Real-Gecko commented on GitHub (Jun 29, 2020):
include messages_block.htmlmust be removed from all templates.@catborise commented on GitHub (Jun 29, 2020):
instance views nongrouped does not work as expected.
@Real-Gecko commented on GitHub (Jun 29, 2020):
What exactly is wrong?
@Real-Gecko commented on GitHub (Jun 29, 2020):
Not related to instances
@catborise commented on GitHub (Jun 29, 2020):
non grouped view

it should be like that

this pieces of code seems to ? grouped and nongrouped view does need same info but why is this code:

@Real-Gecko commented on GitHub (Jun 29, 2020):
88ea491a0bb96644de9d42330df80f4189659707 for settings too
@Real-Gecko commented on GitHub (Jun 29, 2020):
676d66076762c9de5e24eda312be83aa2a4969ce
@Real-Gecko commented on GitHub (Jun 29, 2020):
f3bde2408ce1303e06a5e2a25d516d8a394e08d8 I made it look like so
Can you try again and see if it works?
@catborise commented on GitHub (Jun 29, 2020):
clone is working now. no problem.
instance fixed.
@catborise commented on GitHub (Jun 29, 2020):
user info missing. host title missing

@Real-Gecko commented on GitHub (Jun 30, 2020):
For some reason suspending instances is allowed only for superusers I left this functionality intact.
github.com/retspen/webvirtcloud@f23e6b000f/instances/views.py (L682-L687)@Real-Gecko commented on GitHub (Jun 30, 2020):
2f82055c27eef8a4d89a7d7c5659c8720bb26d1a
@Real-Gecko commented on GitHub (Jun 30, 2020):
So, looks like everything is fixed, can you please confirm?
@catborise commented on GitHub (Jun 30, 2020):
instance settings tab actions returns to main instance page.
they should return to settings or disk tab
return redirect(request.META.get('HTTP_REFERER') + #settings/#disk/etc)
.
def delete_vol(request, pk):
def detach_vol(request, pk):
def add_cdrom(request, pk):
def detach_cdrom(request, pk, dev):
def mount_iso(request, pk):
def add_existing_vol(request, pk):
@catborise commented on GitHub (Jun 30, 2020):
migration completed successfully. but error happens like before

@catborise commented on GitHub (Jun 30, 2020):
steps:
-> http404 error, click return: instance not found error
@catborise commented on GitHub (Jun 30, 2020):
console access from instance list does not work yet:

@Real-Gecko commented on GitHub (Jun 30, 2020):
not superuser?
@catborise commented on GitHub (Jun 30, 2020):
super user. i did not try not superuser
@catborise commented on GitHub (Jun 30, 2020):
click an instance suspend button. unexpected error appears

@catborise commented on GitHub (Jun 30, 2020):
delete instance does not ask any confirmation. it deletes immediately. isnt it dangerous?
@Real-Gecko commented on GitHub (Jun 30, 2020):
Yep it is, but this ugly js alert is an atrocity. I'll replace it with simple confirmation page.
@Real-Gecko commented on GitHub (Jul 1, 2020):
Can you show full stack trace? Don't forget to remove any sensitive data from it.
@Real-Gecko commented on GitHub (Jul 1, 2020):
Does it happen in master branch?
@catborise commented on GitHub (Jul 1, 2020):
it is not a problem i think it is only a notification message. master branch does not show it on the page, but only console.
instance branch shows that libvirt error which is "libvirt: QEMU Driver error : Domain not found: no domain with matching name 'rpmbuild'" with a notification.
@Real-Gecko commented on GitHub (Jul 1, 2020):
I want to track down the error to the line it's happening at. Even if it goes to console I think we have to fix it.
@catborise commented on GitHub (Jul 1, 2020):
i do not now how to trace it. only one libvirterror message appears and continue. i will debug it, may be i can see.
@catborise commented on GitHub (Jul 1, 2020):
i figure it out. it because of autostart query.

i did try with disabling it:
error is gone.

because there is not instance any more it is moved. we should call "autostart = instance.proxy.get_autostart()" before migrate not after migrate.
may it can be:
@catborise commented on GitHub (Jul 1, 2020):
moving this from instances/utils.py/migrate_instance:


to
will solve notifications problem.
@Real-Gecko commented on GitHub (Jul 1, 2020):
0771f72a25c5a52f1aa41ac9e7ee8b163062bf8e
Here's the latest commit that fixes all issues discussed above, please confirm that things are working.
@catborise commented on GitHub (Jul 2, 2020):
what about that?
did you forget
@Real-Gecko commented on GitHub (Jul 2, 2020):
6eca1d886ae2d08a114e35e3572238edfd07d196
Fixed
@catborise commented on GitHub (Jul 2, 2020):
all libvirt actions need to be encapsulated with try/except block.

libvirt could be produce an error. this should not crash the application.
could you implement that with a decorator?
@catborise commented on GitHub (Jul 2, 2020):
same error problem which cause crash is also valid for destroy
may be you should change method like below
also

i think you move the choices to confirm dialog. it should be changed with a proper message
@Real-Gecko commented on GitHub (Jul 2, 2020):
Do you have ExceptionMiddleware enabled?
@Real-Gecko commented on GitHub (Jul 2, 2020):
@lord-kyron commented on GitHub (Jul 2, 2020):
Hey guys, shouldn't it be better to create a Discord chat channel and move those conversations there? It will be faster and not so spamming. I can create the channel if you are ok with it?
@catborise commented on GitHub (Jul 2, 2020):
hmm. no it was not enabled. i enable it. nice it works as expected :)
@catborise commented on GitHub (Jul 2, 2020):
in past, i want to create a channel for project in https://gitter.im/ but retspen does not respond.
discord will be fine.
this place is not a suitable for that style communication.
you can add communication info to readme
@Real-Gecko commented on GitHub (Jul 2, 2020):
Make it happen.
@lord-kyron commented on GitHub (Jul 2, 2020):
It was done:
https://discord.gg/McyJ9m
Come in!
And someone of you - please, add the link to the channel to the README!
Thanks!
@Real-Gecko commented on GitHub (Oct 7, 2020):
Can be closed as #342 was merged.