Skip to content

fix(bootstrap): create /usr/local/bin before installing the node agent - #21

Closed
ANHELL404 wants to merge 2 commits into
NodeFlow-dev:mainfrom
ANHELL404:main
Closed

ANHELL404 wants to merge 2 commits into
NodeFlow-dev:mainfrom
ANHELL404:main

Conversation

@ANHELL404

Copy link
Copy Markdown
Contributor

Problem. Node onboarding fails at the agent-install step (remote_install_failed, exit 1) on hosts where /usr/local/bin does not exist. The bootstrap script runs install -m 0755 /usr/local/bin/nodeflow-node-agent.new without creating the directory first. When it’s missing, install fails with ENOENT and set -eu aborts the whole script before the agent is activated — no systemd unit, no agent start, full rollback, nothing in journald (very hard to diagnose).

/usr/local/libexec is already created via install -d (for the updater); /usr/local/bin is not — an inconsistency.

Fix. Add install -d -m 0755 /usr/local/bin before the agent binary install, in both the panel SSH bootstrap and the manual installer.

How found. strace on the piped sh -s install process showed install exit 1 on openat("/usr/local/bin/nodeflow-node-agent.new", O_WRONLY|O_CREAT|O_EXCL) = -1 ENOENT. A mkdir -p /usr/local/bin made onboarding succeed immediately.

@SHOKOVprod

Copy link
Copy Markdown
Contributor

Thanks for the precise diagnosis! Merged via #23: the directory is now created for every agent install source (local binary, build, release), with a test. You are credited as co-author. Will ship in the next release.

@SHOKOVprod SHOKOVprod closed this Oct 15, 2026
@SHOKOVprod SHOKOVprod mentioned this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants