Start pool managers in the background
Garm no longer fails on startup if a pool manager cannot be started. It will attempt to start the pool manager in the background. If it fails due to an unauthorized error, it will sleep for 3 hours. It is unlikely it will work a second time if credentials are not updated in the config and garm is restarted, so no point in getting rate limited. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
80452aac39
commit
05057e37fd
26 changed files with 408 additions and 180 deletions
|
|
@ -265,6 +265,8 @@ func (s *RepoTestSuite) TestCreateRepositoryStartPoolMgrFailed() {
|
|||
}
|
||||
|
||||
func (s *RepoTestSuite) TestListRepositories() {
|
||||
s.Fixtures.PoolMgrCtrlMock.On("GetRepoPoolManager", mock.AnythingOfType("params.Repository")).Return(s.Fixtures.PoolMgrMock, nil)
|
||||
s.Fixtures.PoolMgrMock.On("Status").Return(params.PoolManagerStatus{IsRunning: true}, nil)
|
||||
repos, err := s.Runner.ListRepositories(s.Fixtures.AdminContext)
|
||||
|
||||
s.Require().Nil(err)
|
||||
|
|
@ -278,6 +280,8 @@ func (s *RepoTestSuite) TestListRepositoriesErrUnauthorized() {
|
|||
}
|
||||
|
||||
func (s *RepoTestSuite) TestGetRepositoryByID() {
|
||||
s.Fixtures.PoolMgrCtrlMock.On("GetRepoPoolManager", mock.AnythingOfType("params.Repository")).Return(s.Fixtures.PoolMgrMock, nil)
|
||||
s.Fixtures.PoolMgrMock.On("Status").Return(params.PoolManagerStatus{IsRunning: true}, nil)
|
||||
repo, err := s.Runner.GetRepositoryByID(s.Fixtures.AdminContext, s.Fixtures.StoreRepos["test-repo-1"].ID)
|
||||
|
||||
s.Require().Nil(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue