CORD-376 - restart prov in fail case, even if TTL == 0
Change-Id: Id446e562e2e96bdbf3f91c3a306a4d2ff62b463a
diff --git a/switchq/switchq.go b/switchq/switchq.go
index 46e68b7..d637b74 100644
--- a/switchq/switchq.go
+++ b/switchq/switchq.go
@@ -187,9 +187,11 @@
case Failed: // Failed
log.Debugf("device '%s' (%s, %s) failed last provisioning with message '%s', reattempt",
rec.Name, rec.IP, rec.MAC, state.Message)
+ state = nil
default: // Unknown state
log.Debugf("device '%s' (%s, %s) has unknown provisioning state '%d', will provision",
rec.Name, rec.IP, rec.MAC, state.Status)
+ state = nil
}
} else {
log.Debugf("device '%s' (%s, %s) has no provisioning record",