Skip to content

Commit

Permalink
Attempting to get debug information from ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Frantisek Tobias committed Sep 27, 2024
1 parent 04cb668 commit 5949a8e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 25 deletions.
5 changes: 0 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -668,11 +668,6 @@ pkg:ubuntu-22.04:
<<: *pkg_test_deb
<<: *enable_repo_build
image: $CI_REGISTRY/packaging/apkg/full/ubuntu-22.04
after_script:
- chmod +x tests/packaging/systemd_service.sh
- ./tests/packaging/systemd_service.sh || true
- cat knot-resolver.log || true
- rm -f knot-resolver.log || true

pkg:ubuntu-20.04:
<<: *pkg_test_deb
Expand Down
10 changes: 6 additions & 4 deletions daemon/session2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1443,13 +1443,15 @@ static int session2_transport_pushv(struct session2 *s,
ctx);
return kr_ok();
} else {
int ret = uv_udp_try_send((uv_udp_t*)handle, (uv_buf_t *)iov, iovcnt,
int ret;
ret = uv_udp_try_send((uv_udp_t*)handle, (uv_buf_t *)iov, iovcnt,
the_network->enable_connect_udp ? NULL : comm->comm_addr);

if (ret == UV_EAGAIN) {
if (ret > 0) { // equals buffer size, only confuses us
ret = 0;
} else if (ret == UV_EAGAIN) {
ret = kr_error(ENOBUFS);
session2_event(s, PROTOLAYER_EVENT_OS_BUFFER_FULL, NULL);
} else if (ret < 0) {
} else {
kr_log_error(IO, "UDP connected send failed unexpectedly: %s\n",
uv_strerror(ret));
session2_transport_pushv_finished(ret, ctx);
Expand Down
2 changes: 0 additions & 2 deletions daemon/worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,6 @@ static int transmit(struct qr_task *task)
} while (ret == UV_EADDRINUSE && --connect_tries > 0);
if (ret < 0) {
kr_log_error(IO, "Failed to establish udp connection: %s\n", uv_strerror(ret));
session2_force_close(session);
return ret;
}
}
ret = qr_task_send(task, session, &out_comm, task->pktbuf);
Expand Down
2 changes: 1 addition & 1 deletion etc/config/config.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ management:
cache:
storage: ./cache
logging:
level: debug
level: info
groups:
- manager
- supervisord
Expand Down
13 changes: 0 additions & 13 deletions tests/packaging/systemd_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ if test "$(id -u)" -ne 0; then
exit 1
fi

LOGFILE="knot-resolver.log"
touch $LOGFILE

# We will be starting a systemd service, but another tests might do the same
# so this makes sure there is nothing left after we exit
trap "systemctl stop knot-resolver.service" EXIT
Expand All @@ -31,19 +28,13 @@ if ! systemctl start knot-resolver.service; then
else
set +e



# check that the resolvers are actually running
kdig @127.0.0.1 +edns nic.cz | tee /dev/stderr | grep -qi 'status: NOERROR'
if [ "$?" -ne "0" ]; then
echo "Could not 'kdig' the resolvers - are they running?"
exit 1
fi

# Log output from the service
journalctl -u knot-resolver.service -n 100 -f > "$LOGFILE" &
JOURNAL_PID=$!

echo "Running interactive tests..."
exit_code="0"
for test in "$(dirname $0)"/interactive/*; do
Expand All @@ -55,9 +46,5 @@ else
fi
echo "[test] $test OK"
done

kill $JOURNAL_PID
cat "$LOGFILE"

exit "$exit_code"
fi

0 comments on commit 5949a8e

Please sign in to comment.