From 2bde94657d04f87a5506e63446c2e09081853ecb Mon Sep 17 00:00:00 2001 From: John Haverlack Date: Sat, 31 Jan 2026 19:08:43 -0900 Subject: [PATCH] WORKING: join/authz --- docs/INSTALL.md | 2 +- sdl-mgr/app/modules/sdl-mgr/index.js | 8 +++++--- sdl-mgr/html/md/docs.md | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index be35a50..02fd478 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -49,7 +49,7 @@ git pull origin main (Debian, Ubuntu, Linux Mint, Zorin OS, Raspbian) ``` -sudo apt -y install gawk coreutils curl jq grep sed sha256sum tar unzip netcat-openbsd +sudo apt -y install gawk coreutils curl jq grep sed tar unzip netcat-openbsd ``` #### Installation diff --git a/sdl-mgr/app/modules/sdl-mgr/index.js b/sdl-mgr/app/modules/sdl-mgr/index.js index 33172a6..f1d98ba 100644 --- a/sdl-mgr/app/modules/sdl-mgr/index.js +++ b/sdl-mgr/app/modules/sdl-mgr/index.js @@ -105,7 +105,7 @@ function addWorker(state, workerData) { state.workers[sdl_id] = { sdl_id: workerData.sdl_id, hostname: workerData.hostname, - version: workerData.version, + version: workerData.sdl_version, platform: workerData.platform, arch: workerData.arch, distro: workerData.distro || "Unknown", @@ -238,7 +238,9 @@ function startJoinHandler() { log(`${module}: received join request from ${joinReq.host} (${joinReq.sdl_id})`); // Validate version - const workerVersion = joinReq.msg?.worker?.version; + const workerData = joinReq.msg['sdl-wkr']; + const workerVersion = workerData?.sdl_version; + // const workerVersion = joinReq.msg?.worker?.version; const clusterVersion = config.package.version; let authorized = false; @@ -248,7 +250,7 @@ function startJoinHandler() { authorized = true; // Add worker to cluster state - clusterState = addWorker(clusterState, joinReq.msg.worker); + clusterState = addWorker(clusterState, workerData); clusterState = computeStats(clusterState); saveClusterState(config, clusterState); diff --git a/sdl-mgr/html/md/docs.md b/sdl-mgr/html/md/docs.md index be35a50..02fd478 100644 --- a/sdl-mgr/html/md/docs.md +++ b/sdl-mgr/html/md/docs.md @@ -49,7 +49,7 @@ git pull origin main (Debian, Ubuntu, Linux Mint, Zorin OS, Raspbian) ``` -sudo apt -y install gawk coreutils curl jq grep sed sha256sum tar unzip netcat-openbsd +sudo apt -y install gawk coreutils curl jq grep sed tar unzip netcat-openbsd ``` #### Installation