Skip to content

Commit b38a8bf

Browse files
committed
types: remove 'StaleConfigTime' from config maps
The stale config time is deprecated, so remove it. Signed-off-by: Roman Penyaev <[email protected]>
1 parent 86596c4 commit b38a8bf

File tree

4 files changed

+0
-20
lines changed

4 files changed

+0
-20
lines changed

docs/CONFIG-PROPERTIES.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
| timer.reboot.no.network | integer in seconds | 7 days | reboot after no cloud connectivity |
1515
| timer.update.fallback.no.network | integer in seconds | 300 | fallback after no cloud connectivity |
1616
| timer.test.baseimage.update | integer in seconds | 600 | commit to update |
17-
| timer.use.config.checkpoint | integer in seconds | 600 | use checkpointed config if no cloud connectivity |
1817
| timer.gc.vdisk | integer in seconds | 1 hour | garbage collect unused instance virtual disk |
1918
| timer.defer.content.delete | integer in seconds | zero | if set, keep content trees around for reuse after they have been deleted |
2019
| timer.download.retry | integer in seconds | 600 | retry a failed download |

pkg/pillar/types/global.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,6 @@ const (
166166
FallbackIfCloudGoneTime GlobalSettingKey = "timer.update.fallback.no.network"
167167
// MintimeUpdateSuccess global setting key
168168
MintimeUpdateSuccess GlobalSettingKey = "timer.test.baseimage.update"
169-
// StaleConfigTime global setting key
170-
// DEPRECATED! Saved config never expires!
171-
StaleConfigTime GlobalSettingKey = "timer.use.config.checkpoint"
172169
// VdiskGCTime global setting key
173170
VdiskGCTime GlobalSettingKey = "timer.gc.vdisk"
174171
// DeferContentDelete global setting key
@@ -790,8 +787,6 @@ func NewConfigItemSpecMap() ConfigItemSpecMap {
790787
configItemSpecMap.AddIntItem(ResetIfCloudGoneTime, 7*24*3600, 120, 0xFFFFFFFF)
791788
configItemSpecMap.AddIntItem(FallbackIfCloudGoneTime, 300, 60, 0xFFFFFFFF)
792789
configItemSpecMap.AddIntItem(MintimeUpdateSuccess, 600, 30, HourInSec)
793-
// DEPRECATED
794-
configItemSpecMap.AddIntItem(StaleConfigTime, 7*24*3600, 0, 0xFFFFFFFF)
795790
configItemSpecMap.AddIntItem(VdiskGCTime, 3600, 60, 0xFFFFFFFF)
796791
configItemSpecMap.AddIntItem(DeferContentDelete, 0, 0, 24*3600)
797792
configItemSpecMap.AddIntItem(DownloadRetryTime, 600, 60, 0xFFFFFFFF)

pkg/pillar/types/global_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ func TestNewConfigItemSpecMap(t *testing.T) {
155155
ResetIfCloudGoneTime,
156156
FallbackIfCloudGoneTime,
157157
MintimeUpdateSuccess,
158-
StaleConfigTime,
159158
VdiskGCTime,
160159
DeferContentDelete,
161160
DownloadRetryTime,

pkg/pillar/types/globalconfigold.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ type OldGlobalConfig struct {
1818
ResetIfCloudGoneTime uint32 // reboot if no cloud connectivity
1919
FallbackIfCloudGoneTime uint32 // ... and shorter during update
2020
MintimeUpdateSuccess uint32 // time before zedagent declares success
21-
StaleConfigTime uint32 // On reboot use saved config if not stale
2221
DownloadGCTime uint32 // Garbage collect if no use
2322
VdiskGCTime uint32 // Garbage collect RW disk if no use
2423

@@ -107,7 +106,6 @@ var globalConfigDefaults = OldGlobalConfig{
107106
UsbAccess: true, // Controller likely to default to false
108107
SshAccess: true, // Controller likely to default to false
109108
SshAuthorizedKeys: "",
110-
StaleConfigTime: 600, // DEPRECATED!
111109
DownloadGCTime: 600, // 10 minutes
112110
VdiskGCTime: 3600, // 1 hour
113111
DownloadRetryTime: 600, // 10 minutes
@@ -165,9 +163,6 @@ func ApplyDefaults(newgc OldGlobalConfig) OldGlobalConfig {
165163
if newgc.NetworkSendTimeout == 0 {
166164
newgc.NetworkSendTimeout = globalConfigDefaults.NetworkSendTimeout
167165
}
168-
if newgc.StaleConfigTime == 0 {
169-
newgc.StaleConfigTime = globalConfigDefaults.StaleConfigTime
170-
}
171166
if newgc.DownloadGCTime == 0 {
172167
newgc.DownloadGCTime = globalConfigDefaults.DownloadGCTime
173168
}
@@ -211,7 +206,6 @@ var GlobalConfigMinimums = OldGlobalConfig{
211206
NetworkTestInterval: 300, // 5 minutes
212207
NetworkTestBetterInterval: 0, // Disabled
213208

214-
StaleConfigTime: 0, // Don't use stale config
215209
DownloadGCTime: 60,
216210
VdiskGCTime: 60,
217211
DownloadRetryTime: 60,
@@ -269,12 +263,6 @@ func EnforceGlobalConfigMinimums(newgc OldGlobalConfig) OldGlobalConfig {
269263
newgc.NetworkTestBetterInterval, GlobalConfigMinimums.NetworkTestBetterInterval)
270264
newgc.NetworkTestBetterInterval = GlobalConfigMinimums.NetworkTestBetterInterval
271265
}
272-
273-
if newgc.StaleConfigTime < GlobalConfigMinimums.StaleConfigTime {
274-
logrus.Warnf("Enforce minimum StaleConfigTime received %d; using %d",
275-
newgc.StaleConfigTime, GlobalConfigMinimums.StaleConfigTime)
276-
newgc.StaleConfigTime = GlobalConfigMinimums.StaleConfigTime
277-
}
278266
if newgc.DownloadGCTime < GlobalConfigMinimums.DownloadGCTime {
279267
logrus.Warnf("Enforce minimum DownloadGCTime received %d; using %d",
280268
newgc.DownloadGCTime, GlobalConfigMinimums.DownloadGCTime)
@@ -311,7 +299,6 @@ func (config OldGlobalConfig) MoveBetweenConfigs() *ConfigItemValueMap {
311299
newConfig.SetGlobalValueInt(ResetIfCloudGoneTime, config.ResetIfCloudGoneTime)
312300
newConfig.SetGlobalValueInt(FallbackIfCloudGoneTime, config.FallbackIfCloudGoneTime)
313301
newConfig.SetGlobalValueInt(MintimeUpdateSuccess, config.MintimeUpdateSuccess)
314-
newConfig.SetGlobalValueInt(StaleConfigTime, config.StaleConfigTime)
315302
newConfig.SetGlobalValueInt(VdiskGCTime, config.VdiskGCTime)
316303
newConfig.SetGlobalValueInt(DownloadRetryTime, config.DownloadRetryTime)
317304
newConfig.SetGlobalValueInt(DomainBootRetryTime, config.DomainBootRetryTime)

0 commit comments

Comments
 (0)