Skip to content

Add Python executable path tracking to nodes.txt#1

Draft
darkn3to with Copilot wants to merge 3 commits into
masterfrom
copilot/add-python-installation-path-logging
Draft

Add Python executable path tracking to nodes.txt#1
darkn3to with Copilot wants to merge 3 commits into
masterfrom
copilot/add-python-installation-path-logging

Conversation

Copilot AI commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

Adds functionality to record each node's Python installation path (via sys.executable) in nodes.txt for cluster configuration tracking.

Changes

utils.py

  • Added get_python_path() returning sys.executable
  • Extended collect_resources() to include python_path field in resource metadata

master.py

  • Changed workers structure: {ip: username}{ip: {"username": str, "python_path": str}}
  • Master records its own Python path during initialization in discover_workers_daemon()
  • Worker Python paths extracted from resource JSON files in receive_resource_files()
  • Added write_nodes_file() to write complete node information after resource collection
  • Updated main() to rewrite nodes.txt with Python paths after receiving all worker resources

worker.py

  • No changes (already sends resources via collect_resources())

nodes.txt Format

Old: [username]: ip
New: [username]: ip, python_path

Example:

[master]: 192.168.1.100, /usr/bin/python3
[worker1]: 192.168.1.101, /usr/local/bin/python3.9
[worker2]: 192.168.1.102, /opt/python/bin/python3

Flow

  1. Master stores its Python path on startup
  2. Workers send resource files including their Python paths
  3. Master parses Python paths from resource files and updates workers dict
  4. Master rewrites nodes.txt with complete information
Original prompt

refer to master.py and worker.py only and add functionality that lets master and node script to write the current python installation path being used on the machine (which python command) and write it corresponding to the entry in nodes.txt.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 17, 2025 02:43
Co-authored-by: darkn3to <62509177+darkn3to@users.noreply.github.com>
Co-authored-by: darkn3to <62509177+darkn3to@users.noreply.github.com>
Copilot AI changed the title [WIP] Add functionality to log current python installation path Add Python executable path tracking to nodes.txt Nov 17, 2025
Copilot AI requested a review from darkn3to November 17, 2025 02:50
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