From 515a5d37a1194f827bc3ffde34db729905ecb2b1 Mon Sep 17 00:00:00 2001 From: chen21019 <19357113+chen21019@users.noreply.github.com> Date: Fri, 2 Oct 2026 14:01:02 +0800 Subject: [PATCH] fix: refresh stopped imported names with inactive mappings --- .github/workflows/security-release-gate.yml | 6 + README.md | 9 +- code/framework/api-pub-sub-jetty/pom.xml | 2 +- code/framework/api-pub-sub/pom.xml | 2 +- code/framework/api/pom.xml | 2 +- code/framework/archaius/pom.xml | 2 +- code/framework/async/pom.xml | 2 +- code/framework/auditing/pom.xml | 2 +- code/framework/db-loader/pom.xml | 2 +- code/framework/deferred/pom.xml | 2 +- code/framework/encryption/pom.xml | 2 +- code/framework/engine/pom.xml | 2 +- code/framework/eventing/pom.xml | 2 +- code/framework/events/pom.xml | 2 +- code/framework/extension-spring/pom.xml | 2 +- code/framework/extension/pom.xml | 2 +- code/framework/java-server/pom.xml | 2 +- code/framework/jmx/pom.xml | 2 +- code/framework/jooq/pom.xml | 2 +- code/framework/json/pom.xml | 2 +- code/framework/launcher/pom.xml | 2 +- code/framework/lock/pom.xml | 2 +- code/framework/logback/pom.xml | 2 +- code/framework/managed-context/pom.xml | 2 +- code/framework/metrics/pom.xml | 2 +- code/framework/module/pom.xml | 2 +- code/framework/object/pom.xml | 2 +- code/framework/pool/pom.xml | 2 +- code/framework/resource-monitor/pom.xml | 2 +- code/framework/schema/pom.xml | 2 +- code/framework/server/pom.xml | 2 +- code/framework/spring/pom.xml | 2 +- code/framework/system-task/pom.xml | 2 +- code/framework/token/pom.xml | 2 +- code/framework/utils/pom.xml | 2 +- code/iaas/agent-instance/pom.xml | 2 +- code/iaas/agent-server/pom.xml | 2 +- code/iaas/agent/pom.xml | 2 +- code/iaas/allocator/pom.xml | 2 +- code/iaas/api-logic/pom.xml | 2 +- code/iaas/archaius-management/pom.xml | 2 +- code/iaas/auth-logic/pom.xml | 2 +- code/iaas/bootstrap/pom.xml | 2 +- code/iaas/config-item/api/pom.xml | 2 +- code/iaas/config-item/common/pom.xml | 2 +- code/iaas/config-item/server/pom.xml | 2 +- code/iaas/engine-jooq/pom.xml | 2 +- code/iaas/events/pom.xml | 2 +- code/iaas/external-handler/pom.xml | 2 +- code/iaas/ha/pom.xml | 2 +- code/iaas/healthcheck/pom.xml | 2 +- code/iaas/labels/pom.xml | 2 +- code/iaas/logic-common/pom.xml | 2 +- code/iaas/logic/pom.xml | 2 +- code/iaas/metadata/pom.xml | 2 +- code/iaas/model/pom.xml | 2 +- .../core/dao/impl/InstanceDaoImpl.java | 6 +- .../NativeContainerNameRefreshDaoTest.java | 107 ++++++++++++++++++ code/iaas/resource-pool/pom.xml | 2 +- code/iaas/service-discovery/api/pom.xml | 2 +- code/iaas/service-discovery/server/pom.xml | 2 +- code/iaas/ssh-common/pom.xml | 2 +- code/iaas/storage-service/pom.xml | 2 +- code/iaas/task-jooq/pom.xml | 2 +- code/implementation/activity-log/pom.xml | 2 +- .../agent-instance-impl/pom.xml | 2 +- code/implementation/docker/api/pom.xml | 2 +- code/implementation/docker/common/pom.xml | 2 +- code/implementation/docker/compute/pom.xml | 2 +- code/implementation/docker/machine/pom.xml | 2 +- code/implementation/docker/storage/pom.xml | 6 +- code/implementation/extension-api/pom.xml | 2 +- code/implementation/hazelcast/common/pom.xml | 2 +- .../implementation/hazelcast/eventing/pom.xml | 2 +- code/implementation/hazelcast/lock/pom.xml | 2 +- code/implementation/host-api/pom.xml | 2 +- code/implementation/host-stats/pom.xml | 2 +- code/implementation/register/pom.xml | 2 +- code/implementation/sample-setup/pom.xml | 2 +- code/implementation/settings-api/pom.xml | 2 +- .../simulator/agent-connection/pom.xml | 2 +- code/implementation/simulator/storage/pom.xml | 2 +- code/implementation/system-stack/pom.xml | 2 +- code/implementation/vm/pom.xml | 2 +- code/meta-parent/pom.xml | 2 +- code/packaging/app-config/pom.xml | 2 +- code/packaging/app/pom.xml | 2 +- code/packaging/bundle/pom.xml | 2 +- code/packaging/dev/pom.xml | 2 +- code/packaging/meta/pom.xml | 2 +- code/parent/pom.xml | 2 +- .../orchestration-engine-0.183.331.md | 44 +++++++ pom.xml | 2 +- resources/pom.xml | 2 +- scripts/build | 2 +- scripts/check-pasturestack-source | 4 +- scripts/check-release-artifact | 2 +- 97 files changed, 265 insertions(+), 97 deletions(-) create mode 100644 docs/releases/orchestration-engine-0.183.331.md diff --git a/.github/workflows/security-release-gate.yml b/.github/workflows/security-release-gate.yml index b5852a988c..9b7c50d688 100644 --- a/.github/workflows/security-release-gate.yml +++ b/.github/workflows/security-release-gate.yml @@ -65,6 +65,9 @@ jobs: 'foreignSourceOrWrongResourceAccountNeverReachesQuery', 'managedServiceSystemEnvironmentAndLifecycleRowsAreRejected', 'everyNonremovedMapMustBeUniqueAtSelectionAndAtCas', + 'lifecyclePairsAreCorrelatedInBothSelectedAndCasSqlAndBindings', + 'renderedPairContractTruthTableAcceptsOnlyTheTwoStablePairs', + 'emitsReadOnlyLifecycleSelectFromTheActualProductionCondition', }, 'io.cattle.platform.process.containerevent.NativeContainerNameRefreshTest': { 'currentInspectNameNotUuidHintIsWrittenOnceAndNotificationIsScoped', @@ -137,6 +140,9 @@ jobs: 'suiteCount': len(suites), 'totals': {name: sum(s['counts'][name] for s in suites) for name in ('tests', 'failures', 'errors', 'skipped')}, 'suites': suites} Path('evidence/unit-test-results.json').write_text(json.dumps(summary, sort_keys=True, indent=2) + '\n') + fixture = Path('code/iaas/model/target/native-name-refresh-lifecycle-select.sql') + assert fixture.is_file(), 'Missing source-generated lifecycle SELECT' + Path('evidence/native-name-refresh-lifecycle-select.sql').write_bytes(fixture.read_bytes()) print('UNIT_CASE_EVIDENCE_OK', summary['suiteCount'], summary['totals']) PY diff --git a/README.md b/README.md index 1117e6f2ef..0ae9cce1c9 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,13 @@ preserved upstream boundary. ## Current release +`v0.183.331` is being prepared to correct the stopped-container mapping condition +in 330. The common selection/update predicate will accept only running/active +or stopped/inactive pairs; all source-account, unique-mapping, managed-container +and full-row compare-and-swap guards remain intact. Publication and consuming +Server/browser acceptance are pending. See the +[331 preparation note](docs/releases/orchestration-engine-0.183.331.md). + The published release `v0.183.330` is a narrowly scoped imported-container name refresh. A ping's UUID/name hint is never written as the authoritative name: the Engine inspects the exact full Docker ID through its existing Agent @@ -160,7 +167,7 @@ bash scripts/check-cattle-jdk25-full-package After the gate passes, package and check the release artifact: ```sh -ENGINE_VERSION=0.183.330 bash scripts/build --release +ENGINE_VERSION=0.183.331 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 3631001909..44c868aec5 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/api-pub-sub/pom.xml b/code/framework/api-pub-sub/pom.xml index c827c57cf6..271d8de9c5 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/api/pom.xml b/code/framework/api/pom.xml index 999f7c9a84..945a59497a 100644 --- a/code/framework/api/pom.xml +++ b/code/framework/api/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/archaius/pom.xml b/code/framework/archaius/pom.xml index 6b3ce1d741..d92a7eae4a 100644 --- a/code/framework/archaius/pom.xml +++ b/code/framework/archaius/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-meta-parent - 0.183.330 + 0.183.331 ../../meta-parent/pom.xml diff --git a/code/framework/async/pom.xml b/code/framework/async/pom.xml index 3cbf6ada13..65c8dbb18a 100644 --- a/code/framework/async/pom.xml +++ b/code/framework/async/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/auditing/pom.xml b/code/framework/auditing/pom.xml index e7a6894dff..5aa26a8453 100644 --- a/code/framework/auditing/pom.xml +++ b/code/framework/auditing/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/db-loader/pom.xml b/code/framework/db-loader/pom.xml index 4bd136a808..27250b99ef 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/deferred/pom.xml b/code/framework/deferred/pom.xml index 256d1cd722..2518c3f746 100644 --- a/code/framework/deferred/pom.xml +++ b/code/framework/deferred/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/encryption/pom.xml b/code/framework/encryption/pom.xml index c0de0ce421..b41c6aa272 100644 --- a/code/framework/encryption/pom.xml +++ b/code/framework/encryption/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/engine/pom.xml b/code/framework/engine/pom.xml index 27c4004cdc..0f1dbb56ba 100644 --- a/code/framework/engine/pom.xml +++ b/code/framework/engine/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/eventing/pom.xml b/code/framework/eventing/pom.xml index 539c517b5f..a47b04795b 100644 --- a/code/framework/eventing/pom.xml +++ b/code/framework/eventing/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/events/pom.xml b/code/framework/events/pom.xml index d7153d9173..7df17213f3 100644 --- a/code/framework/events/pom.xml +++ b/code/framework/events/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/extension-spring/pom.xml b/code/framework/extension-spring/pom.xml index 4009745597..c9fc8763e7 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/extension/pom.xml b/code/framework/extension/pom.xml index 552d06b6e9..6755d8aed1 100644 --- a/code/framework/extension/pom.xml +++ b/code/framework/extension/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/java-server/pom.xml b/code/framework/java-server/pom.xml index 1b313d3251..d62d399df3 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/jmx/pom.xml b/code/framework/jmx/pom.xml index 0eb54165d2..14ab721798 100644 --- a/code/framework/jmx/pom.xml +++ b/code/framework/jmx/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/jooq/pom.xml b/code/framework/jooq/pom.xml index a4c4bcad58..36ad46455f 100644 --- a/code/framework/jooq/pom.xml +++ b/code/framework/jooq/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/json/pom.xml b/code/framework/json/pom.xml index 91c7e829fe..04a9b71976 100644 --- a/code/framework/json/pom.xml +++ b/code/framework/json/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/launcher/pom.xml b/code/framework/launcher/pom.xml index dd85d69296..b16ae2594c 100644 --- a/code/framework/launcher/pom.xml +++ b/code/framework/launcher/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/lock/pom.xml b/code/framework/lock/pom.xml index 514a32bb76..ada4a7e888 100644 --- a/code/framework/lock/pom.xml +++ b/code/framework/lock/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/logback/pom.xml b/code/framework/logback/pom.xml index e930cfb291..2ce4c92f5d 100644 --- a/code/framework/logback/pom.xml +++ b/code/framework/logback/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-meta-parent - 0.183.330 + 0.183.331 ../../meta-parent/pom.xml diff --git a/code/framework/managed-context/pom.xml b/code/framework/managed-context/pom.xml index c0a1f92640..1fca0c1995 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/metrics/pom.xml b/code/framework/metrics/pom.xml index dc8751bcfd..b7df2c50c5 100644 --- a/code/framework/metrics/pom.xml +++ b/code/framework/metrics/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/module/pom.xml b/code/framework/module/pom.xml index c11ab133be..1099063daf 100644 --- a/code/framework/module/pom.xml +++ b/code/framework/module/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/object/pom.xml b/code/framework/object/pom.xml index 2bfd2de5f4..2653e8b7ad 100644 --- a/code/framework/object/pom.xml +++ b/code/framework/object/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/pool/pom.xml b/code/framework/pool/pom.xml index 4882005854..aee4a24a7b 100644 --- a/code/framework/pool/pom.xml +++ b/code/framework/pool/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/resource-monitor/pom.xml b/code/framework/resource-monitor/pom.xml index c12e58ce1f..b4fde09d59 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/schema/pom.xml b/code/framework/schema/pom.xml index da386f1c36..810460708c 100644 --- a/code/framework/schema/pom.xml +++ b/code/framework/schema/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/server/pom.xml b/code/framework/server/pom.xml index d0d12d4950..556295f69b 100644 --- a/code/framework/server/pom.xml +++ b/code/framework/server/pom.xml @@ -4,7 +4,7 @@ cattle-meta-parent io.cattle - 0.183.330 + 0.183.331 ../../meta-parent/pom.xml diff --git a/code/framework/spring/pom.xml b/code/framework/spring/pom.xml index 84137d5a90..f756ee2a6a 100644 --- a/code/framework/spring/pom.xml +++ b/code/framework/spring/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/system-task/pom.xml b/code/framework/system-task/pom.xml index 7de497beb4..e31718238b 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/token/pom.xml b/code/framework/token/pom.xml index df44cfdae8..91a7bf28ae 100644 --- a/code/framework/token/pom.xml +++ b/code/framework/token/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/framework/utils/pom.xml b/code/framework/utils/pom.xml index 5ed126be07..3060c5b2d0 100644 --- a/code/framework/utils/pom.xml +++ b/code/framework/utils/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/agent-instance/pom.xml b/code/iaas/agent-instance/pom.xml index 6279754c85..293ea42d59 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/agent-server/pom.xml b/code/iaas/agent-server/pom.xml index df6fec1528..215aa1c114 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/agent/pom.xml b/code/iaas/agent/pom.xml index b85cff227d..433b38ad47 100644 --- a/code/iaas/agent/pom.xml +++ b/code/iaas/agent/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/allocator/pom.xml b/code/iaas/allocator/pom.xml index c8a87aebcd..b048299163 100644 --- a/code/iaas/allocator/pom.xml +++ b/code/iaas/allocator/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/api-logic/pom.xml b/code/iaas/api-logic/pom.xml index dc2cf759b8..af921cef26 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/archaius-management/pom.xml b/code/iaas/archaius-management/pom.xml index 882a1f4181..5a37cb351f 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/auth-logic/pom.xml b/code/iaas/auth-logic/pom.xml index 926c53e742..6061116626 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/bootstrap/pom.xml b/code/iaas/bootstrap/pom.xml index d4e0af5de2..6ac5a4fe9a 100644 --- a/code/iaas/bootstrap/pom.xml +++ b/code/iaas/bootstrap/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/config-item/api/pom.xml b/code/iaas/config-item/api/pom.xml index 1f6ab2ed49..7dc62a78b1 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/iaas/config-item/common/pom.xml b/code/iaas/config-item/common/pom.xml index 971e702218..8f35f99f0d 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/iaas/config-item/server/pom.xml b/code/iaas/config-item/server/pom.xml index 2effdb06dd..e35ef6e721 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/iaas/engine-jooq/pom.xml b/code/iaas/engine-jooq/pom.xml index 1a3dabe7ed..908b7a0908 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/events/pom.xml b/code/iaas/events/pom.xml index c77740ae73..ae60b2f90b 100644 --- a/code/iaas/events/pom.xml +++ b/code/iaas/events/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/external-handler/pom.xml b/code/iaas/external-handler/pom.xml index c652bb536c..e9e540abbe 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/ha/pom.xml b/code/iaas/ha/pom.xml index ce83cfba88..8fa486cfa1 100644 --- a/code/iaas/ha/pom.xml +++ b/code/iaas/ha/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/healthcheck/pom.xml b/code/iaas/healthcheck/pom.xml index 84fadbda67..b9e1c228fc 100644 --- a/code/iaas/healthcheck/pom.xml +++ b/code/iaas/healthcheck/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/labels/pom.xml b/code/iaas/labels/pom.xml index da578a745a..464cafefd2 100644 --- a/code/iaas/labels/pom.xml +++ b/code/iaas/labels/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/logic-common/pom.xml b/code/iaas/logic-common/pom.xml index bbe62ce75e..95dbc5f186 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/logic/pom.xml b/code/iaas/logic/pom.xml index e03e24d921..e786ffceae 100644 --- a/code/iaas/logic/pom.xml +++ b/code/iaas/logic/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/metadata/pom.xml b/code/iaas/metadata/pom.xml index f96d127b88..a8ec5ddcbd 100644 --- a/code/iaas/metadata/pom.xml +++ b/code/iaas/metadata/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/model/pom.xml b/code/iaas/model/pom.xml index e714a78f97..069a10c775 100644 --- a/code/iaas/model/pom.xml +++ b/code/iaas/model/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/model/src/main/java/io/cattle/platform/core/dao/impl/InstanceDaoImpl.java b/code/iaas/model/src/main/java/io/cattle/platform/core/dao/impl/InstanceDaoImpl.java index 11c9badfa8..cede7d638a 100644 --- a/code/iaas/model/src/main/java/io/cattle/platform/core/dao/impl/InstanceDaoImpl.java +++ b/code/iaas/model/src/main/java/io/cattle/platform/core/dao/impl/InstanceDaoImpl.java @@ -217,7 +217,11 @@ protected Condition nativeNameRefreshCondition(Agent agent, Host host, String ho .on(HOST.ID.eq(INSTANCE_HOST_MAP.HOST_ID)).join(AGENT).on(AGENT.ID.eq(HOST.AGENT_ID)) .where(INSTANCE_HOST_MAP.INSTANCE_ID.eq(INSTANCE.ID)) .and(INSTANCE_HOST_MAP.HOST_ID.eq(host.getId())).and(INSTANCE_HOST_MAP.REMOVED.isNull()) - .and(binaryEqual(INSTANCE_HOST_MAP.STATE, CommonStatesConstants.ACTIVE)) + // InstanceStop deactivates the retained map; only stable lifecycle pairs are eligible. + .and(binaryEqual(INSTANCE.STATE, InstanceConstants.STATE_RUNNING) + .and(binaryEqual(INSTANCE_HOST_MAP.STATE, CommonStatesConstants.ACTIVE)) + .or(binaryEqual(INSTANCE.STATE, InstanceConstants.STATE_STOPPED) + .and(binaryEqual(INSTANCE_HOST_MAP.STATE, CommonStatesConstants.INACTIVE)))) .and(HOST.ACCOUNT_ID.eq(host.getAccountId())).and(HOST.AGENT_ID.eq(agent.getId())) .and(HOST.REMOVED.isNull()).and(binaryEqual(HOST.STATE, CommonStatesConstants.ACTIVE)) .and(jsonType(HOST.DATA, "$.fields.reportedUuid").eq("STRING")) diff --git a/code/iaas/model/src/test/java/io/cattle/platform/core/dao/impl/NativeContainerNameRefreshDaoTest.java b/code/iaas/model/src/test/java/io/cattle/platform/core/dao/impl/NativeContainerNameRefreshDaoTest.java index 3888122a50..da129953d0 100644 --- a/code/iaas/model/src/test/java/io/cattle/platform/core/dao/impl/NativeContainerNameRefreshDaoTest.java +++ b/code/iaas/model/src/test/java/io/cattle/platform/core/dao/impl/NativeContainerNameRefreshDaoTest.java @@ -7,16 +7,26 @@ import io.cattle.platform.core.model.tables.records.AgentRecord; import io.cattle.platform.core.model.tables.records.HostRecord; import io.cattle.platform.core.model.tables.records.InstanceRecord; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.Arrays; +import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.jooq.DSLContext; import org.jooq.Field; +import org.jooq.Query; import org.jooq.Result; import org.jooq.SQLDialect; +import org.jooq.conf.ParamType; +import org.jooq.conf.Settings; import org.jooq.impl.DSL; import org.jooq.tools.jdbc.MockConnection; import org.jooq.tools.jdbc.MockResult; @@ -165,6 +175,94 @@ public void everyNonremovedMapMustBeUniqueAtSelectionAndAtCas() { assertEquals(2, calls); } + @Test + public void lifecyclePairsAreCorrelatedInBothSelectedAndCasSqlAndBindings() { + Query selected = dao.select(agent, host, "host-uuid", DOCKER_ID); + Query updated = dao.update(row, agent, host, "host-uuid", "new-name"); + for (Query query : Arrays.asList(selected, updated)) { + Map pairs = lifecyclePairs(query); + assertEquals("active", pairs.get("running")); + assertEquals("inactive", pairs.get("stopped")); + assertEquals(2, pairs.size()); + assertTrue(Collections.indexOfSubList(query.getBindValues(), + Arrays.asList("running", "active", "stopped", "inactive")) >= 0); + assertUniqueMappingPredicate(query.getSQL()); + String sql = query.getSQL(ParamType.INLINED).toLowerCase(Locale.ROOT); + assertTrue(sql.contains("`service_index_id` is null")); + assertTrue(sql.contains("`environment_id` is null")); + assertTrue(sql.contains("binary `cattle`.`host`.`state` = binary 'active'")); + assertTrue(sql.contains("binary `cattle`.`agent`.`state` = binary 'active'")); + assertTrue(sql.contains("`service_expose_map`")); + } + assertEquals(0, calls); // Rendering is not MockConnection or database execution. + } + + @Test + public void renderedPairContractTruthTableAcceptsOnlyTheTwoStablePairs() { + Map pairs = lifecyclePairs(dao.select(agent, host, "host-uuid", DOCKER_ID)); + String[] instanceStates = {"running", "stopped", "starting", "stopping", "removed", "purged", null}; + String[] mapStates = {"active", "inactive", "requested", "activating", "deactivating", "removed", "purged", null}; + for (String instanceState : instanceStates) { + for (String mapState : mapStates) { + boolean expected = ("running".equals(instanceState) && "active".equals(mapState)) + || ("stopped".equals(instanceState) && "inactive".equals(mapState)); + boolean matchesRenderedPair = instanceState != null && mapState != null + && mapState.equals(pairs.get(instanceState)); + assertEquals(instanceState + "/" + mapState, expected, matchesRenderedPair); + } + } + assertEquals(0, calls); + // This is the rendered pair contract's truth table, not a MariaDB SQL execution claim. + } + + @Test + public void emitsReadOnlyLifecycleSelectFromTheActualProductionCondition() throws Exception { + agent.setId(17L); + host.setId(23L); + host.setAgentId(17L); + // Suppress only the generated schema qualifier so Root's synthetic CTEs cannot fall through + // to real cattle tables. The WHERE still comes from nativeNameRefreshCondition unchanged. + dao.setConfiguration(DSL.using(SQLDialect.MARIADB, + new Settings().withRenderSchema(false)).configuration()); + Query query = dao.select(agent, host, "host-uuid", DOCKER_ID); + assertEquals("inactive", lifecyclePairs(query).get("stopped")); + String sql = query.getSQL(ParamType.INLINED); + assertTrue(sql.toLowerCase(Locale.ROOT).startsWith("select ")); + assertFalse(sql.contains("`cattle`.")); + assertFalse(sql.contains("?")); + assertTrue(sql.contains("`instance_host_map`.`host_id` = 23")); + assertTrue(sql.contains("`host`.`agent_id` = 17")); + assertTrue(sql.contains("`instance`.`account_id` = 5")); + assertEquals(0, calls); + Path fixture = Paths.get("target", "native-name-refresh-lifecycle-select.sql"); + Files.createDirectories(fixture.getParent()); + Files.writeString(fixture, + "-- GENERATED by NativeContainerNameRefreshDaoTest from nativeNameRefreshCondition.\n" + + "-- SELECT ONLY; renderSchema=false for synthetic instance/instance_host_map/host/agent/service_expose_map CTEs.\n" + + "-- Synthetic bindings: host=23, agent=17, account=5, hostUuid=host-uuid, Docker ID=64 lowercase a characters.\n" + + "-- Local tests render this SQL; Root must independently evaluate it in MariaDB with synthetic CTEs.\n" + + sql + ";\n", StandardCharsets.UTF_8); + } + + private static Map lifecyclePairs(Query query) { + String sql = query.getSQL(ParamType.INLINED).replace("`cattle`.", "") + .replaceAll("\\s+", " ").toLowerCase(Locale.ROOT) + // jOOQ wraps each raw binary comparison; removing only single-comparison + // parentheses preserves the AND/OR grouping that this contract checks. + .replaceAll("\\((binary `(?:instance|instance_host_map)`\\.`state` = binary '[^']+')\\)", "$1"); + Pattern paired = Pattern.compile("\\(\\(binary `instance`\\.`state` = binary '([^']+)'" + + " and binary `instance_host_map`\\.`state` = binary '([^']+)'\\) or " + + "\\(binary `instance`\\.`state` = binary '([^']+)'" + + " and binary `instance_host_map`\\.`state` = binary '([^']+)'\\)\\)"); + Matcher match = paired.matcher(sql); + assertTrue("Missing state-correlated pair SQL", match.find()); + Map pairs = new HashMap<>(); + pairs.put(match.group(1), match.group(2)); + pairs.put(match.group(3), match.group(4)); + assertFalse("Duplicate state-correlated pair SQL", match.find()); + return pairs; + } + private static void assertUniqueMappingPredicate(String sql) { String normalized = sql.toLowerCase(Locale.ROOT); int begin = normalized.indexOf("select count(*)"); @@ -195,5 +293,14 @@ private static class TestDao extends InstanceDaoImpl { String sql(InstanceRecord row, AgentRecord agent, HostRecord host, String uuid, String name) { return nativeNameRefreshUpdate(row, agent, host, uuid, name).getSQL(); } + + Query select(AgentRecord agent, HostRecord host, String uuid, String dockerId) { + return create().select(INSTANCE.ID).from(INSTANCE) + .where(nativeNameRefreshCondition(agent, host, uuid, dockerId)); + } + + Query update(InstanceRecord row, AgentRecord agent, HostRecord host, String uuid, String name) { + return nativeNameRefreshUpdate(row, agent, host, uuid, name); + } } } diff --git a/code/iaas/resource-pool/pom.xml b/code/iaas/resource-pool/pom.xml index 26c2185761..552ca5cbbd 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/service-discovery/api/pom.xml b/code/iaas/service-discovery/api/pom.xml index 1de905f1cf..caa7501974 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/iaas/service-discovery/server/pom.xml b/code/iaas/service-discovery/server/pom.xml index 4184a3d303..2f9929a992 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/iaas/ssh-common/pom.xml b/code/iaas/ssh-common/pom.xml index db7d5d7509..96f87e9e0d 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/storage-service/pom.xml b/code/iaas/storage-service/pom.xml index 134945f3c1..3959cca830 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/iaas/task-jooq/pom.xml b/code/iaas/task-jooq/pom.xml index 697a6dbd96..c4ab677c51 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/implementation/activity-log/pom.xml b/code/implementation/activity-log/pom.xml index 64edd8077f..47cc4346de 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/implementation/agent-instance-impl/pom.xml b/code/implementation/agent-instance-impl/pom.xml index 5d40d56991..d99f753129 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.330 + 0.183.331 ../../parent/pom.xml cattle-agent-instance-impl diff --git a/code/implementation/docker/api/pom.xml b/code/implementation/docker/api/pom.xml index 5777135211..224a40cebb 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/implementation/docker/common/pom.xml b/code/implementation/docker/common/pom.xml index b866a52293..c4e878f233 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/implementation/docker/compute/pom.xml b/code/implementation/docker/compute/pom.xml index 7ceaaede87..6d9c15495d 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/implementation/docker/machine/pom.xml b/code/implementation/docker/machine/pom.xml index 635cc3ee58..4bc76f5a31 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/implementation/docker/storage/pom.xml b/code/implementation/docker/storage/pom.xml index f61bb5ebb7..466ab32b53 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.330 + 0.183.331 ../../../parent/pom.xml @@ -21,12 +21,12 @@ io.cattle cattle-docker-common - 0.183.330 + 0.183.331 io.cattle cattle-iaas-allocator - 0.183.330 + 0.183.331 diff --git a/code/implementation/extension-api/pom.xml b/code/implementation/extension-api/pom.xml index df477de310..e66ccc27e0 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.330 + 0.183.331 ../../parent/pom.xml cattle-extension-api diff --git a/code/implementation/hazelcast/common/pom.xml b/code/implementation/hazelcast/common/pom.xml index 0247b65815..4048299467 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/implementation/hazelcast/eventing/pom.xml b/code/implementation/hazelcast/eventing/pom.xml index f55e0e7542..137f795147 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/implementation/hazelcast/lock/pom.xml b/code/implementation/hazelcast/lock/pom.xml index 51b1a5cc5a..50ffd560d8 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/implementation/host-api/pom.xml b/code/implementation/host-api/pom.xml index bf4d222995..3977d37a26 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/implementation/host-stats/pom.xml b/code/implementation/host-stats/pom.xml index d0fbacaa52..053fae51db 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/implementation/register/pom.xml b/code/implementation/register/pom.xml index 0c7ba54660..eeeda94ede 100644 --- a/code/implementation/register/pom.xml +++ b/code/implementation/register/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/implementation/sample-setup/pom.xml b/code/implementation/sample-setup/pom.xml index 02494cfab6..276fc3983f 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/implementation/settings-api/pom.xml b/code/implementation/settings-api/pom.xml index 77997b5cc1..31d0efac2e 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/implementation/simulator/agent-connection/pom.xml b/code/implementation/simulator/agent-connection/pom.xml index e64648eb6a..126efbd99b 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/implementation/simulator/storage/pom.xml b/code/implementation/simulator/storage/pom.xml index a28831347f..c468a7ffbd 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.330 + 0.183.331 ../../../parent/pom.xml diff --git a/code/implementation/system-stack/pom.xml b/code/implementation/system-stack/pom.xml index c638d2454c..8d65965698 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.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/implementation/vm/pom.xml b/code/implementation/vm/pom.xml index cb35635c1b..f76934b280 100644 --- a/code/implementation/vm/pom.xml +++ b/code/implementation/vm/pom.xml @@ -3,7 +3,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../../parent/pom.xml cattle-vm diff --git a/code/meta-parent/pom.xml b/code/meta-parent/pom.xml index 4c2e8de6e7..9e06cccd5e 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.330 + 0.183.331 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 00ca12af48..4caf28c79a 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.330 + 0.183.331 ../../parent/pom.xml jar diff --git a/code/packaging/app/pom.xml b/code/packaging/app/pom.xml index 8db931ac5c..34c14cdad1 100644 --- a/code/packaging/app/pom.xml +++ b/code/packaging/app/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../../parent/pom.xml war diff --git a/code/packaging/bundle/pom.xml b/code/packaging/bundle/pom.xml index a228c45d30..1707317bf0 100644 --- a/code/packaging/bundle/pom.xml +++ b/code/packaging/bundle/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/packaging/dev/pom.xml b/code/packaging/dev/pom.xml index cabafece98..3f989cd99f 100644 --- a/code/packaging/dev/pom.xml +++ b/code/packaging/dev/pom.xml @@ -4,7 +4,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/packaging/meta/pom.xml b/code/packaging/meta/pom.xml index 5ad2704014..e9c5a9a2d9 100644 --- a/code/packaging/meta/pom.xml +++ b/code/packaging/meta/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../../parent/pom.xml diff --git a/code/parent/pom.xml b/code/parent/pom.xml index 07b39a9c63..8d9046a7ac 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.330 + 0.183.331 pom diff --git a/docs/releases/orchestration-engine-0.183.331.md b/docs/releases/orchestration-engine-0.183.331.md new file mode 100644 index 0000000000..816130bfcd --- /dev/null +++ b/docs/releases/orchestration-engine-0.183.331.md @@ -0,0 +1,44 @@ +# Orchestration Engine 0.183.331 + +Preparing only. No official CI, release artifact, consuming Server image or +browser acceptance is claimed yet. Existing numeric tags remain immutable. + +## Root cause and minimal correction + +330's imported-container name refresh required an active host mapping even for +stopped instances. The existing stop process synchronously deactivates its +retained mapping to inactive. Actual QA read-only inspection found three stopped +rollback containers with those normal inactive mappings, so their Docker names +were not adopted. The containers and backups were not deleted or manually renamed. + +The shared selection and compare-and-swap predicate now allows exactly +`running/active` or `stopped/inactive` instance/mapping pairs. Wrong pairings, +transitional/removed states and every existing Host/Agent/account/full-ID, +unique nonremoved mapping and managed/service/stack exclusion remain fail-closed. +The final update still sets only name and compares every original instance +column. Existing handler CAS-miss behavior remains no notification and no retry. +No authentication, schema, migration, Agent/plugin or state lifecycle change. + +## Focused evidence + +Seven existing DAO tests passed in the first focused run. Three new tests +check the exact correlated SELECT/update SQL and bindings, the 56-case rendered +pair contract and a SELECT generated by the actual production condition. +Render assertion mistakes were fixed and only failing cases rerun; ten distinct +cases have obtained PASS, not a claim of one uninterrupted ten-case run. + +An actual MariaDB invocation then evaluated that generated SELECT against 84 +synthetic CTE cases: 56 lifecycle pairs plus 28 account/host/agent/full-ID, +managed-field, unique mapping and service-expose cases. All passed. It performs +SELECT only, reads no real platform tables and sends no auth requests. It is +not a real database compare-and-swap race or native browser acceptance claim. +The source-generated SELECT SHA-256 is +`07c2f72bfdc380df2d8bd706bf20769f98d75ab764da330b8ade5f66af61e1a8`. + +Normal release CI must retain all ten DAO cases plus the nine handler, three +monitor and existing role-schema cases and the generated SELECT. The exact +CI WAR must be published and consumed by a new immutable Server, then checked +on the real QA host and native browser before declaring name acceptance. +Keep existing environment variables, volumes, AppArmor, restart policy, +HTTPS origin, OIDC/MFA/session ownership and nftables unchanged. Rollback uses +the prior immutable Server with preserved data; no runtime patch or SQL update. diff --git a/pom.xml b/pom.xml index 1acb68f5dc..ce5b15110c 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ io.cattle cattle-parent - 0.183.330 + 0.183.331 code/parent/pom.xml cattle diff --git a/resources/pom.xml b/resources/pom.xml index 1ca8799a86..1cd77e9580 100644 --- a/resources/pom.xml +++ b/resources/pom.xml @@ -4,7 +4,7 @@ cattle-parent io.cattle - 0.183.330 + 0.183.331 ../code/parent/pom.xml diff --git a/scripts/build b/scripts/build index 8225d4029c..420f230b11 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.330} +ENGINE_VERSION=${ENGINE_VERSION:-0.183.331} case "$SOURCE_REVISION" in ''|*[!0-9a-f]*) diff --git a/scripts/check-pasturestack-source b/scripts/check-pasturestack-source index 21be9297ca..c788ce7f76 100755 --- a/scripts/check-pasturestack-source +++ b/scripts/check-pasturestack-source @@ -51,7 +51,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.330' +require_line code/meta-parent/pom.xml ' 0.183.331' require_line code/meta-parent/pom.xml ' 2.3.35' require_line "$iaas_api_defaults" 'auth.service.external.id.types=github_user,github_org,github_team,shibboleth_user,shibboleth_group,ldap_user,ldap_group,oidc_user,oidc_group' require_line code/meta-parent/pom.xml ' https://github.com/PastureStack/orchestration-engine' @@ -416,4 +416,4 @@ require_line README.md 'modernize the Rancher 1.6 ecosystem. It is not affiliate require_line README.md 'by Rancher Labs or SUSE.' require_line ORIGIN.md '- Preserved upstream boundary: `82d154a53f4089fecfb9f320caad826bb4f6055f`' -printf 'PASTURESTACK_SOURCE_GATE_OK version=0.183.330 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.5 docker_cli=29.7.2 docker_host_29_8_0=exact credential_secret_capacity=mediumtext port_preflight=authoritative volume_preflight=runtime_resolution_aligned volume_preflight_project_schema=authorized volume_preflight_type_set=registered v1_hardware_schema=container-and-launchConfig network_driver_rollback=launch-config-restored stack_driver_rollback=child-launch-config-restored auth_token_session_binding=authorized-create-only auth_token_transport=bare-or-bearer-normalized auth_token_frozen_v1_schema=base-superadmin-token oidc_external_types=validated-before-mutation-owned-stable-account oidc_account_activation=sync-before-mfa oidc_v1_project_member_schema=core-options-merged-scoped oidc_identity_link_owner=explicit-and-verified legacy_token_link_repair=exact-match-only oidc_required_local_recovery=active-admin-only default_project=shared-idempotent-role-preserving,atomic-identity-set oidc_restricted_project_membership=stable-account-aware-required-allowlist-only mfa_policy_confirmation=actor-purpose-digest-single-use auth_config_proxy_identity=caller-platform-credential project_member_collection_acl=requested-project-checked-before-load project_template_v1_public=readonly-frozen-field-merged network_purge=retry-removing dev_artifact=forbidden\n' +printf 'PASTURESTACK_SOURCE_GATE_OK version=0.183.331 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.5 docker_cli=29.7.2 docker_host_29_8_0=exact credential_secret_capacity=mediumtext port_preflight=authoritative volume_preflight=runtime_resolution_aligned volume_preflight_project_schema=authorized volume_preflight_type_set=registered v1_hardware_schema=container-and-launchConfig network_driver_rollback=launch-config-restored stack_driver_rollback=child-launch-config-restored auth_token_session_binding=authorized-create-only auth_token_transport=bare-or-bearer-normalized auth_token_frozen_v1_schema=base-superadmin-token oidc_external_types=validated-before-mutation-owned-stable-account oidc_account_activation=sync-before-mfa oidc_v1_project_member_schema=core-options-merged-scoped oidc_identity_link_owner=explicit-and-verified legacy_token_link_repair=exact-match-only oidc_required_local_recovery=active-admin-only default_project=shared-idempotent-role-preserving,atomic-identity-set oidc_restricted_project_membership=stable-account-aware-required-allowlist-only mfa_policy_confirmation=actor-purpose-digest-single-use auth_config_proxy_identity=caller-platform-credential project_member_collection_acl=requested-project-checked-before-load project_template_v1_public=readonly-frozen-field-merged network_purge=retry-removing dev_artifact=forbidden\n' diff --git a/scripts/check-release-artifact b/scripts/check-release-artifact index 8b83bf2f70..064403bf47 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.330} +expected_version=${EXPECTED_ENGINE_VERSION:-0.183.331} test -f "$artifact" artifact=$(realpath "$artifact")