online state
This commit is contained in:
@@ -771,7 +771,7 @@ func PostNeServiceAction(w http.ResponseWriter, r *http.Request) {
|
||||
// neInfo := new(dborm.NeInfo)
|
||||
neInfo, err := dborm.XormGetNeInfo(neType, neId)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to get ne_info:", err)
|
||||
log.Error("Failed to get ne_info:", err)
|
||||
services.ResponseInternalServerError500DatabaseOperationFailed(w)
|
||||
return
|
||||
}
|
||||
@@ -785,7 +785,7 @@ func PostNeServiceAction(w http.ResponseWriter, r *http.Request) {
|
||||
out, err := cmd.CombinedOutput()
|
||||
log.Debugf("Exec output: %v", string(out))
|
||||
if err != nil {
|
||||
log.Error("Faile to execute ssh %s omc:", action, err)
|
||||
log.Errorf("Faile to execute ssh %s omc:%v", action, err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
}
|
||||
@@ -797,7 +797,7 @@ func PostNeServiceAction(w http.ResponseWriter, r *http.Request) {
|
||||
out, err := cmd.CombinedOutput()
|
||||
log.Debugf("Exec output: %v", string(out))
|
||||
if err != nil {
|
||||
log.Error("Faile to execute ssh sudo ims-%s command:", action, err)
|
||||
log.Errorf("Faile to execute %s command:%v", actionCmd, err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
}
|
||||
@@ -807,13 +807,13 @@ func PostNeServiceAction(w http.ResponseWriter, r *http.Request) {
|
||||
out, err := cmd.CombinedOutput()
|
||||
log.Debugf("Exec output: %v", string(out))
|
||||
if err != nil {
|
||||
log.Error("Faile to execute ssh sudo ims-%s command:", action, err)
|
||||
log.Errorf("Faile to execute %s command:%v", actionCmd, err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
}
|
||||
default:
|
||||
err = global.ErrCMUnknownServiceAction
|
||||
log.Error("%v, action:%s", err, action)
|
||||
log.Errorf("%v, action:%s", err, action)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
}
|
||||
@@ -823,11 +823,10 @@ func PostNeServiceAction(w http.ResponseWriter, r *http.Request) {
|
||||
out, err := cmd.CombinedOutput()
|
||||
log.Debugf("Exec output: %v", string(out))
|
||||
if err != nil {
|
||||
log.Error("Faile to execute ssh sudo systemctl command:", err)
|
||||
log.Error("Faile to execute command:", err)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
services.ResponseStatusOK204NoContent(w)
|
||||
@@ -898,7 +897,7 @@ func PostNeInstanceAction(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
default:
|
||||
err = global.ErrCMUnknownInstanceAction
|
||||
log.Error("%v, action:%s", err, action)
|
||||
log.Errorf("%v, action:%s", err, action)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user