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

adapt tests to RESTARTING/PURGING (2nd part) #976

Closed
Closed
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
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.4.0"

2 changes: 1 addition & 1 deletion pkg/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const (
DefaultRegistryPort = 5050

//tags, versions, repos
DefaultEVETag = "11.7.0" // DefaultEVETag tag for EVE image
DefaultEVETag = "12.4.0" // DefaultEVETag tag for EVE image
DefaultAdamTag = "0.0.43"
DefaultRedisTag = "7"
DefaultRegistryTag = "2.7"
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 @@ -33,7 +33,7 @@
test eden.app.test -test.v -timewait 10m RUNNING local-manager

# Wait for ssh access
exec -t 5m bash wait-ssh.sh {{template "mngr_port"}}

Check failure on line 36 in tests/eclient/testdata/app_local_info.txt

View workflow job for this annotation

GitHub Actions / Execute Eden test workflow / LPC LOC test suite

[stdout] /home/runner/actions-runner/_work/eden/eden/eden/dist/bin/eden sdn fwd eth0 8027 -- ssh -q -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o PasswordAuthentication=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 Ubuntu /etc/issue time="2024-06-17T13:10:09Z" level=fatal msg="command ssh failed: exit status 255" /home/runner/actions-runner/_work/eden/eden/eden/dist/bin/eden sdn fwd eth0 8027 -- ssh -q -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o PasswordAuthentication=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 Ubuntu /etc/issue time="2024-06-17T13:10:39Z" level=fatal msg="command ssh failed: exit status 255" /home/runner/actions-runner/_work/eden/eden/eden/dist/bin/eden sdn fwd eth0 8027 -- ssh -q -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o PasswordAuthentication=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 Ubuntu /etc/issue time="2024-06-17T13:11:09Z" level=fatal msg="command ssh failed: exit status 255" /home/runner/actions-runner/_work/eden/eden/eden/dist/bin/eden sdn fwd eth0 8027 -- ssh -q -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o PasswordAuthentication=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 Ubuntu /etc/issue time="2024-06-17T13:11:39Z" level=fatal msg="command ssh failed: exit status 255" /home/runner/actions-runner/_work/eden/eden/eden/dist/bin/eden sdn fwd eth0 8027 -- ssh -q -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o PasswordAuthentication=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 Ubuntu /etc/issue time="2024-06-17T13:12:09Z" level=fatal msg="command ssh failed: exit status 255" /home/runner/actions-runner/_work/eden/eden/eden/dist/bin/eden sdn fwd eth0 8027 -- ssh -q -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o PasswordAuthentication=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 Ubuntu /etc/issue time="2024-06-17T13:12:39Z" level=fatal msg="command ssh failed: exit status 255" /home/runner/actions-runner/_work/eden/eden/eden/dist/bin/eden sdn fwd eth0 8027 -- ssh -q -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o PasswordAuthentication=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 Ubuntu /etc/issue time="2024-06-17T13:13:09Z" level=fatal msg="command ssh failed: exit status 255" /home/runner/actions-runner/_work/eden/eden/eden/dist/bin/eden sdn fwd eth0 8027 -- ssh -q -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o PasswordAuthentication=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 Ubuntu /etc/issue time="2024-06-17T13:13:39Z" level=fatal msg="command ssh failed: exit status 255" /home/runner/actions-runner/_work/eden/eden/eden/dist/bin/eden sdn fwd eth0 8027 -- ssh -q -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o PasswordAuthentication=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 Ubuntu /etc/issue time="2024-06-17T13:14:09Z" level=fatal msg="command ssh failed: exit status 255" /home/runner/actions-runner/_work/eden/eden/eden/dist/bin/eden sdn fwd eth0 8027 -- ssh -q -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o PasswordAuthentication=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 Ubuntu /etc/issue [context deadline exceeded] FAIL: ../eclient/testdata/app_local_info.txt:36: command failure

# Start local manager application
exec -t 1m bash local-manager-start.sh
Expand Down Expand Up @@ -192,14 +192,18 @@
DN="$1"
TIMESTAMP="${2:-0}"
CMD="${3:-COMMAND_UNSPECIFIED}"
EXPECTED_CMD="$CMD"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes contained in this PR are already merged except for this modification in app_local_info.txt
However, the test passes so maybe it is not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok; then I just close this PR.

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
Loading