• Leigh B Stoller's avatar
    CM changes to termination and panic. · 937d633f
    Leigh B Stoller authored
    * For termination, added a flag to the slice that marks it for
      termination. DeleteSlice sets this if the slice is
      "busy" (start,restart,reload) and the "cancel" flag is provided.  We
      also mark the underlying experiment as canceled, to stop ossetup and
      osload early. We then wait for "busy" to clear, and then kill the
      slice. The new termination flag in the slice is used by the expire
      daemon, in case our wait loop dies early (say, boss reboot), we can
      catch the the termination there instead.
    * Panic gets essentially the same changes as termination, except of
      course instead of terminating, we put the underlying experiment into
      panic mode.
    Note that we still need to be able to lock the slice to do either
    termination or panic, and so the caller has to be able to deal with
    retrying if they get back a busy response. In general, we do not lock
    slices for very long except during reload and restart, I am still
    working on dropping the lock during those (like we already do for
    Start). Disk imaging is another place we currently need to wait for,
    that needs to be worked on as well.
GeniCMV2.pm.in 190 KB