Skip to content

Kubernetes integration detection fails #227

@faridco

Description

@faridco

Description

I get the following in the log

ERROR: Found 2 Headscale processes: 23, 6
ERROR: Integration Kubernetes (k8s) is not available

but process 6 is no related to the headscale according to process list

/app # ps ax
PID   USER     TIME  COMMAND
    1 65535     0:00 /pause
    6 root      0:02 node ./build/server/index.js
   23 root      0:00 /ko-app/headscale serve

I guess the issue somewhere here

const path = join('/proc', dir, 'cmdline');
try {
log.debug('config', 'Reading %s', path);
const data = await readFile(path, 'utf8');
if (!data.includes('headscale') && !data.includes('serve')) {
throw new Error('Found PID without Headscale serve command');
}

Might be the issue is in C string (0 byte in the end), the cmdline is an array of zero-terminated strings

/app # xxd < /proc/6/cmdline
00000000: 6e6f 6465 002e 2f62 7569 6c64 2f73 6572  node../build/ser
00000010: 7665 722f 696e 6465 782e 6a73 00         ver/index.js.

Headplane Version

0.6.0

Headscale Version

0.26.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingintegrationRelated to Headplane integrations

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions