Skip to content

Commit 2683a49

Browse files
committed
stop listening changes in storage and flist Changes
1 parent 87e059f commit 2683a49

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

pkg/environment/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ type Config struct {
3939
BinRepo string `json:"bin_repo"`
4040
GeoipURLs []string `json:"geoip_urls"`
4141

42-
FlistURL string `json:"flist_url"`
43-
V4FlistURL string `json:"v4_flist_url"`
42+
// FlistURL string `json:"flist_url"`
43+
// V4FlistURL string `json:"v4_flist_url"`
4444

4545
HubURL string `json:"hub_url"`
4646
V4HubURL string `json:"v4_hub_url"`
4747

48-
HubStorage string `json:"hub_storage"`
49-
V4HubStorage string `json:"v4_hub_storage"`
48+
// HubStorage string `json:"hub_storage"`
49+
// V4HubStorage string `json:"v4_hub_storage"`
5050
}
5151

5252
// Merge, updates current config with cfg merging and override config

pkg/environment/environment.go

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -368,14 +368,15 @@ func getEnvironmentFromParams(params kernel.Params) (Environment, error) {
368368
if geoip := config.GeoipURLs; len(geoip) > 0 {
369369
env.GeoipURLs = geoip
370370
}
371-
372-
if flist := config.FlistURL; len(flist) > 0 {
373-
env.FlistURL = flist
374-
}
375-
376-
if storage := config.HubStorage; len(storage) > 0 {
377-
env.HubStorage = storage
378-
}
371+
// flist url and hub urls shouldn't listen to changes in config as long as we can't change it at run time.
372+
// it would cause breakage in vmd that needs a reboot to be recovered.
373+
// if flist := config.FlistURL; len(flist) > 0 {
374+
// env.FlistURL = flist
375+
// }
376+
//
377+
// if storage := config.HubStorage; len(storage) > 0 {
378+
// env.HubStorage = storage
379+
// }
379380

380381
if hub := config.HubURL; len(hub) > 0 {
381382
env.HubURL = hub
@@ -389,14 +390,14 @@ func getEnvironmentFromParams(params kernel.Params) (Environment, error) {
389390
// if the node running v4 chage urls to use v4 hub
390391
if params.IsV4() {
391392
env.FlistURL = defaultV4FlistURL
392-
if flist := config.V4FlistURL; len(flist) > 0 {
393-
env.FlistURL = flist
394-
}
393+
// if flist := config.V4FlistURL; len(flist) > 0 {
394+
// env.FlistURL = flist
395+
// }
395396

396397
env.HubStorage = defaultV4HubStorage
397-
if storage := config.V4HubStorage; len(storage) > 0 {
398-
env.HubStorage = storage
399-
}
398+
// if storage := config.V4HubStorage; len(storage) > 0 {
399+
// env.HubStorage = storage
400+
// }
400401

401402
}
402403

0 commit comments

Comments
 (0)