[virt-manager PATCH 0/2] Set guest time asynchronously

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Cole,

> Nice work. I pushed the first 4 patches.

Well, the first of the following two patches fixes up the fourth of
those you pushed. Sorry. :-/

> Does it make the progress dialog spin for 5 seconds, or does it actually
> block any interaction with the app?

virt-manager remains fully usable but the progress dialog sticks around
until the timeout elapses or the agent comes online. Worse, if the
timeout is long or the machine fast enough, the user can accumulate
multiple dialogs by suspending and resuming multiple times. IMO this
won't do.

> But if you wanted to avoid the sleep spin in _set_time, the way to do it
> is to use timeout_add, which will invoke the passed function from the
[...]
> In args, you'd pass how many iterations the loop has already done, so
> you can track when to kill the timeout loop.

Nice. The timeout keeps on running though even if the domain is shut
down again. Not much harm in that but not very elegant either.

As added complication, if we're not tracking state change to cancel the
timeout, consecutive actions accumulate timeouts racing each other.
After some head-scratching I settled on using a Lock and having one long
running and potentially reset timeout for now. Again, not the most
elegant solution.

> There is possible ways to make it not need a timeout, like watching for
> the domain event when the agent is connected. It's probably tricky to
> get it right.

What would be involved in tracing domain state to cancel the timeout?

> As for for the configuration piece, I'd prefer not to add it at all
> unless there's a really good reason. Yes hardcoding timeouts will always

Totally understandable. Now the code's out there someone can always
circle back to it if the need arises.

The bit about global preference changes not being reflected in already
open vmwindows is a more general problem though. It confused the heck
out of me for sure when playing with the various View menu settings or
rather their Preferences counterparts.

Michael Weiser (2):
  virtManager: object: domain: Fix snapshot run check
  virtManager: object: domain: Async set guest time

 virtManager/object/domain.py | 53 +++++++++++++++++++++++++++---------
 1 file changed, 40 insertions(+), 13 deletions(-)

-- 
2.24.1


_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux