From 6f7c9b99c310b031df9f38fb6cf51ba9b7f86b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Wed, 18 Mar 2026 11:17:52 +0100 Subject: [PATCH 1/4] Revert "github/workflows/test: Use Canonical runners" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 6142647cacb9a05f823a7b8181e71cf1e8626f08. Also instead of 22.04 use 24.04. Signed-off-by: Julian Pelizäus --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From bb80a2b7305640c06416580b4e903def5c575789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Wed, 1 Jul 2026 11:42:17 +0200 Subject: [PATCH 2/4] test/e2e: Pin version of LXD provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julian Pelizäus --- test/e2e/versions.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" } } } From eced3d3bed7b56def085fd108a2e00ef7d6ff777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Wed, 1 Jul 2026 13:41:13 +0200 Subject: [PATCH 3/4] service/microceph: Use constant for long running job timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julian Pelizäus --- service/microceph.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service/microceph.go b/service/microceph.go index 901cd4526..8be60e528 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) From a2606dc54c640423f186d26f686bb2ec2e8df1aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Peliz=C3=A4us?= Date: Wed, 1 Jul 2026 13:41:33 +0200 Subject: [PATCH 4/4] service/microceph: Allow longer runtime for setting pool replication factor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julian Pelizäus --- service/microceph.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/service/microceph.go b/service/microceph.go index 8be60e528..031e15fe9 100644 --- a/service/microceph.go +++ b/service/microceph.go @@ -235,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)