[health checker] Powercycle devices without serial

This skips trying to use SSH on devices without serial when force
rebooting. This avoid the issue where health checker cannot detect
bringup images, which don't have ssh enabled.

Change-Id: I63ae2955027d380818663fae21204a53302b9a70
diff --git a/cmd/health_checker/main.go b/cmd/health_checker/main.go
index 927c322..bb43a6f 100644
--- a/cmd/health_checker/main.go
+++ b/cmd/health_checker/main.go
@@ -138,8 +138,16 @@
 	if forceReboot {
 		for _, device := range devices {
 			log.Printf("attempting forced device restart for: %s", device.Nodename())
-			if err := device.Restart(ctx); err != nil {
-				log.Printf("forced restart failed with error: %s", err.Error())
+			if device.Serial() == nil {
+				log.Printf("device does not have serial, powercycling")
+				if err := device.Powercycle(ctx); err != nil {
+					log.Printf("powercycle failed: %s", err.Error())
+				}
+			} else {
+				log.Printf("device has serial, restarting")
+				if err := device.Restart(ctx); err != nil {
+					log.Printf("forced restart failed with error: %s", err.Error())
+				}
 			}
 			log.Printf("forced restart for device %s is complete", device.Nodename())
 		}