On Tue, Oct 13, 2015 at 13:13:04 +0200, Michal Privoznik wrote:
...
1) Invent new flag to all APIs in question and let mgmt applications
call it. If the flag is set we would sync the guest time too. However,
this masks two different operations under single API. What should be
reported if resuming succeeded but syncing time did not? Success or
failure? Mgmt applications will end up calling two APIs to distinguish
error states anyway.
2) Do this as best effort. Unconditionally, whenever guest agent is
available just issue the time sync command (possibly without waiting for
reply). This, however, takes away control from users - they will no
longer have possibility to just resume domain without time sync.
There's of course the obvious solution - not change anything and have
mgmt apps calling two separate APIs - like they oughtta be doing today.
What's your view?
As I've pointed out in a review a while ago [1] combining two operations
into one API tends to be problematic. I'd advise that the users of the
API call the two functions separately with the full control it allows
them rather.
Peter
[1]:
http://www.redhat.com/archives/libvir-list/2014-November/msg00134.html
http://www.redhat.com/archives/libvir-list/2014-November/msg00137.html