- case xAppNotif := <-chXAppNotifications:
- logger.Info("vesmgr: xApp notification")
- logger.Info(string(xAppNotif))
- /*
- * If xapp status query fails then we cannot create
- * a new configuration and kill vespa.
- * In that case we assume that
- * the situation is fixed when the next
- * xapp notif comes
- */
- var err error
- xappStatus, err = queryConf()
- if err == nil {
- killVespa(vesagent.process)
- mystate = vespaTerminatingState
- }
- case err := <-chVesagent:
- switch mystate {
- case vespaTerminatingState:
- logger.Info("Vesagent termination completed")
- createConf(xappStatus)
- startVesagent(chVesagent)
- mystate = normalState
- default:
- logger.Error("Vesagent exited: " + err.Error())
- os.Exit(1)
- }
- case isSubscribed := <-chXAppSubscriptions: