fix: log level and dpkg ims package issue
This commit is contained in:
@@ -703,8 +703,7 @@ func ActiveSoftwareToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
scpDir := fmt.Sprintf("%s@%s:%s", config.GetYamlConfig().NE.User,
|
scpDir := fmt.Sprintf("%s@%s:%s", config.GetYamlConfig().NE.User,
|
||||||
neInfo.Ip, config.GetYamlConfig().NE.ScpDir)
|
neInfo.Ip, config.GetYamlConfig().NE.ScpDir)
|
||||||
cmd := exec.Command("scp", "-r", srcFile, scpDir)
|
cmd := exec.Command("scp", "-r", srcFile, scpDir)
|
||||||
out, err := cmd.CombinedOutput()
|
_, err := cmd.CombinedOutput()
|
||||||
log.Debugf("Exec output: %v", string(out))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Faile to scp NF: neType=%s, neId=%s, ip=%s", neType, neId, neInfo.Ip)
|
log.Errorf("Faile to scp NF: neType=%s, neId=%s, ip=%s", neType, neId, neInfo.Ip)
|
||||||
services.ResponseInternalServerError500ProcessError(w, err)
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
@@ -714,11 +713,11 @@ func ActiveSoftwareToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
if config.GetYamlConfig().NE.DpkgOverwrite {
|
if config.GetYamlConfig().NE.DpkgOverwrite {
|
||||||
inputStr = "y"
|
inputStr = "y"
|
||||||
}
|
}
|
||||||
dpkgCmd := fmt.Sprintf("sudo %s/spawdpkg.sh %s '%s'",
|
dpkgCmd := fmt.Sprintf("sudo %s/spawndpkg.sh %s '%s'",
|
||||||
config.GetYamlConfig().NE.ScpDir, inputStr, filePath)
|
config.GetYamlConfig().NE.ScpDir, inputStr, filePath)
|
||||||
err = RunSSHCmd(sshHost, dpkgCmd)
|
err = RunSSHCmd(sshHost, dpkgCmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Faile to execute dpkg command:", err)
|
log.Errorf("Faile to execute dpkg command: %s, error: %v", dpkgCmd, err)
|
||||||
services.ResponseInternalServerError500ProcessError(w, err)
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ func PostKPIReportFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
services.ResponseNotFound404UriNotExist(w, r)
|
services.ResponseNotFound404UriNotExist(w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Debug("Request body:", string(body))
|
log.Trace("Request body:", string(body))
|
||||||
kpiReport := new(KpiReport)
|
kpiReport := new(KpiReport)
|
||||||
_ = json.Unmarshal(body, &kpiReport)
|
_ = json.Unmarshal(body, &kpiReport)
|
||||||
log.Debug("kpiReport:", kpiReport)
|
log.Debug("kpiReport:", kpiReport)
|
||||||
|
|||||||
Reference in New Issue
Block a user