Skip to content

Commit f3489c3

Browse files
author
Gabriel Monroy
committed
Merge pull request #2834 from carmstrong/fix-cache_before_registry
fix(registry): use empty strings and not nil in config
2 parents 579748b + 70e92f2 commit f3489c3

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

deisctl/cmd/cmd.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,11 @@ func startDefaultServices(b backend.Backend, wg *sync.WaitGroup, outchan chan st
184184
wg.Wait()
185185

186186
// optimization: start all remaining services in the background
187+
// cache is a special case because it must start before registry
188+
b.Start([]string{"cache"}, &_wg, _outchan, _errchan)
189+
wg.Wait()
187190
b.Start([]string{
188-
"cache", "database", "registry@1", "controller", "builder",
191+
"database", "registry@1", "controller", "builder",
189192
"publisher", "router@1", "router@2", "router@3"},
190193
&_wg, _outchan, _errchan)
191194

@@ -269,7 +272,9 @@ func stopDefaultServices(b backend.Backend, wg *sync.WaitGroup, outchan chan str
269272
wg.Wait()
270273

271274
outchan <- fmt.Sprintf("Control plane...")
272-
b.Stop([]string{"controller", "builder", "cache", "database", "registry@1"}, wg, outchan, errchan)
275+
b.Stop([]string{"controller", "builder", "database", "registry@1"}, wg, outchan, errchan)
276+
wg.Wait()
277+
b.Stop([]string{"cache"}, wg, outchan, errchan)
273278
wg.Wait()
274279

275280
outchan <- fmt.Sprintf("Logging subsystem...")

registry/templates/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ common: &common
2626
tags_cache_ttl: _env:MIRROR_TAGS_CACHE_TTL:172800 # seconds
2727

2828
cache:
29-
host: {{ or (.deis_cache_host) "~" }}
30-
port: {{ or (.deis_cache_port) "~" }}
29+
host: {{ or (.deis_cache_host) "" }}
30+
port: {{ or (.deis_cache_port) "" }}
3131
password: _env:CACHE_REDIS_PASSWORD
3232
db: 1
3333

3434
# Enabling LRU cache for small files
3535
# This speeds up read/write on small files
3636
# when using a remote storage backend (like S3).
3737
cache_lru:
38-
host: {{ or (.deis_cache_host) "~" }}
39-
port: {{ or (.deis_cache_port) "~" }}
38+
host: {{ or (.deis_cache_host) "" }}
39+
port: {{ or (.deis_cache_port) "" }}
4040
password: _env:CACHE_LRU_REDIS_PASSWORD
4141
db: 2
4242

0 commit comments

Comments
 (0)