While in a multicomponent live update that includes RS, the new RS
instance may receive heartbeat replies which, after a rollback, the
old RS instance will then never see. As a result, the rolled-back
RS instance may end up killing well-behaving services.
Change-Id: I0f0af283c33502d5d55b27e353b62aec2e301285
void rollback_service(struct rproc **new_rpp, struct rproc **old_rpp)
{
/* Rollback an updated service. */
+ struct rproc *rp;
int r = OK;
/* RS is special, we may only need to swap the slots to rollback. */
if(rs_verbose)
printf("RS: %s performed rollback\n", srv_to_string(*new_rpp));
}
+ /* Since we may now have missed heartbeat replies, resend requests. */
+ for (rp = BEG_RPROC_ADDR; rp < END_RPROC_ADDR; rp++)
+ if (rp->r_flags & RS_ACTIVE)
+ rp->r_check_tm = 0;
}
else {
int swap_flag = ((*new_rpp)->r_flags & RS_INIT_PENDING ? RS_DONTSWAP : RS_SWAP);