Skip to content

Commit

Permalink
Fix: increase timings for osd release
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Sabaini <[email protected]>
  • Loading branch information
sabaini committed Nov 12, 2024
1 parent 22ef96f commit a00a0b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,10 @@ jobs:
set -uex
lxc exec node-wrk0 -- sh -c "sudo microceph status"
- name: Setup upterm session
if: ${{ failure() && runner.debug }}
uses: lhotari/action-upterm@v1

cluster-tests:
name: Test MicroCeph Cluster features.
runs-on: ubuntu-22.04
Expand Down
7 changes: 4 additions & 3 deletions microceph/ceph/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ func getCurrentVersion() (string, error) {
}

// checkVersions checks if all Ceph services are running the same version
// retry up to 3 times if multiple versions are detected to allow for upgrades to complete as they are performed
// retry up to 10 times if multiple versions are detected to allow for upgrades to complete as they are performed
// concurrently
func checkVersions() (bool, error) {
const (
maxRetries = 3
retryDelay = 5 * time.Second
maxRetries = 10
retryDelay = 10 * time.Second
)

for attempt := 0; attempt < maxRetries; attempt++ {
Expand Down Expand Up @@ -202,6 +202,7 @@ func Start(ctx context.Context, s interfaces.StateInterface) error {
}()

go func() {
time.Sleep(10 * time.Second) // wait for the mons to converge
err := PostRefresh()
if err != nil {
logger.Errorf("PostRefresh failed: %v", err)
Expand Down
2 changes: 1 addition & 1 deletion microceph/ceph/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (s *startSuite) TestMultipleVersionsPresent() {
}`

r.On("RunCommand", "ceph", "-v").Return(version, nil).Once()
r.On("RunCommand", "ceph", "versions").Return(versionsJson, nil).Times(3)
r.On("RunCommand", "ceph", "versions").Return(versionsJson, nil).Times(10)
processExec = r

err := PostRefresh()
Expand Down

0 comments on commit a00a0b2

Please sign in to comment.