• J
    blockjobs: add waiting status · e8af5686
    John Snow 提交于
    For jobs that are stuck waiting on others in a transaction, it would
    be nice to know that they are no longer "running" in that sense, but
    instead are waiting on other jobs in the transaction.
    
    Jobs that are "waiting" in this sense cannot be meaningfully altered
    any longer as they have left their running loop. The only meaningful
    user verb for jobs in this state is "cancel," which will cancel the
    whole transaction, too.
    
    Transitions:
    Running -> Waiting:   Normal transition.
    Ready   -> Waiting:   Normal transition.
    Waiting -> Aborting:  Transactional cancellation.
    Waiting -> Concluded: Normal transition.
    
    Removed Transitions:
    Running -> Concluded: Jobs must go to WAITING first.
    Ready   -> Concluded: Jobs must go to WAITING first.
    
    Verbs:
    Cancel: Can be applied to WAITING jobs.
    
                 +---------+
                 |UNDEFINED|
                 +--+------+
                    |
                 +--v----+
       +---------+CREATED+-----------------+
       |         +--+----+                 |
       |            |                      |
       |         +--v----+     +------+    |
       +---------+RUNNING<----->PAUSED|    |
       |         +--+-+--+     +------+    |
       |            | |                    |
       |            | +------------------+ |
       |            |                    | |
       |         +--v--+       +-------+ | |
       +---------+READY<------->STANDBY| | |
       |         +--+--+       +-------+ | |
       |            |                    | |
       |         +--v----+               | |
       +---------+WAITING<---------------+ |
       |         +--+----+                 |
       |            |                      |
    +--v-----+   +--v------+               |
    |ABORTING+--->CONCLUDED|               |
    +--------+   +--+------+               |
                    |                      |
                 +--v-+                    |
                 |NULL<--------------------+
                 +----+
    Signed-off-by: NJohn Snow <jsnow@redhat.com>
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    e8af5686
block-core.json 138.1 KB