Skip to content

Commit 78f949e

Browse files
committed
Migrates remaining tests to github runners
Signed-off-by: Mohamed L. Karaoui <[email protected]>
1 parent 505f9d9 commit 78f949e

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

.github/workflows/cri_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
env:
1717
GITHUB_RUN_ID: ${{ github.run_id }}
1818
GITHUB_VHIVE_ARGS: "-dbg"
19-
runs-on: ${{ fromJSON(format('["self-hosted", "{0}-cri"]', inputs.sandbox)) }}
19+
runs-on: ubuntu-24.04
2020

2121
steps:
2222
- name: Host Info

.github/workflows/unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
7070
profile-unit-test:
7171
name: "Unit test: profile unit test"
72-
runs-on: [self-hosted, profile]
72+
runs-on: ubuntu-24.04
7373
strategy:
7474
fail-fast: false
7575
matrix:

scripts/github_runner/setup_cri_test_env.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ fi
3535
SANDBOX=$1
3636
VHIVE_ROOT="$(git rev-parse --show-toplevel)"
3737

38+
# Set up the node with proper firecracker-containerd installation
39+
$VHIVE_ROOT/scripts/setup_tool -vhive-repo-dir $VHIVE_ROOT setup_node $SANDBOX
40+
3841
$VHIVE_ROOT/scripts/setup_tool -vhive-repo-dir $VHIVE_ROOT start_onenode_vhive_cluster $SANDBOX
3942
# $VHIVE_ROOT/scripts/cloudlab/start_onenode_vhive_cluster.sh "$SANDBOX"
4043
sleep 30s

scripts/setup_firecracker_containerd.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,7 @@ if [ 64 -eq ${#CONTAINERID} ]; then
6060
fi
6161

6262
sudo cp $CONFIGS/firecracker-runtime.json /etc/containerd/
63+
64+
# Create directory and symlink for CRI socket
65+
sudo mkdir -p /etc/vhive-cri
66+
sudo ln -sf /run/firecracker-containerd/containerd.sock /etc/vhive-cri/vhive-cri.sock

snapshotting/manager.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,19 @@ type SnapshotManager struct {
4141
}
4242

4343
// Snapshot identified by VM id
44-
4544
func NewSnapshotManager(baseFolder string) *SnapshotManager {
4645
manager := new(SnapshotManager)
4746
manager.snapshots = make(map[string]*Snapshot)
4847
manager.baseFolder = baseFolder
4948

50-
// Clean & init basefolder
51-
_ = os.RemoveAll(manager.baseFolder)
52-
_ = os.MkdirAll(manager.baseFolder, os.ModePerm)
49+
if err := os.RemoveAll(manager.baseFolder); err != nil {
50+
log.Printf("Failed to clean base folder: %v", err)
51+
return nil
52+
}
53+
if err := os.MkdirAll(manager.baseFolder, 0755); err != nil {
54+
log.Printf("Failed to create base folder: %v", err)
55+
return nil
56+
}
5357

5458
return manager
5559
}

0 commit comments

Comments
 (0)