[PATCH v3 0/5] ch: handle events from cloud-hypervisor

Purna Pavan Chandra Aekkaladevi posted 5 patches 8 months, 3 weeks ago
Failed in applying to current master (apply log)
There is a newer version of this series
NEWS.rst            |   7 +
po/POTFILES         |   1 +
src/ch/ch_events.c  | 329 ++++++++++++++++++++++++++++++++++++++++++++
src/ch/ch_events.h  |  54 ++++++++
src/ch/ch_monitor.c |  52 ++++++-
src/ch/ch_monitor.h |  11 ++
src/ch/meson.build  |   2 +
7 files changed, 449 insertions(+), 7 deletions(-)
create mode 100644 src/ch/ch_events.c
create mode 100644 src/ch/ch_events.h
[PATCH v3 0/5] ch: handle events from cloud-hypervisor
Posted by Purna Pavan Chandra Aekkaladevi 8 months, 3 weeks ago
changes from v2->v3:
* Remove patch 'utils: Implement virFileIsNamedPipe' as it is no more needed.
* Remove the eventmonitorpath only if it exists
* Added domain name as a prefix to logs from ch_events.c. This will make
  debugging easier.
* Simplified event parsing logic by reserving a byte for null char.

changes from v1->v2:

* Rebase on latest master
* Use /* */ for comments
* Remove fifo file if already exists
* Address other comments from Praveen Paladugu

cloud-hypervisor raises various events, including VM lifecylce operations
such as boot, shutdown, pause, resume, etc. Libvirt will now read these
events and take the necessary actions, such as correctly updating the
domain state. A FIFO file is passed to `--event-monitor` option of
cloud-hypervisor. Libvirt creates a new thread that acts as the reader
of the fifo file and continuously monitors for new events. Currently,
shutdown events are handled by updating the domain state appropriately.

Purna Pavan Chandra Aekkaladevi (5):
  ch: pass --event-monitor option to cloud-hypervisor
  ch: start a new thread for handling ch events
  ch: events: Read and parse cloud-hypervisor events
  ch: events: facilitate lifecycle events handling
  NEWS: Mention event handling support in ch driver

 NEWS.rst            |   7 +
 po/POTFILES         |   1 +
 src/ch/ch_events.c  | 329 ++++++++++++++++++++++++++++++++++++++++++++
 src/ch/ch_events.h  |  54 ++++++++
 src/ch/ch_monitor.c |  52 ++++++-
 src/ch/ch_monitor.h |  11 ++
 src/ch/meson.build  |   2 +
 7 files changed, 449 insertions(+), 7 deletions(-)
 create mode 100644 src/ch/ch_events.c
 create mode 100644 src/ch/ch_events.h

-- 
2.34.1
Re: [PATCH v3 0/5] ch: handle events from cloud-hypervisor
Posted by Praveen K Paladugu 8 months, 1 week ago
LGTM!!

On 10/23/2024 3:02 AM, Purna Pavan Chandra Aekkaladevi wrote:
> changes from v2->v3:
> * Remove patch 'utils: Implement virFileIsNamedPipe' as it is no more needed.
> * Remove the eventmonitorpath only if it exists
> * Added domain name as a prefix to logs from ch_events.c. This will make
>    debugging easier.
> * Simplified event parsing logic by reserving a byte for null char.
> 
> changes from v1->v2:
> 
> * Rebase on latest master
> * Use /* */ for comments
> * Remove fifo file if already exists
> * Address other comments from Praveen Paladugu
> 
> cloud-hypervisor raises various events, including VM lifecylce operations
> such as boot, shutdown, pause, resume, etc. Libvirt will now read these
> events and take the necessary actions, such as correctly updating the
> domain state. A FIFO file is passed to `--event-monitor` option of
> cloud-hypervisor. Libvirt creates a new thread that acts as the reader
> of the fifo file and continuously monitors for new events. Currently,
> shutdown events are handled by updating the domain state appropriately.
> 
> Purna Pavan Chandra Aekkaladevi (5):
>    ch: pass --event-monitor option to cloud-hypervisor
>    ch: start a new thread for handling ch events
>    ch: events: Read and parse cloud-hypervisor events
>    ch: events: facilitate lifecycle events handling
>    NEWS: Mention event handling support in ch driver
> 
>   NEWS.rst            |   7 +
>   po/POTFILES         |   1 +
>   src/ch/ch_events.c  | 329 ++++++++++++++++++++++++++++++++++++++++++++
>   src/ch/ch_events.h  |  54 ++++++++
>   src/ch/ch_monitor.c |  52 ++++++-
>   src/ch/ch_monitor.h |  11 ++
>   src/ch/meson.build  |   2 +
>   7 files changed, 449 insertions(+), 7 deletions(-)
>   create mode 100644 src/ch/ch_events.c
>   create mode 100644 src/ch/ch_events.h
> 

