Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cilium/little-vm-helper
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.12
Choose a base ref
...
head repository: cilium/little-vm-helper
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.0.13
Choose a head ref

Commits on Jul 21, 2023

  1. chore(deps): update dependency cilium/little-vm-helper to v0.0.12

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and mhofstetter committed Jul 21, 2023
    Copy the full SHA
    d818e5f View commit details

Commits on Jul 24, 2023

  1. fix(deps): update module github.com/go-git/go-git/v5 to v5.8.0

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and mhofstetter committed Jul 24, 2023
    Copy the full SHA
    0e58128 View commit details
  2. action: Fix boolean nit in wait for SSH server step

    This commit fixes a nit in the "Wait for VM's SSH Server" step, where
    the value `1` is used as a false value and `0` is used as a true value.
    
    Signed-off-by: Ryan Drew <ryan.drew@isovalent.com>
    learnitall authored and mhofstetter committed Jul 24, 2023
    Copy the full SHA
    b42cb4c View commit details

Commits on Jul 27, 2023

  1. fix(deps): update module github.com/go-git/go-git/v5 to v5.8.1

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and mhofstetter committed Jul 27, 2023
    Copy the full SHA
    917b4e8 View commit details

Commits on Jul 31, 2023

  1. fix(deps): update module github.com/hashicorp/packer-plugin-sdk to v0…

    ….5.0
    
    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and kkourt committed Jul 31, 2023
    Copy the full SHA
    3c8d648 View commit details

Commits on Aug 2, 2023

  1. fix(deps): update module github.com/hashicorp/packer-plugin-sdk to v0…

    ….5.1
    
    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and kkourt committed Aug 2, 2023
    Copy the full SHA
    40e727a View commit details
  2. chore(deps): update dependency go to v1.20.7

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and kkourt committed Aug 2, 2023
    Copy the full SHA
    bd4e58f View commit details

Commits on Aug 7, 2023

  1. fix(deps): update module golang.org/x/sys to v0.11.0

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and mhofstetter committed Aug 7, 2023
    Copy the full SHA
    d67af80 View commit details

Commits on Aug 8, 2023

  1. chore(deps): update actions/setup-go action to v4.1.0

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and kkourt committed Aug 8, 2023
    Copy the full SHA
    a04794f View commit details

Commits on Aug 9, 2023

  1. chore(deps): update dependency go to v1.21.0

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and kkourt committed Aug 9, 2023
    Copy the full SHA
    5cfa199 View commit details

Commits on Aug 22, 2023

  1. remove hashicorp/packer-plugin-sdk

    Replace it with simpler pkg/step.
    
    Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
    kkourt committed Aug 22, 2023
    Copy the full SHA
    3743163 View commit details

Commits on Aug 25, 2023

  1. chore(deps): update actions/checkout action to v3.6.0

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and mhofstetter committed Aug 25, 2023
    Copy the full SHA
    501dadc View commit details

Commits on Sep 2, 2023

  1. fix: Fix tetragon link inside the README.md

    Signed-off-by: Daniel Ramirez <dxas90@gmail.com>
    dxas90 authored and kkourt committed Sep 2, 2023
    Copy the full SHA
    42c437b View commit details

Commits on Sep 4, 2023

  1. fix(deps): update module golang.org/x/sys to v0.12.0

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and mhofstetter committed Sep 4, 2023
    Copy the full SHA
    52dac9f View commit details
  2. chore(deps): update actions/checkout action to v4

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and mhofstetter committed Sep 4, 2023
    Copy the full SHA
    87704fe View commit details

Commits on Sep 11, 2023

  1. chore(deps): update actions/cache action to v3.3.2

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and kkourt committed Sep 11, 2023
    Copy the full SHA
    ab82fb1 View commit details

Commits on Sep 27, 2023

  1. action: Fix usage of CI images

    Currently, the CI LVH VM images usage is broken in the action. For
    example, "kind-ci:5.15-20230925.121928" cannot be used due to:
    
        cp: can't stat '/data/images/kind-ci_5.15.qcow2.zst': No such file or directory
    
    This is because the actual image name doesn't contain "-ci". Fix this,
    by removing the "-ci" suffix from the image name derivation.
    
    Signed-off-by: Martynas Pumputis <m@lambda.lt>
    brb authored and kkourt committed Sep 27, 2023
    Copy the full SHA
    2b683d0 View commit details

Commits on Sep 29, 2023

  1. action: Remove setting DNS resolver

    cilium/little-vm-helper-images#187 resolves the
    issue with Azure DNS resolvers.
    
    Signed-off-by: Martynas Pumputis <m@lambda.lt>
    brb authored and aanm committed Sep 29, 2023
    Copy the full SHA
    5fec602 View commit details

