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

Re: update mechanism for new releases



Sam Varshavchik wrote:
> If the %pre/%post scripts are not atomic, it's impossible.

They don't need to be fully atomic. They just need to be either atomic or
fulfill a generalized idempotence property where running the scriptlet
again after an interrupted run will have the same effect as only the
successful run. (This is stronger than regular idempotence which does not
consider partial runs, only completed transactions, which are interpreted
as mathematical maps (functions). The stronger rule is needed for the
concept of idempotence to make sense for non-atomic operations.) Note that
atomic operations need NOT be idempotent, only those operations which can
be in a "partially completed" state need to support restarts (but setting
the operation as "completed" needs to be part of the atomic scriptlet if
it's not idempotent, otherwise there's a race condition). And of course the
partially completed state needs to be consistent enough for the system to
boot and successfully apply the update and rerun the scriptlet.

        Kevin Kofler


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