Skip to content

Commit 387dfa0

Browse files
author
Gabriel Monroy
committed
fix(deisctl): optimize platform start order
1 parent a564287 commit 387dfa0

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

deisctl/cmd/cmd.go

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,17 @@ func startDefaultServices(b backend.Backend, wg *sync.WaitGroup, outchan chan st
114114
_errchan := make(chan error)
115115
var _wg sync.WaitGroup
116116

117-
// background start a few services that take a while to download
118-
b.Start([]string{"builder", "registry"}, &_wg, _outchan, _errchan)
119-
120117
outchan <- fmt.Sprintf("Logging subsystem...")
121-
b.Start([]string{"logger", "logspout"}, wg, outchan, errchan)
118+
b.Start([]string{"logger"}, wg, outchan, errchan)
119+
wg.Wait()
120+
b.Start([]string{"logspout"}, wg, outchan, errchan)
122121
wg.Wait()
123122

123+
// start all services in the background
124+
b.Start([]string{"cache", "database", "registry", "controller", "builder",
125+
"publisher", "router@1", "router@2", "router@3"}, &_wg, _outchan, _errchan)
126+
127+
// wait for groups to come up
124128
outchan <- fmt.Sprintf("Storage subsystem...")
125129
b.Start([]string{"store-daemon", "store-monitor", "store-gateway"}, wg, outchan, errchan)
126130
wg.Wait()
@@ -130,13 +134,6 @@ func startDefaultServices(b backend.Backend, wg *sync.WaitGroup, outchan chan st
130134
wg.Wait()
131135

132136
b.Start([]string{"builder"}, wg, outchan, errchan)
133-
134-
// FIXME: the store-gateway will often get hung for unknown reasons
135-
// a restart of store-daemon seems to do the trick, so we add one here during provisioning
136-
b.Stop([]string{"store-daemon"}, &_wg, _outchan, _errchan)
137-
_wg.Wait()
138-
b.Start([]string{"store-daemon"}, &_wg, _outchan, _errchan)
139-
140137
wg.Wait()
141138

142139
outchan <- fmt.Sprintf("Data plane...")

0 commit comments

Comments
 (0)