[Libvirt-cim] [PATCH v3 0/2] [WIP] Make Shutdown and Reboot state changes jobs

Eduardo Lima (Etrunko) eblima at linux.vnet.ibm.com
Wed Jun 27 18:58:00 UTC 2012


From: "Eduardo Lima (Etrunko)" <eblima at br.ibm.com>

This code is based on the VSMigrationService for the job creation and on
ComputerSystemIndication for the job thread, which will listen for the
respective domain event to mark the job as finished.

Good news here is that the 'Error 100' problem does not happen anymore. I found
it to be an issue with SELinux. By disabling it, that error code will never
happen again.

Now the problem is a random crash happening on the state_change thread, whenever
calls to set properties on the job instance are placed. Looks very likely to be
an issue on the tog-pegasus side, unless I am doing something very wrong in this
case. Would be nice to have some advice from tog-pegasus experts. :)

Differences from v2:

 - Back again with the first set of patches, removing the intermediate patch to
   deal specifically with shutdown.
 - Improve some log messages.
 - More detailed states of the job instance (NEW, STARTING, RUNNING, COMPLETED,
   EXCEPTION, etc).
 - Move event loop registration outside the state_change thread.
 - Better error handling on the state_change thread.

Differences from v1:

 - Fix conditional causing Reqstate not being set
 - Fix domain event id for shutdown
 - Now instead of using the domain events for both shutdown and reboot, there is
   an intermediate patch, that will deal with the shutdown case by polling for
   the domain state until it reflects the desired state.

   This workaround won't work for the reboot case, because is is not possible to
   monitor the reboot event if not using the domain event callbacks. The third
   patch of the series contains the complete solution for both cases.

Eduardo Lima (Etrunko) (2):
  VSMigrationService: Move job state definitions to svpc_types.h
  ComputerSystem: Reboot/Shutdown state changes as jobs

 schema/ComputerSystem.mof     |    9 ++
 src/Virt_ComputerSystem.c     |  326 +++++++++++++++++++++++++++++++++++++++--
 src/Virt_VSMigrationService.c |   14 +-
 src/svpc_types.h              |   13 ++
 4 files changed, 343 insertions(+), 19 deletions(-)

-- 
1.7.10.4




More information about the Libvirt-cim mailing list