Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new snapshots functionality #465

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions .github/workflows/cri_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ jobs:
- name: Setup firecracker-containerd
run: ./scripts/setup_firecracker_containerd.sh

- name: Add rsync # TODO: add dependencies to vHive
run: |
sudo apt update
sudo apt install rsync -y

- name: Build
run: go build

Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/nightly_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:
sudo apt update
sudo apt install git -y

- name: Add rsync # TODO: add dependencies to vHive
run: |
sudo apt update
sudo apt install rsync -y

- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
Expand All @@ -55,7 +60,7 @@ jobs:
strategy:
fail-fast: false
matrix:
vhive_args: ["-dbg", "-dbg -snapshots", "-dbg -snapshots -upf"]
vhive_args: ["-dbg", "-dbg -snapshots", "-dbg -snapshots -upf", "-dbg -snapshots -fulllocal"]
env:
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_JOB: ${{ github.job }}
Expand Down Expand Up @@ -83,6 +88,11 @@ jobs:
- name: Setup firecracker-containerd
run: ./scripts/setup_firecracker_containerd.sh

- name: Add rsync # TODO: add dependencies to vHive
run: |
sudo apt update
sudo apt install rsync -y

- name: Build
run: go build

Expand Down
84 changes: 78 additions & 6 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
strategy:
fail-fast: false
matrix:
module: [taps, misc, profile]
module: [taps, misc, profile, networking, snapshotting ]
steps:

- name: Set up Go 1.18
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Set up Python 3.x
uses: actions/setup-python@v3
with:
Expand All @@ -48,6 +48,11 @@ jobs:
- name: Install PMU tools
run: ./scripts/install_pmutools.sh

- name: Add rsync
run: |
sudo apt update
sudo apt install rsync -y

- name: Build
run: go build -race -v -a ./...

Expand All @@ -59,12 +64,12 @@ jobs:
run: |
make -C $MODULE test
make -C $MODULE test-man

firecracker-containerd-interface-test:
name: "Unit tests: Firecracker-containerd interface"
runs-on: [self-hosted, integ]
steps:

- name: Set up Go 1.18
uses: actions/setup-go@v3
with:
Expand All @@ -75,15 +80,20 @@ jobs:
sudo add-apt-repository ppa:git-core/ppa -y
sudo apt update
sudo apt install git -y

- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
lfs: true

- name: Pull binaries
run: ./scripts/setup_firecracker_containerd.sh

- name: Add rsync
run: |
sudo apt update
sudo apt install rsync -y

- name: Build
run: go build -race -v -a ./...

Expand All @@ -95,3 +105,65 @@ jobs:
- name: Cleaning
if: ${{ always() }}
run: ./scripts/clean_fcctr.sh

containerd-unit-test:
name: Containerd dependent unit test
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
module: [ devmapper, ctriface/image ]
steps:

- name: Set up Go 1.18
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Set up Python 3.x
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Setup System
run: ./scripts/setup_system.sh

- name: Install PMU tools
run: ./scripts/install_pmutools.sh

- name: Add rsync # TODO: add dependencies to vHive
run: |
sudo apt update
sudo apt install rsync -y

- name: Setup firecracker containerd
run: ./scripts/setup_firecracker_containerd.sh

- name: Setup containerd
run: |
wget --continue --quiet https://github.com/containerd/containerd/releases/download/v1.5.7/containerd-1.5.7-linux-amd64.tar.gz
sudo tar -C /usr/local -xzf containerd-1.5.7-linux-amd64.tar.gz

- name: Create devmapper
run: ./scripts/create_devmapper.sh

- name: Run containerd
run: sudo containerd &

- name: Run firecracker-containerd
run: sudo /usr/local/bin/firecracker-containerd --config /etc/firecracker-containerd/config.toml &

- name: Build
run: go build -race -v -a ./...

- name: Run tests in submodules
env:
MODULE: ${{ matrix.module }}
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
run: |
make -C $MODULE test
make -C $MODULE test-man
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Unreleased]

### Added
- Add support for [fullLocal snapshots](docs/fulllocal_snapshots.md) mode

### Changed

Expand Down
4 changes: 2 additions & 2 deletions bin/containerd-shim-aws-firecracker
Git LFS file not shown
4 changes: 2 additions & 2 deletions bin/firecracker
Git LFS file not shown
4 changes: 2 additions & 2 deletions bin/firecracker-containerd
Git LFS file not shown
4 changes: 2 additions & 2 deletions bin/firecracker-ctr
Git LFS file not shown
4 changes: 2 additions & 2 deletions bin/jailer
Git LFS file not shown
7 changes: 7 additions & 0 deletions configs/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ DCNs
De
debian
deployer
deterministically
dev
devicemapper
devmapper
df
DialGRPCWithUnaryInterceptor
Expand Down Expand Up @@ -285,6 +287,7 @@ microarchitectural
Microarchitecture
microbenchmark
microbenchmarks
microVM
microVMs
minio
MinIO
Expand Down Expand Up @@ -395,11 +398,13 @@ rebasing
repo
Repos
roadmap
rootfs
RPC
rperf
RPerf
RPERF
rsquo
rsync
runc
runtime
runtimes
Expand Down Expand Up @@ -432,6 +437,7 @@ SinkBinding
SinkBindings
sms
SMT
snapshotted
snapshotting
SoC
SOCACHE
Expand Down Expand Up @@ -461,6 +467,7 @@ TestProfileIncrementConfiguration
TestProfileSingleConfiguration
TextFormatter
th
thinpool
Timeseries
timeseriesdb
TimeseriesDB
Expand Down
10 changes: 8 additions & 2 deletions configs/firecracker-containerd/firecracker-runtime.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
{
"firecracker_binary_path": "/usr/local/bin/firecracker",
"kernel_image_path": "/var/lib/firecracker-containerd/runtime/hello-vmlinux.bin",
"kernel_args": "console=ttyS0 noapic reboot=k panic=1 pci=off nomodules ro systemd.journald.forward_to_console systemd.unit=firecracker.target init=/sbin/overlay-init",
"root_drive": "/var/lib/firecracker-containerd/runtime/default-rootfs.img",
"cpu_count": 1,
"cpu_template": "T2",
"log_levels": ["info"]
"log_fifo": "fc-logs.fifo",
"log_levels": ["info"],
"metrics_fifo": "fc-metrics.fifo",
"kernel_args": "console=ttyS0 noapic reboot=k panic=1 pci=off nomodules ro systemd.journald.forward_to_console systemd.unit=firecracker.target init=/sbin/overlay-init",
"jailer": {
"runc_binary_path": "/usr/bin/runc"
}
}
Loading