-- 
Regards,
Praveen K Paladugu
Re: [PATCH v3 0/5] ch: handle events from cloud-hypervisor
Posted by Purna Pavan Chandra Aekkaladevi 8 months ago
Hi,

Bumping this up for more reviews.

Thanks and Regards,
Purna Pavan Chandra

On Tue, Nov 05, 2024 at 03:29:56PM -0600, Praveen K Paladugu wrote:
> LGTM!!
> 
> On 10/23/2024 3:02 AM, Purna Pavan Chandra Aekkaladevi wrote:
> >changes from v2->v3:
> >* Remove patch 'utils: Implement virFileIsNamedPipe' as it is no more needed.
> >* Remove the eventmonitorpath only if it exists
> >* Added domain name as a prefix to logs from ch_events.c. This will make
> >   debugging easier.
> >* Simplified event parsing logic by reserving a byte for null char.
> >
> >changes from v1->v2:
> >
> >* Rebase on latest master
> >* Use /* */ for comments
> >* Remove fifo file if already exists
> >* Address other comments from Praveen Paladugu
> >
> >cloud-hypervisor raises various events, including VM lifecylce operations
> >such as boot, shutdown, pause, resume, etc. Libvirt will now read these
> >events and take the necessary actions, such as correctly updating the
> >domain state. A FIFO file is passed to `--event-monitor` option of
> >cloud-hypervisor. Libvirt creates a new thread that acts as the reader
> >of the fifo file and continuously monitors for new events. Currently,
> >shutdown events are handled by updating the domain state appropriately.
> >
> >Purna Pavan Chandra Aekkaladevi (5):
> >   ch: pass --event-monitor option to cloud-hypervisor
> >   ch: start a new thread for handling ch events
> >   ch: events: Read and parse cloud-hypervisor events
> >   ch: events: facilitate lifecycle events handling
> >   NEWS: Mention event handling support in ch driver
> >
> >  NEWS.rst            |   7 +
> >  po/POTFILES         |   1 +
> >  src/ch/ch_events.c  | 329 ++++++++++++++++++++++++++++++++++++++++++++
> >  src/ch/ch_events.h  |  54 ++++++++
> >  src/ch/ch_monitor.c |  52 ++++++-
> >  src/ch/ch_monitor.h |  11 ++
> >  src/ch/meson.build  |   2 +
> >  7 files changed, 449 insertions(+), 7 deletions(-)
> >  create mode 100644 src/ch/ch_events.c
> >  create mode 100644 src/ch/ch_events.h
> >
> 
> -- 
> Regards,
> Praveen K Paladugu
Re: [PATCH v3 0/5] ch: handle events from cloud-hypervisor
Posted by Michal Prívozník 8 months ago
On 10/23/24 10:02, Purna Pavan Chandra Aekkaladevi wrote:
> changes from v2->v3:
> * Remove patch 'utils: Implement virFileIsNamedPipe' as it is no more needed.
> * Remove the eventmonitorpath only if it exists
> * Added domain name as a prefix to logs from ch_events.c. This will make
>   debugging easier.
> * Simplified event parsing logic by reserving a byte for null char.
> 
> changes from v1->v2:
> 
> * Rebase on latest master
> * Use /* */ for comments
> * Remove fifo file if already exists
> * Address other comments from Praveen Paladugu
> 
> cloud-hypervisor raises various events, including VM lifecylce operations
> such as boot, shutdown, pause, resume, etc. Libvirt will now read these
> events and take the necessary actions, such as correctly updating the
> domain state. A FIFO file is passed to `--event-monitor` option of
> cloud-hypervisor. Libvirt creates a new thread that acts as the reader
> of the fifo file and continuously monitors for new events. Currently,
> shutdown events are handled by updating the domain state appropriately.
> 
> Purna Pavan Chandra Aekkaladevi (5):
>   ch: pass --event-monitor option to cloud-hypervisor
>   ch: start a new thread for handling ch events
>   ch: events: Read and parse cloud-hypervisor events
>   ch: events: facilitate lifecycle events handling
>   NEWS: Mention event handling support in ch driver
> 
>  NEWS.rst            |   7 +
>  po/POTFILES         |   1 +
>  src/ch/ch_events.c  | 329 ++++++++++++++++++++++++++++++++++++++++++++
>  src/ch/ch_events.h  |  54 ++++++++
>  src/ch/ch_monitor.c |  52 ++++++-
>  src/ch/ch_monitor.h |  11 ++
>  src/ch/meson.build  |   2 +
>  7 files changed, 449 insertions(+), 7 deletions(-)
>  create mode 100644 src/ch/ch_events.c
>  create mode 100644 src/ch/ch_events.h
> 

