mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
fix(docker): start the Windows binary with or without Docker running (#7166)
* fix(docker): start the Windows binary with or without Docker running The 2.4.0 Windows standalone binary exited at startup with an UnsatisfiedLinkError for Java_com_sun_jna_Native_open. docker-java's named-pipe socket calls JNA when the pipe does not open at once, and JNA was initialized at image build time, so its native dispatch library was loaded into the builder and never into the binary. JNA is now initialized at run time, its JNI metadata (from oracle/graalvm-reachability-metadata, CC0) and a proxy registration for NamedPipeSocket$Kernel32 are bundled, and FlociDockerHttpClient turns a LinkageError from the transport into an exception, so a JNA that still cannot load fails that one Docker call instead of the whole emulator. With JNA working, a Windows host without Docker never answered its health check: docker-java retries a missing pipe for the whole 30 s connect timeout, and DockerRetry retried the NoSuchFileException six times. The pipe is now opened once first and a missing or denied pipe fails at once, keeping docker-java's wait loop for a busy pipe, and DockerRetry no longer retries either error. The release smoke script prints both ends of a long log on failure. Signed-off-by: Hector Ventura <hectorvent@gmail.com> * test(docker): skip the named-pipe client tests on Windows and name the tolerated exception Both tests stand a temporary directory in for a pipe, which only behaves that way off Windows: there a directory opens as access-denied and Kernel32 loads. The busy-pipe catch now names its exception expected, as AGENTS.md asks for a tolerated one. Signed-off-by: Hector Ventura <hectorvent@gmail.com> --------- Signed-off-by: Hector Ventura <hectorvent@gmail.com>
This commit is contained in:
1 parent
60500fd28d
commit
2b1d91b7ca
9 files changed
+1428
-4
No files matched your search
@@ -44,8 +44,17 @@ trap cleanup EXIT
|
||||
|
||||
fail() {
|
||||
echo "FAIL: $*" >&2
|
||||
echo "--- floci log (last 60 lines) ---" >&2
|
||||
tail -n 60 "$LOG" >&2 || true
|
||||
# The first exception of a failed startup is at the top of the log and its cause chain at the
|
||||
# bottom, so a long log shows both ends.
|
||||
if [ "$(wc -l < "$LOG" 2>/dev/null || echo 0)" -le 200 ]; then
|
||||
echo "--- floci log ---" >&2
|
||||
cat "$LOG" >&2 || true
|
||||
else
|
||||
echo "--- floci log (first 100 lines) ---" >&2
|
||||
head -n 100 "$LOG" >&2 || true
|
||||
echo "--- floci log (last 100 lines) ---" >&2
|
||||
tail -n 100 "$LOG" >&2 || true
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user