Skip to content

Commit

Permalink
run tail to avoid extra logs
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob kumar saha <[email protected]>
  • Loading branch information
ArnobKumarSaha committed Sep 22, 2023
1 parent 07c6d61 commit 9d2b1cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,12 @@ func lockConfigServer(configSVRDSN, secondaryHost string) error {
klog.Errorf("Error while running findAndModify to lock configServer : %s ; output : %s \n", err.Error(), output)
return err
}
s := fmt.Sprintf(`/bin/echo '%s' | /usr/bin/tail -1`, strings.TrimSuffix(string(output), "\n"))
output, err = sh.Command("/bin/sh", "-c", s).Output()
if err != nil {
klog.Errorf("Error while running tail in findAndModify to lock configServer : %s ; output : %s \n", err.Error(), output)
return err
}

err = json.Unmarshal(output, &v)
if err != nil {
Expand Down

0 comments on commit 9d2b1cf

Please sign in to comment.