|
|
|
|
@ -766,14 +766,16 @@ namespace {
|
|
|
|
|
&& CloudJob::where('instance_id', $backlog->id)->where('kind', 'network_resume')->count() === 1,
|
|
|
|
|
'Current-period activation did not produce exactly one network restore.');
|
|
|
|
|
|
|
|
|
|
// Lost-response action/delete jobs can remain uncertain forever because
|
|
|
|
|
// they are not safely replayable. They must not grant free networking by
|
|
|
|
|
// blocking expiry link-down. Replayable and target-state policy
|
|
|
|
|
// uncertainty must still serialize against a duplicate operation.
|
|
|
|
|
// A lost-response action may not block expiry policy because it changes no
|
|
|
|
|
// resource ownership. A lost destructive delete must block every later
|
|
|
|
|
// mutation until that original operation identifier is reconciled.
|
|
|
|
|
$nonReplayable = $makeInstance('77777777-7777-4777-8777-777777777777',
|
|
|
|
|
'non-replayable-uncertain', $now - 1);
|
|
|
|
|
$makeJob($nonReplayable, 'action');
|
|
|
|
|
$makeJob($nonReplayable, 'delete');
|
|
|
|
|
|
|
|
|
|
$uncertainDelete = $makeInstance('7a7a7a7a-7a7a-4a7a-8a7a-7a7a7a7a7a7a',
|
|
|
|
|
'uncertain-delete', $now - 1);
|
|
|
|
|
$makeJob($uncertainDelete, 'delete');
|
|
|
|
|
|
|
|
|
|
$replayable = $makeInstance('88888888-8888-4888-8888-888888888888',
|
|
|
|
|
'replayable-uncertain', $now - 1);
|
|
|
|
|
@ -794,6 +796,7 @@ namespace {
|
|
|
|
|
|
|
|
|
|
$lifecycle->tick(100);
|
|
|
|
|
$nonReplayable->refresh();
|
|
|
|
|
$uncertainDelete->refresh();
|
|
|
|
|
$replayable->refresh();
|
|
|
|
|
$policyPending->refresh();
|
|
|
|
|
$legacyStoppedRunning->refresh();
|
|
|
|
|
@ -804,7 +807,11 @@ namespace {
|
|
|
|
|
->where('kind', 'network_suspend')->count() === 1
|
|
|
|
|
&& CloudJob::where('instance_id', $nonReplayable->id)
|
|
|
|
|
->where('kind', 'service_suspend')->count() === 0,
|
|
|
|
|
'Permanent uncertain action/delete jobs blocked expiry network suspension.');
|
|
|
|
|
'Permanent uncertain action job blocked expiry network suspension.');
|
|
|
|
|
$assert($uncertainDelete->service_status === 'active'
|
|
|
|
|
&& $uncertainDelete->network_status === 'active'
|
|
|
|
|
&& CloudJob::where('instance_id', $uncertainDelete->id)->count() === 1,
|
|
|
|
|
'An uncertain destructive delete did not serialize lifecycle policy.');
|
|
|
|
|
$assert($replayable->service_status === 'expired_grace'
|
|
|
|
|
&& $replayable->network_status === 'blocking_expired'
|
|
|
|
|
&& CloudJob::where('instance_id', $replayable->id)
|
|
|
|
|
|