Skip to content

Commit

Permalink
CUA allow rollback when owner denies update (eclipse-kanto#237)
Browse files Browse the repository at this point in the history
* [eclipse-kanto#236] CUA allow rollback when owner denies update

---------

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov3@bosch.com>
  • Loading branch information
dimitar-dimitrow authored May 15, 2024
1 parent a951f1c commit 7084ea6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion containerm/mgr/mgr_internal_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func newContainerMgr(metaPath string, execPath string, defaultCtrsStopTimeout ti
restartCtrsMgrCache: newRestartMgrCache(),
containerRepository: &ctrRepository,
}
fmt.Println("mgr:", defaultCtrsStopTimeout.String())
ctrClient.SetContainerExitHooks(manager.exitedAndRelease)

return manager, nil
Expand Down
7 changes: 4 additions & 3 deletions containerm/updateagent/update_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,10 @@ var baselineCommandHandlers = map[types.CommandType]struct {
commandHandler: activate,
},
types.CommandRollback: {
expectedBaselineStatus: []types.StatusType{types.BaselineStatusActivationFailure, types.BaselineStatusActivationSuccess},
baselineFailureStatus: types.BaselineStatusRollbackFailure,
commandHandler: rollback,
expectedBaselineStatus: []types.StatusType{types.BaselineStatusDownloadSuccess, types.BaselineStatusUpdateSuccess,
types.BaselineStatusActivationFailure, types.BaselineStatusActivationSuccess},
baselineFailureStatus: types.BaselineStatusRollbackFailure,
commandHandler: rollback,
},
types.CommandCleanup: {
baselineFailureStatus: types.BaselineStatusCleanup,
Expand Down

0 comments on commit 7084ea6

Please sign in to comment.