mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-22 23:03:36 +08:00
master: add cluster wide lock/unlock operation in weed shell
fix https://github.com/chrislusf/seaweedfs/issues/1286
This commit is contained in:
@@ -205,6 +205,10 @@ func (ms *MasterServer) startAdminScripts() {
|
||||
filerHostPort := v.GetString("master.filer.default")
|
||||
|
||||
scriptLines := strings.Split(adminScripts, "\n")
|
||||
if !strings.Contains(adminScripts, "lock") {
|
||||
scriptLines = append(append([]string{}, "lock"), scriptLines...)
|
||||
scriptLines = append(scriptLines, "unlock")
|
||||
}
|
||||
|
||||
masterAddress := "localhost:" + strconv.Itoa(ms.option.Port)
|
||||
|
||||
|
Reference in New Issue
Block a user