Re: [libvirt] [PATCHv3 0/2] notify about reverting to a snapshot

2016-02-18 Thread Dmitry Andreev



On 06.01.2016 01:19, John Ferlan wrote:



On 12/23/2015 09:25 AM, Dmitry Andreev wrote:

Reverting to snapshot may change domain configuration but
there will be no events about that.

Lack of the event become a problem for virt-manager
https://bugzilla.redhat.com/show_bug.cgi?id=1081148

This patch-set introduces new event and emits it in
qemuDomainRevertToSnapshot.

v3:
[2/2] event is emited only in the case when stopped domain
   is reverted to a stopped domain.

Dmitry Andreev (2):
   Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT sub-event
   qemu: emit 'defined' event after reverted to snapshot without state
 changes

  examples/object-events/event-test.c | 2 ++
  include/libvirt/libvirt-domain.h| 1 +
  src/qemu/qemu_driver.c  | 8 +++-
  tools/virsh-domain.c| 3 ++-
  4 files changed, 12 insertions(+), 2 deletions(-)



This seems to be a reasonable approach; however, since Peter understands
the snapshot code better than I do, I expect he will want to chime in
(I've CC'd him).

It does seem though it's important to note somehow in the documentation
of the new event that it is only useful for the offline -> offline
revert.  Think patch 1's comment and commit message.

w/r/t patch 2 - the new else statement ...

  * Don't see any way that event could be defined...
There will be VIR_DOMAIN_EVENT_STOPPED event for transitions 4,7 (from 
running/paused to stopped).


  * Doesn't seem to matter if the FORCE flag was used or not

so it seems just an "else if (config)" could be done.

John



--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCHv3 0/2] notify about reverting to a snapshot

2016-02-11 Thread Peter Krempa
On Tue, Jan 05, 2016 at 17:19:19 -0500, John Ferlan wrote:
> On 12/23/2015 09:25 AM, Dmitry Andreev wrote:
> > Reverting to snapshot may change domain configuration but
> > there will be no events about that.

I'm afraid there will be more places like this ...

> > 
> > Lack of the event become a problem for virt-manager 
> > https://bugzilla.redhat.com/show_bug.cgi?id=1081148
> > 
> > This patch-set introduces new event and emits it in
> > qemuDomainRevertToSnapshot.

[...]

> > 
> > 
> 
> This seems to be a reasonable approach; however, since Peter understands
> the snapshot code better than I do, I expect he will want to chime in
> (I've CC'd him).

I don't currently see a problem with emiting the event. We indeed
replace the complete definition with something else so a 'DEFINED'
event is probably appropriate.

Peter


signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCHv3 0/2] notify about reverting to a snapshot

2016-01-05 Thread John Ferlan


On 12/23/2015 09:25 AM, Dmitry Andreev wrote:
> Reverting to snapshot may change domain configuration but
> there will be no events about that.
> 
> Lack of the event become a problem for virt-manager 
> https://bugzilla.redhat.com/show_bug.cgi?id=1081148
> 
> This patch-set introduces new event and emits it in
> qemuDomainRevertToSnapshot.
> 
> v3:
> [2/2] event is emited only in the case when stopped domain
>   is reverted to a stopped domain.
> 
> Dmitry Andreev (2):
>   Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT sub-event
>   qemu: emit 'defined' event after reverted to snapshot without state
> changes
> 
>  examples/object-events/event-test.c | 2 ++
>  include/libvirt/libvirt-domain.h| 1 +
>  src/qemu/qemu_driver.c  | 8 +++-
>  tools/virsh-domain.c| 3 ++-
>  4 files changed, 12 insertions(+), 2 deletions(-)
> 

This seems to be a reasonable approach; however, since Peter understands
the snapshot code better than I do, I expect he will want to chime in
(I've CC'd him).

It does seem though it's important to note somehow in the documentation
of the new event that it is only useful for the offline -> offline
revert.  Think patch 1's comment and commit message.

w/r/t patch 2 - the new else statement ...

 * Don't see any way that event could be defined...

 * Doesn't seem to matter if the FORCE flag was used or not

so it seems just an "else if (config)" could be done.

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCHv3 0/2] notify about reverting to a snapshot

2015-12-23 Thread Dmitry Andreev
Reverting to snapshot may change domain configuration but
there will be no events about that.

Lack of the event become a problem for virt-manager 
https://bugzilla.redhat.com/show_bug.cgi?id=1081148

This patch-set introduces new event and emits it in
qemuDomainRevertToSnapshot.

v3:
[2/2] event is emited only in the case when stopped domain
  is reverted to a stopped domain.

Dmitry Andreev (2):
  Introduce new VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT sub-event
  qemu: emit 'defined' event after reverted to snapshot without state
changes

 examples/object-events/event-test.c | 2 ++
 include/libvirt/libvirt-domain.h| 1 +
 src/qemu/qemu_driver.c  | 8 +++-
 tools/virsh-domain.c| 3 ++-
 4 files changed, 12 insertions(+), 2 deletions(-)

-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list