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
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
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
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
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
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
© 2016 - 2025 Red Hat, Inc.