This module contains tests that verify upgrade compatibility between Ignite versions using Docker containers. Docker compatibility tests (e.g. IgniteRebalanceOnUpgradeTest) require:
-Dru.source.image.name property pointing to that imagecompatibility-docker — activates Docker-specific build steps (only required for DOCKER upgrade mode; not needed in LOCAL mode)Example command:
export JAVA_TOOL_OPTIONS="-Djavax.net.ssl.trustStoreType=KeychainStore" ./mvnw test -pl modules/compatibility -Pcompatibility-docker,surefire-fork-count-1 \ -DskipTests=false \ -Dtest=org.apache.ignite.compatibility.ru.IgniteRebalanceOnUpgradeTest#testRollingUpgrade \ -Dru.source.image.name=<image_name>
This test verifies that data rebalancing works correctly when upgrading Ignite from a specific version to the current codebase. It supports two upgrade modes:
libs/ directory and restarting.Run the following script from the project root, passing the commit hash of the version you want to test against:
./modules/compatibility/src/test/resources/docker/build_docker_image.sh <commit_hash>
Note: If you omit
<commit_hash>, the script will use the hash of the latest commit in the current branch.
The script will:
./mvnw clean install -T1C -Pall-java,licenses -DskipTests)../mvnw initialize -Prelease).apacheignite/ignite:<commit_hash>.Note: If a distribution archive already exists in
target/bin/, the build steps will be skipped.
Note: If the Docker image
apacheignite/ignite:<commit_hash>is already built (e.g. from a previous run), you can skip Step 1 entirely and go directly to Step 2.
Run IgniteRebalanceOnUpgradeTest from your IDE or via Maven. The source version image name must be explicitly provided via -Dru.source.image.name:
./mvnw test -pl modules/compatibility -Dtest=IgniteRebalanceOnUpgradeTest \ -Dru.source.image.name=<image_name> \ -Pcompatibility-docker,surefire-fork-count-1
All nodes stay in Docker containers throughout the test. Each node is upgraded in-place:
docker stop)./opt/ignite/apache-ignite/libs/ are replaced by target jars from the host.docker start).The Docker image for the source cluster is the same as in LOCAL mode — only one image is needed. The target-version jars are provided from the host filesystem.
Option A: Automatic (recommended) — use the compatibility-docker profile:
./mvnw test -pl modules/compatibility -Dtest=IgniteRebalanceOnUpgradeTest \ -Dru.source.image.name=<image_name> \ -Psurefire-fork-count-1,compatibility-docker
The profile will automatically:
project/target/ignite-target-libs symlink exists.project/target/bin/.mvn install + mvn initialize -Prelease).project/target/bin/ (the distribution lands in project/target/bin/apache-ignite-*-bin/).project/target/ignite-target-libs → project/target/bin/apache-ignite-*-bin/libs/:ln -s "$(ls -d target/bin/apache-ignite-*-bin/libs)" target/ignite-target-libs
Note: Subsequent runs will skip the build if the symlink or the distribution ZIP already exists.
Option B: Manual — build, extract, and specify the libs directory:
./mvnw clean install -T1C -Pall-java -DskipTests ./mvnw initialize -Prelease cd target/bin && unzip apache-ignite-*-bin.zip && cd ../.. ./mvnw test -pl modules/compatibility -Dtest=IgniteRebalanceOnUpgradeTest \ -Dru.source.image.name=<image_name> \ -Dru.target.libs.dir=target/bin/apache-ignite-<version>-bin/libs \ -Psurefire-fork-count-1
The source (old-version) cluster starts in Docker containers. During rolling upgrade each container is stopped and replaced by a local host-JVM node with the same consistentId and persistence directory.
-Dru.upgrade.mode=LOCAL../mvnw test -pl modules/compatibility -Dtest=IgniteRebalanceOnUpgradeTest \ -Dru.upgrade.mode=LOCAL \ -Dru.source.image.name=<image_name> \ -Psurefire-fork-count-1
| Property | Default | Class | Description |
|---|---|---|---|
ru.upgrade.mode | DOCKER | IgniteRebalanceOnUpgradeTest | Upgrade mode: LOCAL or DOCKER |
ru.source.image.name | - | IgniteRebalanceOnUpgradeTest | The source (old-version) Docker image name, e.g. apacheignite/ignite:2.18.0 |
ru.target.libs.dir | <project.dir>/target/ignite-target-libs | IgniteContainer | Host directory with target-version jars (DOCKER mode only) |
ru.local.work.dir | <project.dir>/target/test-ignite-work | IgniteContainer | Local directory bind-mounted as Ignite work directory (persists across container restarts) |