Add debug output when dealing with a server that is being restarted

This commit is contained in:
Dane Everitt 2019-11-24 21:40:25 -08:00
parent b3de4705ae
commit 3663a8fb31
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -109,6 +109,11 @@ func main() {
// If the server is not in a running state right now but according to the configuration it
// should be, we want to go ahead and restart the instance.
if s.State == server.ProcessRunningState || s.State == server.ProcessStartingState {
zap.S().Infow(
"server state does not match last recorded state in configuration, starting instance now",
zap.String("server", s.Uuid),
)
if err := s.Environment.Start(); err != nil {
zap.S().Warnw(
"failed to put server instance back in running state",