Commit a6684c9c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 6cf09f94
...@@ -284,6 +284,9 @@ func TestMasterStorage(t *testing.T) { ...@@ -284,6 +284,9 @@ func TestMasterStorage(t *testing.T) {
// M ready to start: new cluster, no in-progress S recovery // M ready to start: new cluster, no in-progress S recovery
tc.Expect(masterStartReady(M, true)) tc.Expect(masterStartReady(M, true))
err := M.Start()
exc.Raiseif(err)
// XXX M.partTab = ø // XXX M.partTab = ø
// XXX M can start -> writes parttab to S and goes to verification // XXX M can start -> writes parttab to S and goes to verification
...@@ -295,9 +298,6 @@ func TestMasterStorage(t *testing.T) { ...@@ -295,9 +298,6 @@ func TestMasterStorage(t *testing.T) {
// XXX temp // XXX temp
return return
err := M.Start()
exc.Raiseif(err)
// expect: // expect:
// M.clusterState <- VERIFICATION + TODO it should be sent to S // M.clusterState <- VERIFICATION + TODO it should be sent to S
// M -> S .? LockedTransactions{} // M -> S .? LockedTransactions{}
......
...@@ -375,13 +375,13 @@ loop: ...@@ -375,13 +375,13 @@ loop:
if m.partTab.PTid == 0 { if m.partTab.PTid == 0 {
// new cluster - allow startup if we have some storages passed // new cluster - allow startup if we have some storages passed
// recovery and there is no in-progress recovery running // recovery and there is no in-progress recovery running
nok := 0 nup := 0
for _, stor := range m.nodeTab.StorageList() { for _, stor := range m.nodeTab.StorageList() {
if stor.NodeState > neo.DOWN { if stor.NodeState > neo.DOWN {
nok++ nup++
} }
} }
ready = (nok > 0 && inprogress == 0) ready = (nup > 0 && inprogress == 0)
} else { } else {
ready = m.partTab.OperationalWith(m.nodeTab) // XXX + node state ready = m.partTab.OperationalWith(m.nodeTab) // XXX + node state
...@@ -398,6 +398,7 @@ loop: ...@@ -398,6 +398,7 @@ loop:
// if not ok - we just reply not ok // if not ok - we just reply not ok
case ech := <-m.ctlStart: case ech := <-m.ctlStart:
if readyToStart { if readyToStart {
log.Infof(ctx, "start command - we are ready")
// reply "ok to start" after whole recovery finishes // reply "ok to start" after whole recovery finishes
// XXX ok? we want to retrieve all recovery information first? // XXX ok? we want to retrieve all recovery information first?
...@@ -414,6 +415,7 @@ loop: ...@@ -414,6 +415,7 @@ loop:
break loop break loop
} }
log.Infof(ctx, "start command - err - we are not ready")
ech <- fmt.Errorf("start: cluster is non-operational") ech <- fmt.Errorf("start: cluster is non-operational")
case ech := <-m.ctlStop: case ech := <-m.ctlStop:
...@@ -445,11 +447,9 @@ loop: ...@@ -445,11 +447,9 @@ loop:
} }
case <-done: case <-done:
break return err
} }
} }
return err
} }
// storCtlRecovery drives a storage node during cluster recovering state // storCtlRecovery drives a storage node during cluster recovering state
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment