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,
|
||||
neInfo.Ip, config.GetYamlConfig().NE.ScpDir)
|
||||
cmd := exec.Command("scp", "-r", srcFile, scpDir)
|
||||
out, err := cmd.CombinedOutput()
|
||||
log.Debugf("Exec output: %v", string(out))
|
||||
_, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Errorf("Faile to scp NF: neType=%s, neId=%s, ip=%s", neType, neId, neInfo.Ip)
|
||||
services.ResponseInternalServerError500ProcessError(w, err)
|
||||
@@ -714,11 +713,11 @@ func ActiveSoftwareToNF(w http.ResponseWriter, r *http.Request) {
|
||||
if config.GetYamlConfig().NE.DpkgOverwrite {
|
||||
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)
|
||||
err = RunSSHCmd(sshHost, dpkgCmd)
|
||||
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)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user