Sorry for late review. I was side tracked. But I think we need v4.

Michal
Re: [PATCH v3 0/5] ch: handle events from cloud-hypervisor
Posted by Purna Pavan Chandra Aekkaladevi 7 months, 1 week ago
On Mon, Nov 11, 2024 at 02:36:48PM +0100, Michal Prívozník wrote:
> On 10/23/24 10:02, Purna Pavan Chandra Aekkaladevi wrote:
> > changes from v2->v3:
> > * Remove patch 'utils: Implement virFileIsNamedPipe' as it is no more needed.
> > * Remove the eventmonitorpath only if it exists
> > * Added domain name as a prefix to logs from ch_events.c. This will make
> >   debugging easier.
> > * Simplified event parsing logic by reserving a byte for null char.
> > 
> > changes from v1->v2:
> > 
> > * Rebase on latest master
> > * Use /* */ for comments
> > * Remove fifo file if already exists
> > * Address other comments from Praveen Paladugu
> > 
> > cloud-hypervisor raises various events, including VM lifecylce operations
> > such as boot, shutdown, pause, resume, etc. Libvirt will now read these
> > events and take the necessary actions, such as correctly updating the
> > domain state. A FIFO file is passed to `--event-monitor` option of
> > cloud-hypervisor. Libvirt creates a new thread that acts as the reader
> > of the fifo file and continuously monitors for new events. Currently,
> > shutdown events are handled by updating the domain state appropriately.
> > 
> > Purna Pavan Chandra Aekkaladevi (5):
> >   ch: pass --event-monitor option to cloud-hypervisor
> >   ch: start a new thread for handling ch events
> >   ch: events: Read and parse cloud-hypervisor events
> >   ch: events: facilitate lifecycle events handling
> >   NEWS: Mention event handling support in ch driver
> > 
> >  NEWS.rst            |   7 +
> >  po/POTFILES         |   1 +
> >  src/ch/ch_events.c  | 329 ++++++++++++++++++++++++++++++++++++++++++++
> >  src/ch/ch_events.h  |  54 ++++++++
> >  src/ch/ch_monitor.c |  52 ++++++-
> >  src/ch/ch_monitor.h |  11 ++
> >  src/ch/meson.build  |   2 +
> >  7 files changed, 449 insertions(+), 7 deletions(-)
> >  create mode 100644 src/ch/ch_events.c
> >  create mode 100644 src/ch/ch_events.h
> > 
> 
> Sorry for late review. I was side tracked. But I think we need v4.
> 

Hi Michal,

I was a bit late on this, but I have sent out v4. Please review.

Thanks,
Pavan