From a8cbb2b02208bf252cb026e8439e41c633772c55 Mon Sep 17 00:00:00 2001 From: Harsh Modi Date: Thu, 30 Mar 2023 22:28:31 +0000 Subject: [PATCH] client: Try to fetch the UUID each boot. previously, we would declare success if the old uuid existed, but there is a possibility that a device has been deleted and re-onboarded, so attempt to actually fetch the UUID and re-register. This allows you to recover an accidently deleted device by rebooting instead of requiring a re-image. Helps with #3109 Signed-off-by: Harsh Modi --- pkg/pillar/cmd/client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/pillar/cmd/client/client.go b/pkg/pillar/cmd/client/client.go index a80772c6a0..6383db7277 100644 --- a/pkg/pillar/cmd/client/client.go +++ b/pkg/pillar/cmd/client/client.go @@ -385,7 +385,7 @@ func Run(ps *pubsub.PubSub, loggerArg *logrus.Logger, logArg *base.LogObject, ar // Unlikely to have a network outage during that // upgrade *and* require an override. if clientCtx.networkState != types.DPCStateSuccess && - clientCtx.operations["getUuid"] && oldUUID != nilUUID { + clientCtx.operations["getUuid"] && gotUUID && oldUUID != nilUUID { log.Noticef("Already have a UUID %s; declaring success", oldUUID.String())