From a00a0b230f137238146290d9238e6558f69c5aa5 Mon Sep 17 00:00:00 2001 From: Peter Sabaini Date: Tue, 12 Nov 2024 09:51:27 +0100 Subject: [PATCH] Fix: increase timings for osd release Signed-off-by: Peter Sabaini --- .github/workflows/tests.yml | 4 ++++ microceph/ceph/start.go | 7 ++++--- microceph/ceph/start_test.go | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b55db29b..08e868af 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/microceph/ceph/start.go b/microceph/ceph/start.go index 1cadbc3a..218f43c4 100644 --- a/microceph/ceph/start.go +++ b/microceph/ceph/start.go @@ -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++ { @@ -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) diff --git a/microceph/ceph/start_test.go b/microceph/ceph/start_test.go index 99cd090e..55b4d553 100644 --- a/microceph/ceph/start_test.go +++ b/microceph/ceph/start_test.go @@ -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()