Merge pull request #8243 from filecoin-project/release/v1.14.4

chore: build: v1.14.4
This commit is contained in:
Jiaying Wang 2022-03-03 21:28:31 -05:00 committed by GitHub
commit 5b33555fda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 110 additions and 81 deletions

View File

@ -1,5 +1,15 @@
# Lotus changelog # Lotus changelog
# 1.14.4 / 2022-03-03
This is a *highly recommended* optional release for storage providers that are doing snap deals. This fix the bug
that causes some snap deal sectors are stuck in `FinalizeReplicaUpdate`. In addition, SPs should be able to force
update sectors status without getting blocked by `normal shutdown of state machine`.
# v1.14.3 / 2022-02-28
This is an **optional** release, that includes a fix to properly register the `--really-do-it` flag for abort-upgrade.
# 1.14.2 / 2022-02-24 # 1.14.2 / 2022-02-24
This is an **optional** release of lotus, that's had a couple more improvements w.r.t Snap experience for storage providers in preparation of the[upcoming OhSnap upgrade](https://github.com/filecoin-project/community/discussions/74?sort=new#discussioncomment-1922550). This is an **optional** release of lotus, that's had a couple more improvements w.r.t Snap experience for storage providers in preparation of the[upcoming OhSnap upgrade](https://github.com/filecoin-project/community/discussions/74?sort=new#discussioncomment-1922550).

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -37,7 +37,7 @@ func BuildTypeString() string {
} }
// BuildVersion is the local build version // BuildVersion is the local build version
const BuildVersion = "1.14.2" const BuildVersion = "1.14.4"
func UserVersion() string { func UserVersion() string {
if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" { if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" {

View File

@ -527,6 +527,7 @@ var stateList = []stateMeta{
{col: color.FgRed, state: sealing.SnapDealsDealsExpired}, {col: color.FgRed, state: sealing.SnapDealsDealsExpired},
{col: color.FgRed, state: sealing.ReplicaUpdateFailed}, {col: color.FgRed, state: sealing.ReplicaUpdateFailed},
{col: color.FgRed, state: sealing.ReleaseSectorKeyFailed}, {col: color.FgRed, state: sealing.ReleaseSectorKeyFailed},
{col: color.FgRed, state: sealing.FinalizeReplicaUpdateFailed},
} }
func init() { func init() {

View File

@ -7,7 +7,7 @@ USAGE:
lotus-miner [global options] command [command options] [arguments...] lotus-miner [global options] command [command options] [arguments...]
VERSION: VERSION:
1.14.2 1.14.4
COMMANDS: COMMANDS:
init Initialize a lotus miner repo init Initialize a lotus miner repo

View File

@ -7,7 +7,7 @@ USAGE:
lotus-worker [global options] command [command options] [arguments...] lotus-worker [global options] command [command options] [arguments...]
VERSION: VERSION:
1.14.2 1.14.4
COMMANDS: COMMANDS:
run Start lotus worker run Start lotus worker

View File

@ -7,7 +7,7 @@ USAGE:
lotus [global options] command [command options] [arguments...] lotus [global options] command [command options] [arguments...]
VERSION: VERSION:
1.14.2 1.14.4
COMMANDS: COMMANDS:
daemon Start a lotus daemon process daemon Start a lotus daemon process

View File

@ -19,7 +19,13 @@ import (
func (m *Sealing) Plan(events []statemachine.Event, user interface{}) (interface{}, uint64, error) { func (m *Sealing) Plan(events []statemachine.Event, user interface{}) (interface{}, uint64, error) {
next, processed, err := m.plan(events, user.(*SectorInfo)) next, processed, err := m.plan(events, user.(*SectorInfo))
if err != nil || next == nil { if err != nil || next == nil {
return nil, processed, err l := Log{
Timestamp: uint64(time.Now().Unix()),
Message: fmt.Sprintf("state machine error: %s", err),
Kind: fmt.Sprintf("error;%T", err),
}
user.(*SectorInfo).logAppend(l)
return nil, processed, nil
} }
return func(ctx statemachine.Context, si SectorInfo) error { return func(ctx statemachine.Context, si SectorInfo) error {
@ -175,6 +181,7 @@ var fsmPlanners = map[SectorState]func(events []statemachine.Event, state *Secto
), ),
FinalizeReplicaUpdate: planOne( FinalizeReplicaUpdate: planOne(
on(SectorFinalized{}, UpdateActivating), on(SectorFinalized{}, UpdateActivating),
on(SectorFinalizeFailed{}, FinalizeReplicaUpdateFailed),
), ),
UpdateActivating: planOne( UpdateActivating: planOne(
on(SectorUpdateActive{}, ReleaseSectorKey), on(SectorUpdateActive{}, ReleaseSectorKey),
@ -267,6 +274,9 @@ var fsmPlanners = map[SectorState]func(events []statemachine.Event, state *Secto
ReleaseSectorKeyFailed: planOne( ReleaseSectorKeyFailed: planOne(
on(SectorUpdateActive{}, ReleaseSectorKey), on(SectorUpdateActive{}, ReleaseSectorKey),
), ),
FinalizeReplicaUpdateFailed: planOne(
on(SectorRetryFinalize{}, FinalizeReplicaUpdate),
),
// Post-seal // Post-seal
@ -309,6 +319,21 @@ var fsmPlanners = map[SectorState]func(events []statemachine.Event, state *Secto
FailedUnrecoverable: final, FailedUnrecoverable: final,
} }
func (state *SectorInfo) logAppend(l Log) {
if len(state.Log) > 8000 {
log.Warnw("truncating sector log", "sector", state.SectorNumber)
state.Log[2000] = Log{
Timestamp: uint64(time.Now().Unix()),
Message: "truncating log (above 8000 entries)",
Kind: fmt.Sprintf("truncate"),
}
state.Log = append(state.Log[:2000], state.Log[6000:]...)
}
state.Log = append(state.Log, l)
}
func (m *Sealing) logEvents(events []statemachine.Event, state *SectorInfo) { func (m *Sealing) logEvents(events []statemachine.Event, state *SectorInfo) {
for _, event := range events { for _, event := range events {
log.Debugw("sector event", "sector", state.SectorNumber, "type", fmt.Sprintf("%T", event.User), "event", event.User) log.Debugw("sector event", "sector", state.SectorNumber, "type", fmt.Sprintf("%T", event.User), "event", event.User)
@ -337,18 +362,7 @@ func (m *Sealing) logEvents(events []statemachine.Event, state *SectorInfo) {
l.Trace = fmt.Sprintf("%+v", err) l.Trace = fmt.Sprintf("%+v", err)
} }
if len(state.Log) > 8000 { state.logAppend(l)
log.Warnw("truncating sector log", "sector", state.SectorNumber)
state.Log[2000] = Log{
Timestamp: uint64(time.Now().Unix()),
Message: "truncating log (above 8000 entries)",
Kind: fmt.Sprintf("truncate"),
}
state.Log = append(state.Log[:2000], state.Log[6000:]...)
}
state.Log = append(state.Log, l)
} }
} }
@ -536,6 +550,8 @@ func (m *Sealing) plan(events []statemachine.Event, state *SectorInfo) (func(sta
return m.handleSubmitReplicaUpdateFailed, processed, nil return m.handleSubmitReplicaUpdateFailed, processed, nil
case ReleaseSectorKeyFailed: case ReleaseSectorKeyFailed:
return m.handleReleaseSectorKeyFailed, 0, err return m.handleReleaseSectorKeyFailed, 0, err
case FinalizeReplicaUpdateFailed:
return m.handleFinalizeFailed, processed, nil
case AbortUpgrade: case AbortUpgrade:
return m.handleAbortUpgrade, processed, nil return m.handleAbortUpgrade, processed, nil

View File

@ -60,6 +60,7 @@ var ExistSectorStateList = map[SectorState]struct{}{
SnapDealsRecoverDealIDs: {}, SnapDealsRecoverDealIDs: {},
ReplicaUpdateFailed: {}, ReplicaUpdateFailed: {},
ReleaseSectorKeyFailed: {}, ReleaseSectorKeyFailed: {},
FinalizeReplicaUpdateFailed: {},
AbortUpgrade: {}, AbortUpgrade: {},
} }
@ -130,6 +131,7 @@ const (
AbortUpgrade SectorState = "AbortUpgrade" AbortUpgrade SectorState = "AbortUpgrade"
ReplicaUpdateFailed SectorState = "ReplicaUpdateFailed" ReplicaUpdateFailed SectorState = "ReplicaUpdateFailed"
ReleaseSectorKeyFailed SectorState = "ReleaseSectorKeyFailed" ReleaseSectorKeyFailed SectorState = "ReleaseSectorKeyFailed"
FinalizeReplicaUpdateFailed SectorState = "FinalizeReplicaUpdateFailed"
Faulty SectorState = "Faulty" // sector is corrupted or gone for some reason Faulty SectorState = "Faulty" // sector is corrupted or gone for some reason
FaultReported SectorState = "FaultReported" // sector has been declared as a fault on chain FaultReported SectorState = "FaultReported" // sector has been declared as a fault on chain