From 1013b4fe4797058500b08ae32aac4140ccdfd922 Mon Sep 17 00:00:00 2001 From: Daniel Bennett Date: Fri, 6 Dec 2024 17:21:14 -0500 Subject: [PATCH] gee wiz, the damage an extra 50s load time can do --- client/hostvolumemanager/volume_fingerprint.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/hostvolumemanager/volume_fingerprint.go b/client/hostvolumemanager/volume_fingerprint.go index f16aa6125ba..37b0c84fbfb 100644 --- a/client/hostvolumemanager/volume_fingerprint.go +++ b/client/hostvolumemanager/volume_fingerprint.go @@ -42,6 +42,11 @@ func UpdateVolumeMap(volumes VolumeMap, name string, vol *structs.ClientHostVolu // WaitForFirstFingerprint implements client.FingerprintingPluginManager func (hvm *HostVolumeManager) WaitForFirstFingerprint(ctx context.Context) <-chan struct{} { + // the fingerprint manager puts batchFirstFingerprintsTimeout (50 seconds) + // on the context that it sends to us here so we don't need another + // timeout. we just need to cancel to report when we are done. + ctx, cancel := context.WithCancel(ctx) + defer cancel() volumes, err := hvm.restoreFromState(ctx) if err != nil { hvm.log.Error("failed to restore state", "error", err)