mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-19 07:02:16 +08:00
d525bc3f28
# Description This PR fixes bounded ManagedSession reconnect cleanup and reorganizes the sample applications into domain-focused folders. ## Reconnect cleanup - Bounds reconnect integration cleanup with independent 30-second close and dispose limits. - Sends `CloseSession` through the awaited transport request path during `Session.DisposeAsync`. - Preserves explicit `Session.CloseAsync` behavior that waits for or cancels outstanding publish requests. - Covers the disposal request path with a regression test. ## Sample organization - `samples/OpenUsd`: `GeneratorServer`, `SiteCompositionServer` - `samples/Redundancy`: `RedundantClient`, `RedundantServer`, `RedundantPubSub` - `samples/Isa95`: `MinimalIsa95Server` - `samples/MinimalApi`: `MinimalBoilerServer`, `MinimalCalcServer`, `MinimalClient` - `samples/DI`: `PumpDeviceIntegrationServer` - `samples/Lds`: `ConsoleLdsServer` - `samples/Reference`: `ConsoleReferenceClient`, `ConsoleReferenceServer` - `samples/PubSub`: `ConsoleReferencePubSubClient` `UA.slnx` now exposes the same requested domain groups. Project references, tests, runtime sample probes, CI workflows, Dockerfiles, Compose files, helper scripts, and documentation were updated to the new paths. `samples/Robotics/MinimalRobotServer` remains under `Robotics`. ## Validation - `dotnet build UA.slnx` - 3 Redundancy short-haul sample tests - 70 DI sample tests - 914 OpenUSD tests - 1 WotCon model-materialization test - 137 AOT tests - `docker compose config` for all 6 moved Redundancy Compose files ## Related Issues - Fixes #4273 ## Checklist - [ ] I have signed the [CLA](https://opcfoundation.org/license/cla/ContributorLicenseAgreementv1.0.pdf) and read the [CONTRIBUTING](https://github.com/OPCFoundation/UA-.NETStandard/blob/master/CONTRIBUTING.md) doc. - [x] I have added tests that prove my fix is effective or that my feature works and increased code coverage. - [x] I have added all necessary documentation. - [x] I have verified that my changes do not introduce new build or analyzer warnings. - [x] I built the complete `UA.slnx` solution locally. - [ ] I ran all tests locally against at least .NET Framework and .NET 10. - [ ] I fixed all failing and flaky tests in the CI pipelines and all CodeQL warnings. - [x] I have addressed all PR feedback received. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: marcschier <11168470+marcschier@users.noreply.github.com> Co-authored-by: Marc Schier <mschier@microsoft.com> Co-authored-by: Marc Schier <marcschier@users.noreply.github.com> Copilot-Session: a2c2838f-74ae-4997-a1d4-50574d9e0636
80 lines
3.5 KiB
YAML
80 lines
3.5 KiB
YAML
# GetEndpoints load direction over a strongly-consistent (Raft) redundant set.
|
|
#
|
|
# Builds on the active/passive topology (docker-compose.yml with active-passive.env): a 3-node RaftCs cluster forms the shared, linearizable
|
|
# store that the load-direction signals (each replica's health ServiceLevel, load weight, and
|
|
# endpoints) are published to and read from across containers. HA_BALANCING_URL enables the
|
|
# GetEndpoints director on every replica: a GetEndpoints request arriving on that virtual
|
|
# discovery URL is answered with the best replica's endpoints (the active writer in this
|
|
# active/passive set), while plain discovery on a replica's own URL is unaffected.
|
|
#
|
|
# In a real deployment a load balancer / Kubernetes Service fronts the replicas at
|
|
# HA_BALANCING_URL and forwards the discovery request to any replica; this compose sets the
|
|
# variable to illustrate the server-side wiring (there is no LB container here, so point a
|
|
# client at a replica's own URL to observe normal discovery, and use HA_BALANCING_URL as the
|
|
# address your LB/Service would expose).
|
|
#
|
|
# The build context is the repository root. Run from the repo root:
|
|
# docker compose -f samples/Redundancy/RedundantServer/LoadDirection/docker-compose.yml up --build
|
|
|
|
x-ld-server: &ld-server
|
|
build:
|
|
context: ../../../..
|
|
dockerfile: samples/Redundancy/RedundantServer/Dockerfile
|
|
image: opcua-redundant-server
|
|
command: ["--port", "62543"]
|
|
|
|
services:
|
|
server-a:
|
|
<<: *ld-server
|
|
hostname: server-a
|
|
environment:
|
|
HA_HOST: server-a
|
|
HA_NODE_ID: replica-a
|
|
HA_MODE: ap
|
|
HA_CONSISTENCY: strong
|
|
REDUNDANCY_MODE: hot
|
|
HA_BALANCING_URL: "opc.tcp://ha-lb:62543/RedundantServer"
|
|
HA_RAFT_ID: "1"
|
|
HA_RAFT_MEMBERS: "3"
|
|
HA_RAFT_BIND: "tcp://0.0.0.0:6560"
|
|
HA_RAFT_PEERS: "tcp://server-b:6560,tcp://server-c:6560"
|
|
HA_REDUNDANT_PEERS: "urn:localhost:OPCFoundation:RedundantServer:replica-b|RedundantServer replica-b|opc.tcp://server-b:62543/RedundantServer,urn:localhost:OPCFoundation:RedundantServer:replica-c|RedundantServer replica-c|opc.tcp://server-c:62543/RedundantServer"
|
|
ports:
|
|
- "62543:62543"
|
|
|
|
server-b:
|
|
<<: *ld-server
|
|
hostname: server-b
|
|
environment:
|
|
HA_HOST: server-b
|
|
HA_NODE_ID: replica-b
|
|
HA_MODE: ap
|
|
HA_CONSISTENCY: strong
|
|
REDUNDANCY_MODE: hot
|
|
HA_BALANCING_URL: "opc.tcp://ha-lb:62543/RedundantServer"
|
|
HA_RAFT_ID: "2"
|
|
HA_RAFT_MEMBERS: "3"
|
|
HA_RAFT_BIND: "tcp://0.0.0.0:6560"
|
|
HA_RAFT_PEERS: "tcp://server-a:6560,tcp://server-c:6560"
|
|
HA_REDUNDANT_PEERS: "urn:localhost:OPCFoundation:RedundantServer:replica-a|RedundantServer replica-a|opc.tcp://server-a:62543/RedundantServer,urn:localhost:OPCFoundation:RedundantServer:replica-c|RedundantServer replica-c|opc.tcp://server-c:62543/RedundantServer"
|
|
ports:
|
|
- "62544:62543"
|
|
|
|
server-c:
|
|
<<: *ld-server
|
|
hostname: server-c
|
|
environment:
|
|
HA_HOST: server-c
|
|
HA_NODE_ID: replica-c
|
|
HA_MODE: ap
|
|
HA_CONSISTENCY: strong
|
|
REDUNDANCY_MODE: hot
|
|
HA_BALANCING_URL: "opc.tcp://ha-lb:62543/RedundantServer"
|
|
HA_RAFT_ID: "3"
|
|
HA_RAFT_MEMBERS: "3"
|
|
HA_RAFT_BIND: "tcp://0.0.0.0:6560"
|
|
HA_RAFT_PEERS: "tcp://server-a:6560,tcp://server-b:6560"
|
|
HA_REDUNDANT_PEERS: "urn:localhost:OPCFoundation:RedundantServer:replica-a|RedundantServer replica-a|opc.tcp://server-a:62543/RedundantServer,urn:localhost:OPCFoundation:RedundantServer:replica-b|RedundantServer replica-b|opc.tcp://server-b:62543/RedundantServer"
|
|
ports:
|
|
- "62545:62543"
|