fix: Add lotus-miner legacy-markets alert

fix: Add lotus-miner legacy-markets alert
This commit is contained in:
Phi 2023-05-15 13:13:06 +02:00
parent bc6017194d
commit 7519f9fdf1
3 changed files with 15 additions and 0 deletions

View File

@ -89,6 +89,7 @@ const (
// health checks
CheckFDLimit
LegacyMarketsEOL
// libp2p
PstoreAddSelfKeysKey

View File

@ -147,6 +147,10 @@ func ConfigStorageMiner(c interface{}) Option {
),
If(cfg.Subsystems.EnableMarkets,
// Alert that legacy-markets is being deprecated
Override(LegacyMarketsEOL, modules.LegacyMarketsEOL),
// Markets
Override(new(dtypes.StagingBlockstore), modules.StagingBlockstore),
Override(new(dtypes.StagingGraphsync), modules.StagingGraphsync(cfg.Dealmaking.SimultaneousTransfersForStorage, cfg.Dealmaking.SimultaneousTransfersForStoragePerClient, cfg.Dealmaking.SimultaneousTransfersForRetrieval)),

View File

@ -32,6 +32,16 @@ func CheckFdLimit(min uint64) func(al *alerting.Alerting) {
}
}
func LegacyMarketsEOL(al *alerting.Alerting) {
// Add alert if lotus-miner legacy markets subsystem is still in use
alert := al.AddAlertType("system", "EOL")
// Alert with a message to migrate to Boost or similar markets subsystems
al.Raise(alert, map[string]string{
"message": "The lotus-miner legacy markets subsystem is deprecated and will be removed in a future release. Please migrate to [Boost](https://boost.filecoin.io) or similar markets subsystems.",
})
}
// TODO: More things:
// * Space in repo dirs (taking into account mounts)
// * Miner