blob: 91ddf522848dc0cee25a57e0a96031faa8d209dc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Author: arnej
package configserver
import (
"fmt"
"github.com/vespa-engine/vespa/client/go/internal/admin/trace"
"github.com/vespa-engine/vespa/client/go/internal/util"
)
const (
ZOOKEEPER_LOG_FILE_PREFIX = "logs/vespa/zookeeper.configserver"
)
func removeStaleZkLocks(vespaHome string) {
backticks := util.BackTicksIgnoreStderr
cmd := fmt.Sprintf("rm -f '%s/%s'*lck", vespaHome, ZOOKEEPER_LOG_FILE_PREFIX)
trace.Trace("cleaning locks:", cmd)
backticks.Run("/bin/sh", "-c", cmd)
}
|