Commits on Nov 24, 2023

  1. chore(deps): update module golang.org/x/net to v0.17.0 [security]

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and tklauser committed Nov 24, 2023
    Copy the full SHA
    8498a91 View commit details
  2. chore(deps): update actions/checkout action to v4.1.0

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and tklauser committed Nov 24, 2023
    Copy the full SHA
    7d1c8b1 View commit details
  3. fix(deps): update all go dependencies main

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and tklauser committed Nov 24, 2023
    Copy the full SHA
    576c3bf View commit details
  4. chore(deps): update dependency go to v1.21.4

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and tklauser committed Nov 24, 2023
    Copy the full SHA
    841c085 View commit details
  5. chore(deps): update actions/checkout action to v4.1.1

    Signed-off-by: renovate[bot] <bot@renovateapp.com>
    renovate[bot] authored and tklauser committed Nov 24, 2023
    Copy the full SHA
    96de861 View commit details

Commits on Nov 27, 2023

  1. kernels: disable some more options

    Disable some kernel config options that are not needed in an lvh VM.
    
    Signed-off-by: Tobias Klauser <tobias@cilium.io>
    tklauser authored and kkourt committed Nov 27, 2023
    Copy the full SHA
    40a9124 View commit details
  2. Use stdlib errors.Join instead of go-multierror

    Use error wrapping from the errors standard library package instead of
    the 3rd party go-multierror package to join multiple errors.
    
    Signed-off-by: Tobias Klauser <tobias@cilium.io>
    tklauser authored and kkourt committed Nov 27, 2023
    Copy the full SHA
    de55dde View commit details

Commits on Nov 30, 2023

  1. action: Add additional port-forward

    It's going to be used for exposing K8s clusters.
    
    Signed-off-by: Martynas Pumputis <m@lambda.lt>
    brb authored and kkourt committed Nov 30, 2023
    Copy the full SHA
    8410a93 View commit details
Showing 601 changed files with 22,248 additions and 8,161 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/basic.yaml
Original file line number Diff line number Diff line change
@@ -13,13 +13,13 @@ jobs:
os: [ ubuntu-22.04 ]
steps:
- name: Install Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
# renovate: datasource=golang-version depName=go
go-version: 1.20.6
go-version: 1.21.4

- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: src/little-vm-helper

6 changes: 3 additions & 3 deletions .github/workflows/example.yaml
Original file line number Diff line number Diff line change
@@ -15,10 +15,10 @@ jobs:
os: [ ubuntu-22.04 ]
steps:
- name: Install Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
# renovate: datasource=golang-version depName=go
go-version: 1.20.6
go-version: 1.21.4

- name: Install dependencies
run: |
@@ -28,7 +28,7 @@ jobs:
sudo apt-get -qy install mmdebstrap libguestfs-tools qemu-utils extlinux git fakeroot build-essential xz-utils libssl-dev bc flex libelf-dev bison pahole
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: src/little-vm-helper

6 changes: 3 additions & 3 deletions .github/workflows/quay.yaml
Original file line number Diff line number Diff line change
@@ -10,13 +10,13 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Install Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
# renovate: datasource=golang-version depName=go
go-version: 1.20.6
go-version: 1.21.4

- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

