diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f1ba8bb02..b0dd84e0c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -143,7 +143,7 @@ jobs: SNAPSHOT_RESTORE: "1" if: ${{ github.repository_owner == 'canonical' }} name: System (core) - runs-on: self-hosted-linux-amd64-noble-large + runs-on: ubuntu-24.04 needs: code-tests strategy: fail-fast: false @@ -199,7 +199,7 @@ jobs: SNAPSHOT_RESTORE: "1" if: ${{ github.repository_owner == 'canonical' }} name: System (upgrade) - runs-on: self-hosted-linux-amd64-noble-large + runs-on: ubuntu-24.04 needs: code-tests strategy: fail-fast: false diff --git a/service/microceph.go b/service/microceph.go index 901cd4526..031e15fe9 100644 --- a/service/microceph.go +++ b/service/microceph.go @@ -22,6 +22,9 @@ import ( cloudClient "github.com/canonical/microcloud/microcloud/client" ) +// cephJobTimeout is the maximum time we allow for a Ceph job to complete before the context gets canceled. +const cephJobTimeout = 5 * time.Minute + // CephService is a MicroCeph service. type CephService struct { m *microcluster.MicroCluster @@ -148,7 +151,7 @@ func (s CephService) AddDisk(ctx context.Context, data cephTypes.DisksPost, targ // In the pipeline runners we often see runtimes > 1 minute. // To prevent any issues with slow environments set a more forgiving upper limit. // As long as the MicroCeph API doesn't return an error, the process is still running and we have to wait for it. - ctx, cancel = context.WithTimeout(ctx, 5*time.Minute) + ctx, cancel = context.WithTimeout(ctx, cephJobTimeout) defer cancel() err = c.Query(ctx, "POST", types.APIVersion, &api.NewURL().Path("disks").URL, data, &response) @@ -232,6 +235,11 @@ func (s CephService) PoolSetReplicationFactor(ctx context.Context, data cephType return err } + // On the GH runners it was observed that setting the pool replication factor can take + // longer than the default of 30s if no deadline is set on the context. + ctx, cancel := context.WithTimeout(ctx, cephJobTimeout) + defer cancel() + err = c.Query(ctx, "PUT", types.APIVersion, &api.NewURL().Path("pools-op").URL, data, nil) if err != nil { return fmt.Errorf("Failed setting replication factor: %w", err) diff --git a/test/e2e/versions.tf b/test/e2e/versions.tf index ddcbeb012..ccec0f917 100644 --- a/test/e2e/versions.tf +++ b/test/e2e/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { lxd = { source = "terraform-lxd/lxd" - version = ">= 2.5.0" + version = "2.7.1" } } }