2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 10:32:31 +00:00

Fix leaking ssh-agent processes in selfcheck

This commit is contained in:
Jarrod Johnson
2025-08-26 08:44:42 -04:00
parent 1a64768fca
commit 6be98c7e60

View File

@@ -273,6 +273,8 @@ if __name__ == '__main__':
emprint('Permissions incorrect on /etc/confluent/ssh/automation (Example resolution: chmod 600 /etc/confluent/ssh/automation)')
else:
emprint('Failed to load confluent automation key, syncfiles and profile ansible plays will not work (Example resolution: osdeploy initialize -a)')
if sshutil.agent_pid:
os.kill(int(sshutil.agent_pid), signal.SIGTERM)
sys.exit(0)
fprint('Checking for blocked insecure boot: ')
if insecure_boot_attempts():
@@ -421,7 +423,9 @@ if __name__ == '__main__':
else:
emprint('Unknown error attempting confluent automation ssh:')
sys.stderr.buffer.write(srun.stderr)
os.kill(int(sshutil.agent_pid), signal.SIGTERM)
if sshutil.agent_pid:
os.kill(int(sshutil.agent_pid), signal.SIGTERM)
sys.exit(0)
else:
print("Skipping node checks, no node specified (Example: confluent_selfcheck -n n1)")
# possible checks: