Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion service/microceph.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
lxd = {
source = "terraform-lxd/lxd"
version = ">= 2.5.0"
version = "2.7.1"
}
Comment thread
roosterfish marked this conversation as resolved.
}
}
Loading