Skip to content

Commit b703eb2

Browse files
committed
global params: rename LogRemainToSendMBytes
Since not all logs in persist are to be sent, we rename LogRemainToSendMBytes to MaxGzipLogMBytesInPersist. This parameter represents the maxinum size of all gzipped logs in persist. Signed-off-by: Paul Gaiduk <[email protected]>
1 parent 8be247a commit b703eb2

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

pkg/pillar/cmd/volumemgr/sizemgmt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func getRemainingDiskSpace(ctxPtr *volumemgrContext) (uint64, error) {
8585
// Everything in /persist except these directories/datasets counts
8686
// as EVE overhead.
8787
// Note that we also exclude /persist/newlog here since it maintains its own
88-
// size limit (GlobalValueInt(types.LogRemainToSendMBytes)) the caller
88+
// size limit (GlobalValueInt(types.MaxGzipLogMBytesInPersist)) the caller
8989
// needs to consider as EVE overhead.
9090
var excludeDirs = append(types.AppPersistPaths, types.NewlogDir)
9191

pkg/pillar/diskmetrics/usage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ func Dom0DiskReservedSize(log *base.LogObject, globalConfig *types.ConfigItemVal
204204
(float64(dom0MinDiskUsagePercent) * 0.01))
205205
staticMaxDom0DiskSize := uint64(globalConfig.GlobalValueInt(
206206
types.Dom0DiskUsageMaxBytes))
207-
newlogReserved := uint64(globalConfig.GlobalValueInt(types.LogRemainToSendMBytes))
207+
newlogReserved := uint64(globalConfig.GlobalValueInt(types.MaxGzipLogMBytesInPersist))
208208
// Always leave space for /persist/newlogd
209209
maxDom0DiskSize := newlogReserved
210210
// Select the larger of the current overhead usage and the configured

pkg/pillar/types/global.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ const (
209209
AppContainerStatsInterval GlobalSettingKey = "timer.appcontainer.stats.interval"
210210
// VaultReadyCutOffTime global setting key
211211
VaultReadyCutOffTime GlobalSettingKey = "timer.vault.ready.cutoff"
212-
// LogRemainToSendMBytes Max gzip log files remain on device to be sent in Mbytes
213-
LogRemainToSendMBytes GlobalSettingKey = "newlog.gzipfiles.ondisk.maxmegabytes"
212+
// MaxGzipLogMBytesInPersist Max size of gzip log files in persist in Mbytes
213+
MaxGzipLogMBytesInPersist GlobalSettingKey = "newlog.gzipfiles.ondisk.maxmegabytes"
214214

215215
// ForceFallbackCounter global setting key
216216
ForceFallbackCounter = "force.fallback.counter"
@@ -960,8 +960,8 @@ func NewConfigItemSpecMap() ConfigItemSpecMap {
960960
eveMemoryLimitInMiB, 0xFFFFFFFF)
961961
// Limit manual vmm overhead override to 1 PiB
962962
configItemSpecMap.AddIntItem(VmmMemoryLimitInMiB, 0, 0, uint32(1024*1024*1024))
963-
// LogRemainToSendMBytes - Default is 2 Gbytes, minimum is 10 Mbytes
964-
configItemSpecMap.AddIntItem(LogRemainToSendMBytes, 2048, 10, 0xFFFFFFFF)
963+
// MaxGzipLogMBytesInPersist - Default is 2 Gbytes, minimum is 10 Mbytes
964+
configItemSpecMap.AddIntItem(MaxGzipLogMBytesInPersist, 2048, 10, 0xFFFFFFFF)
965965
configItemSpecMap.AddIntItem(DownloadMaxPortCost, 0, 0, 255)
966966
configItemSpecMap.AddIntItem(BlobDownloadMaxRetries, 5, 1, 10)
967967

pkg/pillar/types/global_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func TestNewConfigItemSpecMap(t *testing.T) {
175175
Dom0DiskUsageMaxBytes,
176176
StorageZfsReserved,
177177
ForceFallbackCounter,
178-
LogRemainToSendMBytes,
178+
MaxGzipLogMBytesInPersist,
179179
DownloadMaxPortCost,
180180
BlobDownloadMaxRetries,
181181
// Bool Items

0 commit comments

Comments
 (0)