bug: SSH keys not injected when deploying VM from master dashboard to worker node #56

Open
opened 2026-04-05 11:26:58 +00:00 by mahmoud · 1 comment
Owner

Description

When a user saves SSH keys in the master node's Settings page and deploys a VM on a worker node, the keys are not injected into the VM.

The deploy modal correctly shows:
"1 SSH key(s) will be injected at boot"

But the deployment logs show:
"No SSH keys configured — add keys in Settings to enable SSH access."

This is a contradiction of the UI promises injection, but the backend never received the keys.

Steps to Reproduce

  1. Open master dashboard (kristof6:9001)
  2. Go to Settings → add an SSH public key
  3. Click Deploy VM → select worker node (kristof5)
  4. Fill in VM name, slice count
  5. Click Deploy
  6. Check deployment logs

Expected Behavior

Deployment logs should show:
"SSH key(s) injected successfully"

User should be able to SSH into the VM using their saved key.

Actual Behavior

Deployment logs show:
"No SSH keys configured, add keys in Settings to enable SSH access."

SSH keys are NOT injected into the VM.

### Description When a user saves SSH keys in the master node's Settings page and deploys a VM on a worker node, the keys are not injected into the VM. The deploy modal correctly shows: "1 SSH key(s) will be injected at boot" But the deployment logs show: "No SSH keys configured — add keys in Settings to enable SSH access." This is a contradiction of the UI promises injection, but the backend never received the keys. ### Steps to Reproduce 1. Open master dashboard (kristof6:9001) 2. Go to Settings → add an SSH public key 3. Click Deploy VM → select worker node (kristof5) 4. Fill in VM name, slice count 5. Click Deploy 6. Check deployment logs ### Expected Behavior Deployment logs should show: "SSH key(s) injected successfully" User should be able to SSH into the VM using their saved key. ### Actual Behavior Deployment logs show: "No SSH keys configured, add keys in Settings to enable SSH access." SSH keys are NOT injected into the VM.
Member

Work done:

  • Root cause confirmed: in explorer deploy flow, UI sent ssh_keys: [] to worker deploy, so worker tried local key store lookup only. If target worker had no keys for that secret, logs showed No SSH keys configured....

  • UI fix implemented in dashboard.js:

    • Explorer deploy now fetches enabled keys from Settings and sends them explicitly in deploy_vm.
    • Added cache fallback with warning toast if fresh key fetch fails.
    • Local deploy path remains unchanged (server-side key store lookup).
  • Server hardening added in rpc.rs:

    • deploy_vm now merges incoming ssh_keys with target-node local enabled keys for the same secret.
    • Added deduplication to avoid duplicate key entries.
  • Result:

    • Master → worker first-time deploy now injects keys as expected.
    • Existing keys on target worker are still respected.
    • Reinject flow continues to work.
Work done: - Root cause confirmed: in explorer deploy flow, UI sent ssh_keys: [] to worker deploy, so worker tried local key store lookup only. If target worker had no keys for that secret, logs showed No SSH keys configured.... - UI fix implemented in dashboard.js: - Explorer deploy now fetches enabled keys from Settings and sends them explicitly in deploy_vm. - Added cache fallback with warning toast if fresh key fetch fails. - Local deploy path remains unchanged (server-side key store lookup). - Server hardening added in rpc.rs: - deploy_vm now merges incoming ssh_keys with target-node local enabled keys for the same secret. - Added deduplication to avoid duplicate key entries. - Result: - Master → worker first-time deploy now injects keys as expected. - Existing keys on target worker are still respected. - Reinject flow continues to work.
mahmoud added this to the ACTIVE project 2026-04-06 10:12:55 +00:00
mahmoud added this to the now milestone 2026-04-06 10:13:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_compute#56
No description provided.