feat(multi-site): wire selfUrl through setup.sh so joins register live
Extends the shipped CFG_MASTER_DIRECTORY_URL/JOIN_KEY join flow with the selfUrl a spoke needs to register itself for live catalog replication (theta-directory v2.4.0's POST /api/site/spokes) -- without this, every spoke was permanently limited to the one-time join snapshot even after the master gained the ability to push live updates. setup.sh already computes CFG_SSO_HOST before this point in the script; passes https://$CFG_SSO_HOST as bootstrap/site-join.js's third argument, which forwards it as `selfUrl` in the POST /api/site/join body.
This commit is contained in:
@@ -1161,8 +1161,12 @@ fi
|
||||
# joined reports "already a spoke" and setup continues.
|
||||
if [[ -n "${CFG_MASTER_DIRECTORY_URL:-}" && -n "${CFG_MASTER_DIRECTORY_JOIN_KEY:-}" ]]; then
|
||||
info "Joining master site ${CFG_MASTER_DIRECTORY_URL} (CFG_MASTER_DIRECTORY_*)..."
|
||||
# selfUrl (https://$CFG_SSO_HOST, already derived above) registers this
|
||||
# spoke for LIVE replication -- without it the join still succeeds, but
|
||||
# the master has no way to reach this spoke to push resync pings, so it
|
||||
# only ever gets the one-time snapshot from the moment it joined.
|
||||
if ! "${COMPOSE[@]}" exec -T sso-manager node /bootstrap/site-join.js \
|
||||
"$CFG_MASTER_DIRECTORY_URL" "$CFG_MASTER_DIRECTORY_JOIN_KEY"; then
|
||||
"$CFG_MASTER_DIRECTORY_URL" "$CFG_MASTER_DIRECTORY_JOIN_KEY" "https://$CFG_SSO_HOST"; then
|
||||
die "site join failed — check the master URL + site join key (mint one on the master's Site Join Keys card)."
|
||||
fi
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user