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

[WIP - do not merge!!!] Fix something #979

Closed
14 changes: 4 additions & 10 deletions .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,10 @@ runs:
shell: bash
- name: Setup eve version
run: |
image=${{ inputs.eve_image }}
if [[ -n "$image" && "$image" == *:* ]]; then
echo "Setting up eve image ${image}"
eve_pr_registry=$(echo "$image" | cut -d ':' -f 1)
eve_pr=$(echo "$image" | cut -d ':' -f 2 | cut -d "-" -f1)
./eden config set default --key=eve.registry --value="$eve_pr_registry"
./eden config set default --key=eve.tag --value="$eve_pr"
else
echo "Skipping setting up eve image ${image}"
fi
eve_pr_registry="christophzededa/eve-test"
eve_pr="latest"
./eden config set default --key=eve.registry --value="$eve_pr_registry"
./eden config set default --key=eve.tag --value="$eve_pr"
shell: bash
working-directory: "./eden"
- name: Setup ext4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/eden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
name: Execute Eden test workflow
uses: ./.github/workflows/test.yml
with:
eve_image: "lfedge/eve:11.7.0"
eve_image: "lfedge/eve:12.3.0"

2 changes: 1 addition & 1 deletion .github/workflows/eden_emh_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on: # yamllint disable-line rule:truthy
# yamllint disable rule:line-length
jobs:
integration:
runs-on: ubuntu-22.04
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/eden_gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on: # yamllint disable-line rule:truthy

jobs:
check-secrets:
runs-on: ubuntu-22.04
runs-on: self-hosted
outputs:
available: ${{ steps.secrets.outputs.defined }}
steps:
Expand All @@ -20,7 +20,7 @@ jobs:
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
integration:
name: Integration GCP test (${{ matrix.hv }};${{ matrix.fs }})
runs-on: ubuntu-22.04
runs-on: self-hosted
needs: [check-secrets]
if: needs.check-secrets.outputs.available == 'true'
strategy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/eden_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy

jobs:
build:
runs-on: ubuntu-22.04
runs-on: self-hosted
steps:
- name: setup
run: |
Expand All @@ -30,7 +30,7 @@ jobs:
make LINUXKIT_TARGET=build DOCKER_PLATFORM=linux/arm64 build-docker
make LINUXKIT_TARGET=build DOCKER_PLATFORM=linux/amd64 build-docker
setup:
runs-on: ubuntu-22.04
runs-on: self-hosted
steps:
- name: setup
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
check-secrets:
runs-on: ubuntu-22.04
runs-on: self-hosted
outputs:
available: ${{ steps.secrets.outputs.defined }}
steps:
Expand All @@ -19,7 +19,7 @@ jobs:
env:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
build:
runs-on: ubuntu-22.04
runs-on: self-hosted
needs: [check-secrets]
if: needs.check-secrets.outputs.available == 'true'
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy

jobs:
unit:
runs-on: ubuntu-22.04
runs-on: self-hosted
steps:
- name: get eden
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy

jobs:
validation:
runs-on: ubuntu-22.04
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yetus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy

jobs:
yetus:
runs-on: ubuntu-22.04
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion pkg/eden/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func StartEVEQemu(qemuARCH, qemuOS, eveImageFile, imageFormat string, isInstalle
if qemuOS != "linux" && qemuOS != "darwin" {
return fmt.Errorf("StartEVEQemu: OS not supported: %s", qemuOS)
}
qemuOptions += "-watchdog-action reset "
qemuOptions += "-watchdog-action none "

if isInstaller {
// Run EVE installer, then start EVE VM again but without the installer image.
Expand Down
4 changes: 2 additions & 2 deletions pkg/openevec/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,8 @@ func (openEVEC *OpenEVEC) PodModify(appName string, podNetworks, portPublish, ac
if needPurge {
processingFunction := func(im *info.ZInfoMsg) bool {
if im.Ztype == info.ZInfoTypes_ZiApp {
// waiting for purging state
if im.GetAinfo().State == info.ZSwState_PURGING {
// waiting for halting state
if im.GetAinfo().State == info.ZSwState_HALTING {
return true
}
}
Expand Down
6 changes: 5 additions & 1 deletion tests/eclient/testdata/app_local_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,18 @@ fi
DN="$1"
TIMESTAMP="${2:-0}"
CMD="${3:-COMMAND_UNSPECIFIED}"
EXPECTED_CMD="$CMD"
if [ "$CMD" = "RESTARTING" || "$CMD" = "PURGING" ]; then
EXPECTED_CMD="HALTING"
fi

EDEN={{EdenConfig "eden.root"}}/{{EdenConfig "eden.bin-dist"}}/{{EdenConfig "eden.eden-bin"}}
CONFIG="{\"displayname\": \"$DN\", \"timestamp\": $TIMESTAMP, \"command\": \"$CMD\"}"

while true; do
echo "$CONFIG" | $EDEN sdn fwd eth0 {{template "mngr_port"}} -- {{template "ssh"}} 'cat > {{template "app_cmd_file"}}'
APP_CMD_FILE_CONTENT="$($EDEN sdn fwd eth0 {{template "mngr_port"}} -- {{template "ssh"}} "cat {{template "app_cmd_file"}}")"
echo "$APP_CMD_FILE_CONTENT" | grep "$CMD" && break
echo "$APP_CMD_FILE_CONTENT" | grep "$EXPECTED_CMD" && break
sleep 1
done

Expand Down
4 changes: 2 additions & 2 deletions tests/eclient/testdata/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ message 'Waiting for AppInstMetadata'
# Use eden.lim.test for access Infos with timewait 10m in background
test eden.lim.test -test.v -timewait 10m -test.run TestInfo -out InfoContent.amdinfo.data 'InfoContent.amdinfo.data:world' &

exec -t 5m bash ssh.sh
exec -t 10m bash ssh.sh

# wait for detector
wait
Expand All @@ -44,7 +44,7 @@ test:

-- ssh.sh --
EDEN={{EdenConfig "eden.root"}}/{{EdenConfig "eden.bin-dist"}}/{{EdenConfig "eden.eden-bin"}}
for i in `seq 20`
for i in `seq 200`
do
sleep 20
# Test SSH-access to container
Expand Down
8 changes: 4 additions & 4 deletions tests/eclient/testdata/userdata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
eden pod deploy -n eclient --memory=512MB --networks=n1 {{template "eclient_image"}} -p {{$port}}:22 --metadata={{$userdata_file}}
test eden.app.test -test.v -timewait 20m RUNNING eclient

exec -t 40s bash test_injected_file.sh "before_restart"
exec -t 400s bash test_injected_file.sh "before_restart"

Check failure on line 41 in tests/eclient/testdata/userdata.txt

View workflow job for this annotation

GitHub Actions / Execute Eden test workflow / Smoke tests (ext4, false)

[stdout] /home/runner/actions-runner/_work/eden/eden/eden/dist/bin/eden sdn fwd eth0 2223 -- ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no -i /home/runner/actions-runner/_work/eden/eden/eden/dist/tests/eclient/image/cert/id_rsa root@FWD_IP -p FWD_PORT grep -q "before_restart" /etc/injected_file.txt Try 1 time="2024-06-14T19:26:52Z" level=fatal msg="command ssh failed: exit status 255" Try 2 time="2024-06-14T19:27:04Z" level=fatal msg="command ssh failed: exit status 255" Try 3 time="2024-06-14T19:27:16Z" level=fatal msg="command ssh failed: exit status 255" Try 4 time="2024-06-14T19:27:28Z" level=fatal msg="command ssh failed: exit status 255" Try 5 time="2024-06-14T19:27:40Z" level=fatal msg="command ssh failed: exit status 255" Try 6 time="2024-06-14T19:27:52Z" level=fatal msg="command ssh failed: exit status 255" Try 7 time="2024-06-14T19:28:04Z" level=fatal msg="command ssh failed: exit status 255" Try 8 time="2024-06-14T19:28:16Z" level=fatal msg="command ssh failed: exit status 255" Try 9 time="2024-06-14T19:28:28Z" level=fatal msg="command ssh failed: exit status 255" Try 10 time="2024-06-14T19:28:40Z" level=fatal msg="command ssh failed: exit status 255" Try 11 time="2024-06-14T19:28:52Z" level=fatal msg="command ssh failed: exit status 255" Try 12 time="2024-06-14T19:29:04Z" level=fatal msg="command ssh failed: exit status 255" Try 13 time="2024-06-14T19:29:16Z" level=fatal msg="command ssh failed: exit status 255" Try 14 time="2024-06-14T19:29:28Z" level=fatal msg="command ssh failed: exit status 255" Try 15 time="2024-06-14T19:29:40Z" level=fatal msg="command ssh failed: exit status 255" Try 16 time="2024-06-14T19:29:52Z" level=fatal msg="command ssh failed: exit status 255" Try 17 time="2024-06-14T19:30:04Z" level=fatal msg="command ssh failed: exit status 255" Try 18 time="2024-06-14T19:30:16Z" level=fatal msg="command ssh failed: exit status 255" Try 19 time="2024-06-14T19:30:28Z" level=fatal msg="command ssh failed: exit status 255" Try 20 time="2024-06-14T19:30:40Z" level=fatal msg="command ssh failed: exit status 255" Try 21 time="2024-06-14T19:30:52Z" level=fatal msg="command ssh failed: exit status 255" Try 22 time="2024-06-14T19:31:04Z" level=fatal msg="command ssh failed: exit status 255" Try 23 time="2024-06-14T19:31:16Z" level=fatal msg="command ssh failed: exit status 255" Try 24 time="2024-06-14T19:31:28Z" level=fatal msg="command ssh failed: exit status 255" Try 25 time="2024-06-14T19:31:40Z" level=fatal msg="command ssh failed: exit status 255" Try 26 time="2024-06-14T19:31:52Z" level=fatal msg="command ssh failed: exit status 255" Try 27 time="2024-06-14T19:32:04Z" level=fatal msg="command ssh failed: exit status 255" Try 28 time="2024-06-14T19:32:17Z" level=fatal msg="command ssh failed: exit status 255" Try 29 time="2024-06-14T19:32:29Z" level=fatal msg="command ssh failed: exit status 255" Try 30 time="2024-06-14T19:32:41Z" level=fatal msg="command ssh failed: exit status 255" Try 31 time="2024-06-14T19:32:53Z" level=fatal msg="command ssh failed: exit status 255" Try 32 time="2024-06-14T19:33:05Z" level=fatal msg="command ssh failed: exit status 255" Try 33 time="2024-06-14T19:33:17Z" level=fatal msg="command ssh failed: exit status 255" Try 34 [stderr] Connection timed out during banner exchange Connection to 127.0.0.1 port 2223 timed out Connection timed out during banner exchange Connection to 127.0.0.1 port 2223 timed out Connection timed out during banner exchange Connection to 127.0.0.1 port 2223 timed out Connection timed out during banner exchange Connection to 127.0.0.1 port 2223 timed out Connection timed out during banner exchange Connection to 127.0.0.1 port 2223 timed out Connection timed out during banner exchange Connection to 127.0.0.1 port 2223 timed out Connection timed out during banner exchange Connection to 127.0.0.1 port 2223 timed out Connection timed out during banner exchange Connection to 127.0.0.1 port 2223 timed out Connection timed out during banner exchange Connection to 127.0.0.1 port 2223 timed out Connection timed out during banner

exec -t 40s bash change_injected_file.sh "after_restart"
exec -t 400s bash change_injected_file.sh "after_restart"

eden pod restart eclient
test eden.app.test -test.v -timewait 20m -check-new RUNNING eclient

exec -t 40s bash test_injected_file.sh "after_restart"
exec -t 400s bash test_injected_file.sh "after_restart"

eden pod delete eclient

Expand Down Expand Up @@ -88,7 +88,7 @@
echo $EDEN sdn fwd eth0 {{$port}} -- {{template "ssh"}} grep -q $TEXT /etc/injected_file.txt

# Retry in case there are connectivity issues
for i in `seq 30`
for i in `seq 300`
do
echo Try $i
$EDEN sdn fwd eth0 {{$port}} -- {{template "ssh"}} grep -q $TEXT /etc/injected_file.txt && echo "Success" && break
Expand Down
2 changes: 2 additions & 0 deletions tests/lim/lim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ func TestInfo(t *testing.T) {
tc.AddProcInfo(edgeNode, func(ei *info.ZInfoMsg) error {
return func(t *testing.T, edgeNode *device.Ctx,
ei *info.ZInfoMsg) error {

fmt.Printf(">>> got info %+v\n", ei)
name := edgeNode.GetID()
if query != nil {
if einfo.ZInfoFind(ei, query) {
Expand Down
Loading