recovery: honor canceled datastore preflight
This commit is contained in:
parent
e9d95c3bd6
commit
bbcf285514
@ -135,6 +135,10 @@ func isTimeSynced(raw string) bool {
|
||||
// Signature: (o *Orchestrator) preflightExternalDatastore(ctx context.Context) error.
|
||||
// Why: keeps behavior explicit so startup/shutdown workflows remain maintainable as services evolve.
|
||||
func (o *Orchestrator) preflightExternalDatastore(ctx context.Context) error {
|
||||
// Cancellation must win even when a local datastore is already reachable.
|
||||
if err := ctx.Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
if len(o.cfg.ControlPlanes) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -359,6 +359,8 @@ func TestHookVaultLifecycleBranchMatrix(t *testing.T) {
|
||||
cfgFail.Startup.RequireFluxHealth = false
|
||||
cfgFail.Startup.RequireWorkloadConvergence = false
|
||||
cfgFail.Startup.RequireCriticalServiceEndpoints = true
|
||||
cfgFail.Startup.CriticalServiceEndpointWaitSec = 1
|
||||
cfgFail.Startup.CriticalServiceEndpointPollSec = 1
|
||||
run := func(ctx context.Context, timeout time.Duration, name string, args ...string) (string, error) {
|
||||
command := name + " " + strings.Join(args, " ")
|
||||
if name == "kubectl" && strings.Contains(command, "get endpoints") {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user