Re: [Xen-devel] [PATCH V2] libxl: Set path to console on domain startup.

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

 



Anthony PERARD writes ("Re: [Xen-devel] [PATCH V2] libxl: Set path to console on domain startup."):
> On Tue, Dec 16, 2014 at 09:30:28AM +0000, Ian Campbell wrote:
> > Unless by "not running" you meant bottlenecked or not keeping up
> > perhaps.
> 
> Well, I did meant no xenconsoled process. But after, I also tried `kill
> -STOP`, but the same things is happening.

I think this is a bug.  I imagine that you can cause `xl create -c' to
malfunction too.

> > > Or, should I set the callback to NULL and have the
> > > domain_create_console_available event sent through
> > > the callback set by libxl_event_register_callbacks()?
> > 
> > That would make sense, except I don't see libxl_evdisable_foo for these
> > events, so I'm not sure it is possible.
> 
> Well, the domain_create_console_available event is report by
> libxl__ao_progress_report which will either callback() or call
> libxl__event_occurred(). So does not seams better to set callback to
> NULL.

The console available notification is only available via the ao
progress mechanism.  So you have to pass a non-NULL aop_console_how,
and the notification will always be generated during the create.

Your options for having the notification delivered are:

I. aop_console_how->callback != NULL:

   libxl will call
     aop_console_how->callback(aop_console_how->for_callback)

II. aop_console_how->callback == NULL:

   libxl will construct an libxl_event *event with
      event->domid = the domid of the domain being constructed
      event->domuuid = its uuid
      event->for_user = aop_console_how->for_event
      event->type = LIBXL_EVENT_TYPE_DOMAIN_CREATE_CONSOLE_AVAILABLE

    What happens to that event depends on whether and how
    libxl_event_register_callbacks has been called.

II(a): If libxl_event_register_callbacks(,hooks,user) was called
   and also the bit is set ie
     !!(hooks->event_occurs_mask
      & (1UL << LIBXL_EVENT_TYPE_DOMAIN_CREATE_CONSOLE_AVAILABLE)):

   libxl will call
      hooks->event_occurs(user,event)

II(b): If libxl_event_register_callbacks(,hooks,user) was NOT called
   or if the bit is clear:

   libxl will queue the event for retrieval by libxl_event_check
   or libxl_event-wait.  (And if the application doesn't call those,
   the application will never be notified; the event will be
   retained until the libxl ctx is destroyed and then discarded.)

I mention all of these for completeness, and for future reference for
anyone reading the archives later.

In libxl you want option I.

Ian.

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]