little-vm-helper (lvh) is a VM management tool, aimed for testing and development of features that
depend on the kernel, such as BPF. It is used in [cilium](https://github.com/cilium/cilium),
[tetragon](https://github.com/cilium/teragon), and [pwru](https://github.com/cilium/pwru). It can also be used for kernel development. It is not
[tetragon](https://github.com/cilium/tetragon), and [pwru](https://github.com/cilium/pwru). It can also be used for kernel development. It is not
meant, and should not be used for running production VMs. Fast booting and image building, as well
as being storage efficient are the main goals.

44 changes: 19 additions & 25 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ inputs:
description: 'LVH cli version (Docker tag)'
required: true
# renovate: datasource=github-tags depName=cilium/little-vm-helper
default: 'v0.0.11'
default: 'v0.0.12'
cmd:
description: 'Commands to run in a VM (any occurance of "$" within "cmd" must be escaped)'
required: true
@@ -47,9 +47,6 @@ inputs:
description: 'Provision VM (if set to false, only given test cmd is going to be run)'
required: true
default: 'true'
dns-resolver:
description: 'Set DNS resolver in /etc/resolv.conf of a VM'
required: false
install-dependencies:
description: 'Install QEMU dependencies (Debian/Ubuntu)'
default: 'false'
@@ -76,6 +73,9 @@ inputs:
description: 'Run in verbose mode'
required: true
default: 'false'
port-forward:
description: 'Additional to SSH port forward ($LOCAL:$VM_PORT)'
required: false
runs:
using: "composite"
steps:
@@ -108,7 +108,7 @@ runs:
- name: Load install packages from GitHub cache
if: ${{ inputs.provision == 'true' && inputs.install-dependencies == 'true' }}
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
id: package-cache
with:
path: /tmp/.ubuntu-pkgs
@@ -125,7 +125,7 @@ runs:
sudo apt-get clean && \
sudo apt-get -d -y --no-install-recommends install ${{steps.find-lvh-cli.outputs.dependency_list}} && \
break || success=0
n=$((n+1))
n=$((n+1))
sleep 1
done
[ $success -eq 1 ] || exit 42
@@ -142,7 +142,7 @@ runs:
sudo apt-get -y --no-install-recommends install /tmp/.ubuntu-pkgs/*.deb
sudo kvm-ok
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
if: ${{ inputs.provision == 'true' }}
id: cache-lvh-image
with:
@@ -153,7 +153,7 @@ runs:
if: ${{ inputs.provision == 'true' }}
id: derive-image-name
shell: bash
run: echo "image-name=${{ inputs.image }}_$(echo ${{ inputs.image-version }} | sed 's/\(.*\)\-\(.*\)/\1/g')" >> $GITHUB_OUTPUT
run: echo "image-name=$(echo ${{ inputs.image }} | sed 's/\-ci//g')_$(echo ${{ inputs.image-version }} | sed 's/\(.*\)\-\(.*\)/\1/g')" >> $GITHUB_OUTPUT

- name: Fetch VM image
if: ${{ inputs.provision == 'true' && steps.cache-lvh-image.outputs.cache-hit != 'true' }}
@@ -180,6 +180,9 @@ runs:
if [ "${{ inputs.verbose }}" == "true" ]; then
extraArgs+=("--verbose")
fi
if [ "${{ inputs.port-forward }}" != "" ]; then
extraArgs+=("-p" "${{ inputs.port-forward }}")
fi
sudo touch /tmp/console.log
sudo /bin/lvh run --host-mount=${{ inputs.host-mount }} --image /_images/${{ inputs.test-name }}.qcow2 \
--daemonize -p ${{ inputs.ssh-port }}:22 --serial-port ${{ inputs.serial-port }} \
@@ -192,10 +195,10 @@ runs:
shell: bash
run: |
n=0
started=1
started=0
until [ "$n" -ge ${{ inputs.ssh-startup-wait-retries }} ]; do
if grep -E ".*OK.*Started.*ssh.*" /tmp/console.log; then
started=0
started=1
break
elif grep -E ".*FAILED.*Failed.*to.*start.*ssh*" /tmp/console.log; then
cat /tmp/console.log
@@ -204,35 +207,26 @@ runs:
n=$((n+1))
sleep ${{ inputs.ssh-startup-wait-timeout }}
done
if [ $started -eq 1 ]; then
if [ $started -eq 0 ]; then
cat /tmp/console.log
exit 41
fi
n=0
success=1
success=0
until [ "$n" -ge ${{ inputs.ssh-connect-wait-retries }} ]; do
if ssh -p ${{ inputs.ssh-port }} -o "StrictHostKeyChecking=no" root@localhost exit; then
success=0
break
success=1
break
fi
n=$((n+1))
sleep ${{ inputs.ssh-connect-wait-timeout }}
done
if [ $success -eq 1 ]; then
if [ $success -eq 0 ]; then
cat /tmp/console.log
exit 42
fi
- name: Set DNS resolver
if: ${{ inputs.provision == 'true' && inputs.dns-resolver != '' }}
shell: bash
run: |
ssh -p ${{ inputs.ssh-port }} -o "StrictHostKeyChecking=no" root@localhost << EOF
set -e
echo "nameserver ${{ inputs.dns-resolver }}" > /etc/resolv.conf
EOF
- name: Run test cmd in VM
shell: bash
run: |
29 changes: 14 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
module github.com/cilium/little-vm-helper

go 1.18
go 1.20

require (
github.com/go-git/go-git/v5 v5.7.0
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/packer-plugin-sdk v0.4.0
github.com/go-git/go-git/v5 v5.10.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.8.4
golang.org/x/sys v0.10.0
golang.org/x/sys v0.14.0
)

require (
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903 // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/acomagu/bufpipe v1.0.4 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.4.1 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/skeema/knownhosts v1.1.1 // indirect
github.com/skeema/knownhosts v1.2.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/tools v0.13.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading