diff --git a/.github/workflows/codeql-verification.yml b/.github/workflows/codeql-verification.yml index 6dc841b613..3eaabe977a 100644 --- a/.github/workflows/codeql-verification.yml +++ b/.github/workflows/codeql-verification.yml @@ -31,7 +31,7 @@ jobs: test -z "$(git status --porcelain)" git merge-base --is-ancestor origin/main HEAD test "$(git rev-list --count origin/main..HEAD)" -eq 1 - grep -Fxq ' 0.183.289' code/meta-parent/pom.xml + grep -Fxq ' 0.183.290' code/meta-parent/pom.xml - name: Initialize CodeQL uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8 diff --git a/README.md b/README.md index 02eb17457b..0fc4e009c7 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ The gate performs dependency-hygiene checks, builds every Maven module with JDK To create the complete release archive after the gate passes: ```sh -ENGINE_VERSION=0.183.288 bash scripts/build --release +ENGINE_VERSION=0.183.290 bash scripts/build --release bash scripts/check-release-artifact dist/artifacts/cattle.jar ``` diff --git a/code/framework/api-pub-sub-jetty/pom.xml b/code/framework/api-pub-sub-jetty/pom.xml index 0c5aee2281..235825617e 100644 --- a/code/framework/api-pub-sub-jetty/pom.xml +++ b/code/framework/api-pub-sub-jetty/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/api-pub-sub/pom.xml b/code/framework/api-pub-sub/pom.xml index fa47d4ea61..7ca19d5b7b 100644 --- a/code/framework/api-pub-sub/pom.xml +++ b/code/framework/api-pub-sub/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/api/pom.xml b/code/framework/api/pom.xml index 2bfe7125aa..3c450a43ae 100644 --- a/code/framework/api/pom.xml +++ b/code/framework/api/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/archaius/pom.xml b/code/framework/archaius/pom.xml index 61c6927722..94809d0b26 100644 --- a/code/framework/archaius/pom.xml +++ b/code/framework/archaius/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-meta-parent - 0.183.289 + 0.183.290 ../../meta-parent/pom.xml diff --git a/code/framework/async/pom.xml b/code/framework/async/pom.xml index 5541dbe178..d7563e0393 100644 --- a/code/framework/async/pom.xml +++ b/code/framework/async/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/auditing/pom.xml b/code/framework/auditing/pom.xml index 4e08f80a29..a3a2383073 100644 --- a/code/framework/auditing/pom.xml +++ b/code/framework/auditing/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/db-loader/pom.xml b/code/framework/db-loader/pom.xml index 80cfa08bbb..5cdc1fcf5a 100644 --- a/code/framework/db-loader/pom.xml +++ b/code/framework/db-loader/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/deferred/pom.xml b/code/framework/deferred/pom.xml index 86e207608b..e8368a85a8 100644 --- a/code/framework/deferred/pom.xml +++ b/code/framework/deferred/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/encryption/pom.xml b/code/framework/encryption/pom.xml index b8aa8382bb..b47df7946e 100644 --- a/code/framework/encryption/pom.xml +++ b/code/framework/encryption/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/engine/pom.xml b/code/framework/engine/pom.xml index deee43a09a..d098f34a6b 100644 --- a/code/framework/engine/pom.xml +++ b/code/framework/engine/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/eventing/pom.xml b/code/framework/eventing/pom.xml index 63fd19a10b..2ad976d077 100644 --- a/code/framework/eventing/pom.xml +++ b/code/framework/eventing/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/events/pom.xml b/code/framework/events/pom.xml index b3f1bc7970..f8c7220884 100644 --- a/code/framework/events/pom.xml +++ b/code/framework/events/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/extension-spring/pom.xml b/code/framework/extension-spring/pom.xml index 4d8cf5a41e..0938a391ce 100644 --- a/code/framework/extension-spring/pom.xml +++ b/code/framework/extension-spring/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/extension/pom.xml b/code/framework/extension/pom.xml index 3df584747a..bff2f8e4fc 100644 --- a/code/framework/extension/pom.xml +++ b/code/framework/extension/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/java-server/pom.xml b/code/framework/java-server/pom.xml index 67e50df5bb..9110e2ba37 100644 --- a/code/framework/java-server/pom.xml +++ b/code/framework/java-server/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/jmx/pom.xml b/code/framework/jmx/pom.xml index b28bd4120c..615ea9900e 100644 --- a/code/framework/jmx/pom.xml +++ b/code/framework/jmx/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/jooq/pom.xml b/code/framework/jooq/pom.xml index ada0bb277a..393dc82cf3 100644 --- a/code/framework/jooq/pom.xml +++ b/code/framework/jooq/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/json/pom.xml b/code/framework/json/pom.xml index 7052a75180..e27b062b72 100644 --- a/code/framework/json/pom.xml +++ b/code/framework/json/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/launcher/pom.xml b/code/framework/launcher/pom.xml index e812367126..d6fb03d554 100644 --- a/code/framework/launcher/pom.xml +++ b/code/framework/launcher/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/lock/pom.xml b/code/framework/lock/pom.xml index 601465e82d..186f870ec7 100644 --- a/code/framework/lock/pom.xml +++ b/code/framework/lock/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/logback/pom.xml b/code/framework/logback/pom.xml index 8cae2bf391..36ba13980f 100644 --- a/code/framework/logback/pom.xml +++ b/code/framework/logback/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-meta-parent - 0.183.289 + 0.183.290 ../../meta-parent/pom.xml diff --git a/code/framework/managed-context/pom.xml b/code/framework/managed-context/pom.xml index 410cd0fcd6..2bc9942e63 100644 --- a/code/framework/managed-context/pom.xml +++ b/code/framework/managed-context/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/metrics/pom.xml b/code/framework/metrics/pom.xml index 7795f2b358..80e928acee 100644 --- a/code/framework/metrics/pom.xml +++ b/code/framework/metrics/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/module/pom.xml b/code/framework/module/pom.xml index b92be701da..2b4d4ac3a3 100644 --- a/code/framework/module/pom.xml +++ b/code/framework/module/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/object/pom.xml b/code/framework/object/pom.xml index 23be3c20ad..c8d24f79f0 100644 --- a/code/framework/object/pom.xml +++ b/code/framework/object/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/pool/pom.xml b/code/framework/pool/pom.xml index b85628261a..207f7dabd4 100644 --- a/code/framework/pool/pom.xml +++ b/code/framework/pool/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/resource-monitor/pom.xml b/code/framework/resource-monitor/pom.xml index 65d25aceff..629b91e0b6 100644 --- a/code/framework/resource-monitor/pom.xml +++ b/code/framework/resource-monitor/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/schema/pom.xml b/code/framework/schema/pom.xml index 11c4cc3ed9..f7756d2b3d 100644 --- a/code/framework/schema/pom.xml +++ b/code/framework/schema/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/server/pom.xml b/code/framework/server/pom.xml index 57fb3c746b..a24b59ab8a 100644 --- a/code/framework/server/pom.xml +++ b/code/framework/server/pom.xml @@ -4,7 +4,7 @@ cattle-meta-parent io.cattle - 0.183.289 + 0.183.290 ../../meta-parent/pom.xml diff --git a/code/framework/spring/pom.xml b/code/framework/spring/pom.xml index 96cd63e40a..5cfb6a83f6 100644 --- a/code/framework/spring/pom.xml +++ b/code/framework/spring/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/system-task/pom.xml b/code/framework/system-task/pom.xml index 0797d3d287..d6f74d2f9b 100644 --- a/code/framework/system-task/pom.xml +++ b/code/framework/system-task/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/token/pom.xml b/code/framework/token/pom.xml index 4dff81a391..4c974c1ee2 100644 --- a/code/framework/token/pom.xml +++ b/code/framework/token/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/framework/utils/pom.xml b/code/framework/utils/pom.xml index d77c26147d..92f411465b 100644 --- a/code/framework/utils/pom.xml +++ b/code/framework/utils/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/agent-instance/pom.xml b/code/iaas/agent-instance/pom.xml index ae772528fa..d4d8fb1499 100644 --- a/code/iaas/agent-instance/pom.xml +++ b/code/iaas/agent-instance/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/agent-server/pom.xml b/code/iaas/agent-server/pom.xml index 621f1c358c..4a236cb135 100644 --- a/code/iaas/agent-server/pom.xml +++ b/code/iaas/agent-server/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/agent/pom.xml b/code/iaas/agent/pom.xml index 49ac03f21f..e8d8f98098 100644 --- a/code/iaas/agent/pom.xml +++ b/code/iaas/agent/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/allocator/pom.xml b/code/iaas/allocator/pom.xml index d5104c5093..568aa6f21a 100644 --- a/code/iaas/allocator/pom.xml +++ b/code/iaas/allocator/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/api-logic/pom.xml b/code/iaas/api-logic/pom.xml index b50b2ff4fd..e42c52a242 100644 --- a/code/iaas/api-logic/pom.xml +++ b/code/iaas/api-logic/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/api-logic/src/main/java/io/cattle/platform/iaas/api/volume/VolumePreflightService.java b/code/iaas/api-logic/src/main/java/io/cattle/platform/iaas/api/volume/VolumePreflightService.java index 052039cc6b..754b5738bc 100644 --- a/code/iaas/api-logic/src/main/java/io/cattle/platform/iaas/api/volume/VolumePreflightService.java +++ b/code/iaas/api-logic/src/main/java/io/cattle/platform/iaas/api/volume/VolumePreflightService.java @@ -1,7 +1,6 @@ package io.cattle.platform.iaas.api.volume; import static io.cattle.platform.core.model.tables.StorageDriverTable.STORAGE_DRIVER; -import static io.cattle.platform.core.model.tables.VolumeTable.VOLUME; import io.cattle.platform.core.addon.VolumePreflightInput; import io.cattle.platform.core.addon.VolumePreflightIssue; @@ -9,6 +8,7 @@ import io.cattle.platform.core.constants.CommonStatesConstants; import io.cattle.platform.core.constants.StorageDriverConstants; import io.cattle.platform.core.dao.StoragePoolDao; +import io.cattle.platform.core.dao.VolumeDao; import io.cattle.platform.core.model.Account; import io.cattle.platform.core.model.Host; import io.cattle.platform.core.model.Instance; @@ -58,6 +58,9 @@ public class VolumePreflightService { @Inject StoragePoolDao storagePoolDao; + @Inject + VolumeDao volumeDao; + @Inject PortPreflightDao hostDao; @@ -233,29 +236,44 @@ private void validateSpecsAgainstDriver(Account account, List specs, continue; } - List volumes = objectManager.find(Volume.class, - VOLUME.ACCOUNT_ID, account.getId(), - VOLUME.NAME, spec.source, - VOLUME.REMOVED, null); - if (volumes.size() > 1) { - issues.add(issue("blocked", "ambiguous_existing_volume", + List volumes = findResolvableNamedVolumes(account.getId(), spec.source); + for (String reason : existingNamedVolumeReasons(volumes, expectedDriverId)) { + issues.add(issue("blocked", reason, Integer.valueOf(spec.index), spec.raw, requestedDriver)); - continue; - } - if (volumes.size() == 1) { - Volume existing = volumes.get(0); - if (!equalLong(expectedDriverId, existing.getStorageDriverId())) { - issues.add(issue("blocked", "volume_driver_mismatch", - Integer.valueOf(spec.index), spec.raw, requestedDriver)); - } - if (UNUSABLE_VOLUME_STATES.contains(String.valueOf(existing.getState()).toLowerCase(Locale.ENGLISH))) { - issues.add(issue("blocked", "existing_volume_unusable", - Integer.valueOf(spec.index), spec.raw, requestedDriver)); - } } } } + List findResolvableNamedVolumes(long accountId, String volumeName) { + /* + * Keep preflight aligned with InstanceVolumeLookupPreCreate. Docker-local named + * volumes legitimately have one API record per host and remain in dataVolumes + * until placement. Only shared or unmapped volumes participate in the + * environment-wide name lookup and can therefore be ambiguous here. + */ + return volumeDao.findSharedOrUnmappedVolumes(accountId, volumeName); + } + + static List existingNamedVolumeReasons(List volumes, + Long expectedDriverId) { + if (volumes.size() > 1) { + return Collections.singletonList("ambiguous_existing_volume"); + } + if (volumes.isEmpty()) { + return Collections.emptyList(); + } + + List reasons = new ArrayList(); + Volume existing = volumes.get(0); + if (!equalLong(expectedDriverId, existing.getStorageDriverId())) { + reasons.add("volume_driver_mismatch"); + } + if (UNUSABLE_VOLUME_STATES.contains(String.valueOf(existing.getState()).toLowerCase(Locale.ENGLISH))) { + reasons.add("existing_volume_unusable"); + } + return reasons; + } + static List parseSpecs(List values, List issues) { List result = new ArrayList(); for (int index = 0; index < values.size(); index++) { diff --git a/code/iaas/api-logic/src/test/java/io/cattle/platform/iaas/api/volume/VolumePreflightServiceTest.java b/code/iaas/api-logic/src/test/java/io/cattle/platform/iaas/api/volume/VolumePreflightServiceTest.java index 51c85cb268..53f328485d 100644 --- a/code/iaas/api-logic/src/test/java/io/cattle/platform/iaas/api/volume/VolumePreflightServiceTest.java +++ b/code/iaas/api-logic/src/test/java/io/cattle/platform/iaas/api/volume/VolumePreflightServiceTest.java @@ -4,7 +4,14 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import io.cattle.platform.core.dao.VolumeDao; +import io.cattle.platform.core.model.Volume; +import io.cattle.platform.core.model.tables.records.VolumeRecord; + +import java.lang.reflect.Proxy; import java.util.Arrays; +import java.util.Collections; +import java.util.List; import org.junit.Test; @@ -92,4 +99,53 @@ public void doesNotApplyTheNfsContractToOtherStorageDrivers() { assertTrue(VolumePreflightService.nfsContractReasons( "other-driver", false, "singleHostRW", 0, 2).isEmpty()); } + + @Test + public void usesRuntimeResolvableLookupSoPerHostDockerVolumesAreNotAmbiguous() { + final boolean[] called = new boolean[] { false }; + VolumeDao dao = (VolumeDao) Proxy.newProxyInstance( + VolumeDao.class.getClassLoader(), new Class[] { VolumeDao.class }, + (proxy, method, args) -> { + if ("findSharedOrUnmappedVolumes".equals(method.getName())) { + called[0] = true; + assertEquals(Long.valueOf(7L), args[0]); + assertEquals("rancher-cni-driver", args[1]); + return Collections.emptyList(); + } + throw new UnsupportedOperationException(method.getName()); + }); + VolumePreflightService service = new VolumePreflightService(); + service.volumeDao = dao; + + List resolved = service.findResolvableNamedVolumes( + 7L, "rancher-cni-driver"); + + assertTrue(called[0]); + assertTrue(resolved.isEmpty()); + assertTrue(VolumePreflightService.existingNamedVolumeReasons( + resolved, null).isEmpty()); + } + + @Test + public void stillRejectsMultipleSharedOrUnmappedVolumes() { + VolumeRecord first = new VolumeRecord(); + first.setState("active"); + VolumeRecord second = new VolumeRecord(); + second.setState("active"); + + assertEquals(Collections.singletonList("ambiguous_existing_volume"), + VolumePreflightService.existingNamedVolumeReasons( + Arrays.asList(first, second), null)); + } + + @Test + public void stillRejectsDriverMismatchAndUnusableResolvedVolume() { + VolumeRecord existing = new VolumeRecord(); + existing.setStorageDriverId(Long.valueOf(9L)); + existing.setState("removing"); + + assertEquals(Arrays.asList("volume_driver_mismatch", "existing_volume_unusable"), + VolumePreflightService.existingNamedVolumeReasons( + Collections.singletonList(existing), Long.valueOf(10L))); + } } diff --git a/code/iaas/archaius-management/pom.xml b/code/iaas/archaius-management/pom.xml index 5bc545f9f3..2a17219de3 100644 --- a/code/iaas/archaius-management/pom.xml +++ b/code/iaas/archaius-management/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/auth-logic/pom.xml b/code/iaas/auth-logic/pom.xml index a0f4718a64..f5af54e6b1 100644 --- a/code/iaas/auth-logic/pom.xml +++ b/code/iaas/auth-logic/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/bootstrap/pom.xml b/code/iaas/bootstrap/pom.xml index d718653b09..577aa49cce 100644 --- a/code/iaas/bootstrap/pom.xml +++ b/code/iaas/bootstrap/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/config-item/api/pom.xml b/code/iaas/config-item/api/pom.xml index 8c7b9dfbe0..e6c3dee184 100644 --- a/code/iaas/config-item/api/pom.xml +++ b/code/iaas/config-item/api/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/iaas/config-item/common/pom.xml b/code/iaas/config-item/common/pom.xml index feeef20f76..7f55b6654a 100644 --- a/code/iaas/config-item/common/pom.xml +++ b/code/iaas/config-item/common/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/iaas/config-item/server/pom.xml b/code/iaas/config-item/server/pom.xml index f77eccd0e9..5501d28c33 100644 --- a/code/iaas/config-item/server/pom.xml +++ b/code/iaas/config-item/server/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/iaas/engine-jooq/pom.xml b/code/iaas/engine-jooq/pom.xml index 919bda9777..5094a22660 100644 --- a/code/iaas/engine-jooq/pom.xml +++ b/code/iaas/engine-jooq/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/events/pom.xml b/code/iaas/events/pom.xml index e226e3e754..055d4a2d19 100644 --- a/code/iaas/events/pom.xml +++ b/code/iaas/events/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/external-handler/pom.xml b/code/iaas/external-handler/pom.xml index 7b31cf9477..16f903d3d7 100644 --- a/code/iaas/external-handler/pom.xml +++ b/code/iaas/external-handler/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/ha/pom.xml b/code/iaas/ha/pom.xml index e213eaeaae..ff1c3e51a8 100644 --- a/code/iaas/ha/pom.xml +++ b/code/iaas/ha/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/healthcheck/pom.xml b/code/iaas/healthcheck/pom.xml index fecba76ad9..3022c669ae 100644 --- a/code/iaas/healthcheck/pom.xml +++ b/code/iaas/healthcheck/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/labels/pom.xml b/code/iaas/labels/pom.xml index 06ac9cbcd7..a7b65afdd9 100644 --- a/code/iaas/labels/pom.xml +++ b/code/iaas/labels/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/logic-common/pom.xml b/code/iaas/logic-common/pom.xml index 51aad5999f..f395f9783d 100644 --- a/code/iaas/logic-common/pom.xml +++ b/code/iaas/logic-common/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/logic/pom.xml b/code/iaas/logic/pom.xml index d23279dcee..fda2f1902a 100644 --- a/code/iaas/logic/pom.xml +++ b/code/iaas/logic/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/metadata/pom.xml b/code/iaas/metadata/pom.xml index 1ff6fa3843..94a7221d64 100644 --- a/code/iaas/metadata/pom.xml +++ b/code/iaas/metadata/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/model/pom.xml b/code/iaas/model/pom.xml index 73d1140323..2fef8dca6b 100644 --- a/code/iaas/model/pom.xml +++ b/code/iaas/model/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/resource-pool/pom.xml b/code/iaas/resource-pool/pom.xml index 67eb8dcf99..f1336c5eb7 100644 --- a/code/iaas/resource-pool/pom.xml +++ b/code/iaas/resource-pool/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/service-discovery/api/pom.xml b/code/iaas/service-discovery/api/pom.xml index d13ea46eef..a11e74b7c0 100644 --- a/code/iaas/service-discovery/api/pom.xml +++ b/code/iaas/service-discovery/api/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/iaas/service-discovery/server/pom.xml b/code/iaas/service-discovery/server/pom.xml index d3d0d7d29f..62c9f64e5c 100644 --- a/code/iaas/service-discovery/server/pom.xml +++ b/code/iaas/service-discovery/server/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/iaas/ssh-common/pom.xml b/code/iaas/ssh-common/pom.xml index 748d56929f..f1f0d5f0ba 100644 --- a/code/iaas/ssh-common/pom.xml +++ b/code/iaas/ssh-common/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/storage-service/pom.xml b/code/iaas/storage-service/pom.xml index d0ddc69b23..ac7fa1c2e4 100644 --- a/code/iaas/storage-service/pom.xml +++ b/code/iaas/storage-service/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/iaas/task-jooq/pom.xml b/code/iaas/task-jooq/pom.xml index b52d769d6b..25e260b655 100644 --- a/code/iaas/task-jooq/pom.xml +++ b/code/iaas/task-jooq/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/implementation/activity-log/pom.xml b/code/implementation/activity-log/pom.xml index b9b3ae513e..1792410e08 100644 --- a/code/implementation/activity-log/pom.xml +++ b/code/implementation/activity-log/pom.xml @@ -5,7 +5,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/implementation/agent-instance-impl/pom.xml b/code/implementation/agent-instance-impl/pom.xml index 2c47a4f2e4..bbbe3f64b9 100644 --- a/code/implementation/agent-instance-impl/pom.xml +++ b/code/implementation/agent-instance-impl/pom.xml @@ -3,7 +3,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml cattle-agent-instance-impl diff --git a/code/implementation/docker/api/pom.xml b/code/implementation/docker/api/pom.xml index ac90cb2c8e..b54136adb0 100644 --- a/code/implementation/docker/api/pom.xml +++ b/code/implementation/docker/api/pom.xml @@ -5,7 +5,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/implementation/docker/common/pom.xml b/code/implementation/docker/common/pom.xml index 9e7849ed9d..68bfe51f58 100644 --- a/code/implementation/docker/common/pom.xml +++ b/code/implementation/docker/common/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/implementation/docker/compute/pom.xml b/code/implementation/docker/compute/pom.xml index ec28710bdf..0e18007c33 100644 --- a/code/implementation/docker/compute/pom.xml +++ b/code/implementation/docker/compute/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/implementation/docker/machine/pom.xml b/code/implementation/docker/machine/pom.xml index d5770b1852..c0a1691914 100644 --- a/code/implementation/docker/machine/pom.xml +++ b/code/implementation/docker/machine/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/implementation/docker/storage/pom.xml b/code/implementation/docker/storage/pom.xml index 2ff2a918b9..61a3676191 100644 --- a/code/implementation/docker/storage/pom.xml +++ b/code/implementation/docker/storage/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml @@ -21,12 +21,12 @@ io.cattle cattle-docker-common - 0.183.289 + 0.183.290 io.cattle cattle-iaas-allocator - 0.183.289 + 0.183.290 diff --git a/code/implementation/extension-api/pom.xml b/code/implementation/extension-api/pom.xml index e61f82f7fb..3daca38bf8 100644 --- a/code/implementation/extension-api/pom.xml +++ b/code/implementation/extension-api/pom.xml @@ -3,7 +3,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml cattle-extension-api diff --git a/code/implementation/hazelcast/common/pom.xml b/code/implementation/hazelcast/common/pom.xml index 7ddde386f0..ae494b2492 100644 --- a/code/implementation/hazelcast/common/pom.xml +++ b/code/implementation/hazelcast/common/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/implementation/hazelcast/eventing/pom.xml b/code/implementation/hazelcast/eventing/pom.xml index 28b31492c9..091bf085af 100644 --- a/code/implementation/hazelcast/eventing/pom.xml +++ b/code/implementation/hazelcast/eventing/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/implementation/hazelcast/lock/pom.xml b/code/implementation/hazelcast/lock/pom.xml index c4cb5219a9..b27bda7d67 100644 --- a/code/implementation/hazelcast/lock/pom.xml +++ b/code/implementation/hazelcast/lock/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/implementation/host-api/pom.xml b/code/implementation/host-api/pom.xml index 34cf590f68..a87afbd33a 100644 --- a/code/implementation/host-api/pom.xml +++ b/code/implementation/host-api/pom.xml @@ -5,7 +5,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/implementation/host-stats/pom.xml b/code/implementation/host-stats/pom.xml index 5d1dfc92aa..71b7e0a928 100644 --- a/code/implementation/host-stats/pom.xml +++ b/code/implementation/host-stats/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/implementation/register/pom.xml b/code/implementation/register/pom.xml index 6e8ea00c15..4db04c641b 100644 --- a/code/implementation/register/pom.xml +++ b/code/implementation/register/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/implementation/sample-setup/pom.xml b/code/implementation/sample-setup/pom.xml index 17828ba5fd..30a1af9f69 100644 --- a/code/implementation/sample-setup/pom.xml +++ b/code/implementation/sample-setup/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/implementation/settings-api/pom.xml b/code/implementation/settings-api/pom.xml index fd8047611a..25084cd3af 100644 --- a/code/implementation/settings-api/pom.xml +++ b/code/implementation/settings-api/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/implementation/simulator/agent-connection/pom.xml b/code/implementation/simulator/agent-connection/pom.xml index d4e042c9c6..9b2da834f1 100644 --- a/code/implementation/simulator/agent-connection/pom.xml +++ b/code/implementation/simulator/agent-connection/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/implementation/simulator/storage/pom.xml b/code/implementation/simulator/storage/pom.xml index 0de0c83adf..4a53575e3b 100644 --- a/code/implementation/simulator/storage/pom.xml +++ b/code/implementation/simulator/storage/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../../parent/pom.xml diff --git a/code/implementation/system-stack/pom.xml b/code/implementation/system-stack/pom.xml index 56f284f006..e30a325b03 100644 --- a/code/implementation/system-stack/pom.xml +++ b/code/implementation/system-stack/pom.xml @@ -5,7 +5,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/implementation/vm/pom.xml b/code/implementation/vm/pom.xml index 9fdce4a767..be8874c725 100644 --- a/code/implementation/vm/pom.xml +++ b/code/implementation/vm/pom.xml @@ -3,7 +3,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml cattle-vm diff --git a/code/meta-parent/pom.xml b/code/meta-parent/pom.xml index 707caf0e19..2c3008c639 100644 --- a/code/meta-parent/pom.xml +++ b/code/meta-parent/pom.xml @@ -9,7 +9,7 @@ 4.0.0 io.cattle cattle-meta-parent - 0.183.289 + 0.183.290 pom PastureStack Orchestration Engine Compatibility orchestration engine for the PastureStack server. diff --git a/code/packaging/app-config/pom.xml b/code/packaging/app-config/pom.xml index ff3cfd297f..7bc8ed28a9 100644 --- a/code/packaging/app-config/pom.xml +++ b/code/packaging/app-config/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml jar diff --git a/code/packaging/app/pom.xml b/code/packaging/app/pom.xml index 6245bbb4c6..7e11d15ed9 100644 --- a/code/packaging/app/pom.xml +++ b/code/packaging/app/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml war diff --git a/code/packaging/bundle/pom.xml b/code/packaging/bundle/pom.xml index 3ae69d2a73..e12068c80f 100644 --- a/code/packaging/bundle/pom.xml +++ b/code/packaging/bundle/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/packaging/dev/pom.xml b/code/packaging/dev/pom.xml index 0a408ff6da..da9e3b0926 100644 --- a/code/packaging/dev/pom.xml +++ b/code/packaging/dev/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/packaging/meta/pom.xml b/code/packaging/meta/pom.xml index e2e331fb1e..acc8b5cee7 100644 --- a/code/packaging/meta/pom.xml +++ b/code/packaging/meta/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../../parent/pom.xml diff --git a/code/parent/pom.xml b/code/parent/pom.xml index 6f7c843bd0..f5c976c474 100644 --- a/code/parent/pom.xml +++ b/code/parent/pom.xml @@ -5,7 +5,7 @@ io.cattle cattle-meta-parent ../meta-parent/pom.xml - 0.183.289 + 0.183.290 pom diff --git a/docs/releases/orchestration-engine-0.183.290.md b/docs/releases/orchestration-engine-0.183.290.md new file mode 100644 index 0000000000..b9e16fe1da --- /dev/null +++ b/docs/releases/orchestration-engine-0.183.290.md @@ -0,0 +1,15 @@ +# Orchestration Engine v0.183.290 + +Keep named-volume preflight aligned with the actual container creation path. +Docker-local named volumes can legitimately have one API inventory record per +host; those records remain host-local until placement and are not an ambiguous +environment-wide shared-volume lookup. + +Preflight now checks the same shared-or-unmapped candidate set used by +`InstanceVolumeLookupPreCreate`. Multiple resolvable shared volumes still fail +closed, as do a storage-driver mismatch or an unusable resolved volume. No +volume is deleted, renamed or implicitly migrated by this change. + +The regression suite covers the per-host local-volume case and retains the +existing rejection cases. The source gate binds the runtime lookup used by the +preflight implementation. diff --git a/pom.xml b/pom.xml index 1c746587de..5cc02b672a 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ io.cattle cattle-parent - 0.183.289 + 0.183.290 code/parent/pom.xml cattle diff --git a/resources/pom.xml b/resources/pom.xml index 19f60d7b9c..6998292d90 100644 --- a/resources/pom.xml +++ b/resources/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.289 + 0.183.290 ../code/parent/pom.xml diff --git a/scripts/build b/scripts/build index 0b88c02680..4917f0af71 100755 --- a/scripts/build +++ b/scripts/build @@ -16,7 +16,7 @@ fi SOURCE_REVISION=${SOURCE_REVISION:-$(git rev-parse HEAD)} SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH:-$(git show -s --format=%ct HEAD)} -ENGINE_VERSION=${ENGINE_VERSION:-0.183.289} +ENGINE_VERSION=${ENGINE_VERSION:-0.183.290} case "$SOURCE_REVISION" in ''|*[!0-9a-f]*) diff --git a/scripts/check-pasturestack-source b/scripts/check-pasturestack-source index 164e437bd3..42b6fea6ac 100755 --- a/scripts/check-pasturestack-source +++ b/scripts/check-pasturestack-source @@ -41,7 +41,7 @@ fi project_version=$(sed -n 's/^[[:space:]]*\([^<]*\)<\/version>[[:space:]]*$/\1/p' code/meta-parent/pom.xml | head -n 1) [[ "$project_version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || fail non_numeric_project_version -require_line code/meta-parent/pom.xml ' 0.183.289' +require_line code/meta-parent/pom.xml ' 0.183.290' require_line code/meta-parent/pom.xml ' https://github.com/PastureStack/orchestration-engine' require_line Dockerfile 'FROM ubuntu:26.04@sha256:2260313b31c8c011cd2eebe728008efac1b3982be73eb71348ea2648d2c0e09b' require_line Dockerfile.dapper 'FROM ubuntu:26.04@sha256:2260313b31c8c011cd2eebe728008efac1b3982be73eb71348ea2648d2c0e09b' @@ -199,6 +199,7 @@ require_line code/iaas/api-logic/src/test/java/io/cattle/platform/iaas/api/port/ require_line code/iaas/api-logic/src/test/java/io/cattle/platform/iaas/api/port/PortPreflightServiceTest.java ' public void hostNetworkRequestedHostDoesNotTreatAnotherHostAsOccupied() {' require_line code/iaas/api-logic/src/main/java/io/cattle/platform/iaas/api/volume/VolumePreflightService.java ' public static final String ACTION = "volumepreflight";' require_line code/iaas/api-logic/src/main/java/io/cattle/platform/iaas/api/volume/VolumePreflightService.java ' public void assertAvailable(Account account, VolumePreflightInput input) {' +require_line code/iaas/api-logic/src/main/java/io/cattle/platform/iaas/api/volume/VolumePreflightService.java ' return volumeDao.findSharedOrUnmappedVolumes(accountId, volumeName);' require_line code/iaas/api-logic/src/main/resources/schema/base/project.json.d/volume-preflight.json ' "volumepreflight": {' require_line resources/content/schema/project/project-auth.json ' "volumePreflightInput" : "cr",' require_line resources/content/schema/project/project-auth.json ' "volumePreflightResult" : "r",' @@ -209,6 +210,7 @@ require_line code/packaging/app-config/src/main/java/io/cattle/platform/app/Core require_line code/packaging/app-config/src/test/java/io/cattle/platform/app/VolumePreflightSchemaAuthorizationTest.java ' public void coreAddonTypeSetRegistersEveryVolumePreflightSchema() {' require_line code/packaging/app-config/src/test/java/io/cattle/platform/app/VolumePreflightSchemaAuthorizationTest.java ' public void projectAuthorizationKeepsVolumePreflightActionSchemasVisible() throws Exception {' require_line code/iaas/api-logic/src/test/java/io/cattle/platform/iaas/api/volume/VolumePreflightServiceTest.java ' public void rejectsInvalidAnonymousModeInsteadOfTreatingItAsABindMount() {' +require_line code/iaas/api-logic/src/test/java/io/cattle/platform/iaas/api/volume/VolumePreflightServiceTest.java ' public void usesRuntimeResolvableLookupSoPerHostDockerVolumesAreNotAmbiguous() {' require_line code/iaas/api-logic/src/main/java/io/cattle/platform/iaas/api/volume/VolumePreflightService.java ' static List nfsContractReasons(String driverName, boolean environmentScope,' require_line code/iaas/api-logic/src/main/java/io/cattle/platform/iaas/api/volume/VolumePreflightService.java ' reasons.add("nfs_requires_environment_scope");' require_line code/iaas/api-logic/src/main/java/io/cattle/platform/iaas/api/volume/VolumePreflightService.java ' reasons.add("nfs_requires_multi_host_rw");' @@ -306,4 +308,4 @@ fi require_line README.md 'PastureStack is an independent community effort to preserve, audit, and modernize the Rancher 1.6 ecosystem. It is not affiliated with or endorsed by Rancher Labs or SUSE.' require_line ORIGIN.md '- Preserved upstream boundary: `82d154a53f4089fecfb9f320caad826bb4f6055f`' -printf 'PASTURESTACK_SOURCE_GATE_OK version=0.183.289 runtime_sources=github_release images=digest_pinned ubuntu=26.04 ubuntu_snapshot=20260826T000000Z jdk=25.0.4 maven=3.9.16 patched_hazelcast=5.7.3-pasturestack.4 docker=29.7.2 credential_secret_capacity=mediumtext port_preflight=authoritative volume_preflight=authoritative volume_preflight_project_schema=authorized volume_preflight_type_set=registered\n' +printf 'PASTURESTACK_SOURCE_GATE_OK version=0.183.290 runtime_sources=github_release images=digest_pinned ubuntu=26.04 ubuntu_snapshot=20260826T000000Z jdk=25.0.4 maven=3.9.16 patched_hazelcast=5.7.3-pasturestack.4 docker=29.7.2 credential_secret_capacity=mediumtext port_preflight=authoritative volume_preflight=runtime_resolution_aligned volume_preflight_project_schema=authorized volume_preflight_type_set=registered\n' diff --git a/scripts/check-release-artifact b/scripts/check-release-artifact index 47bcf9f05b..0023062444 100755 --- a/scripts/check-release-artifact +++ b/scripts/check-release-artifact @@ -4,7 +4,7 @@ set -euo pipefail cd "$(dirname "$0")/.." artifact=${1:-dist/artifacts/cattle.jar} -expected_version=${EXPECTED_ENGINE_VERSION:-0.183.289} +expected_version=${EXPECTED_ENGINE_VERSION:-0.183.290} test -f "$artifact" artifact=$(realpath "$artifact")