Skip to content

Commit 67517d3

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

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
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: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ var (
143143
"https://activation.dev.grid.tf/activation/activate",
144144
"https://activation.02.dev.grid.tf/activation/activate",
145145
},
146-
FlistURL: defaultFlistURL,
147146
HubURL: defaultHubURL,
148147
V4HubURL: defaultV4HubURL,
148+
FlistURL: defaultFlistURL,
149149
HubStorage: defaultHubStorage,
150150
BinRepo: "tf-zos-v3-bins.dev",
151151
GraphQL: []string{
@@ -171,9 +171,9 @@ var (
171171
"https://activation.test.grid.tf/activation/activate",
172172
"https://activation.02.test.grid.tf/activation/activate",
173173
},
174-
FlistURL: defaultFlistURL,
175174
HubURL: defaultHubURL,
176175
V4HubURL: defaultV4HubURL,
176+
FlistURL: defaultFlistURL,
177177
HubStorage: defaultHubStorage,
178178
BinRepo: "tf-zos-v3-bins.test",
179179
GraphQL: []string{
@@ -199,9 +199,9 @@ var (
199199
"https://activation.qa.grid.tf/activation/activate",
200200
"https://activation.02.qa.grid.tf/activation/activate",
201201
},
202-
FlistURL: defaultFlistURL,
203202
HubURL: defaultHubURL,
204203
V4HubURL: defaultV4HubURL,
204+
FlistURL: defaultFlistURL,
205205
HubStorage: defaultHubStorage,
206206
BinRepo: "tf-zos-v3-bins.qanet",
207207
GraphQL: []string{
@@ -231,9 +231,9 @@ var (
231231
"https://activation.02.grid.tf/activation/activate",
232232
"https://activation.grid.threefold.me/activation/activate",
233233
},
234-
FlistURL: defaultFlistURL,
235234
HubURL: defaultHubURL,
236235
V4HubURL: defaultV4HubURL,
236+
FlistURL: defaultFlistURL,
237237
HubStorage: defaultHubStorage,
238238
BinRepo: "tf-zos-v3-bins",
239239
GraphQL: []string{
@@ -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)