Skip to content

Commit

Permalink
client: Try to fetch the UUID each boot.
Browse files Browse the repository at this point in the history
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 lf-edge#3109

Signed-off-by: Harsh Modi <hmodi@aviatrix.com>
  • Loading branch information
DolceTriade committed Mar 30, 2023
1 parent 6125949 commit a8cbb2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/pillar/cmd/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit a8cbb2b

Please sign in to comment.