Skip to content

registry: add hidden experimental status file argument#311

Open
VDanielEdwards wants to merge 2 commits intomainfrom
private/dedwards/registry-status-file
Open

registry: add hidden experimental status file argument#311
VDanielEdwards wants to merge 2 commits intomainfrom
private/dedwards/registry-status-file

Conversation

@VDanielEdwards
Copy link
Copy Markdown
Member

@VDanielEdwards VDanielEdwards commented Apr 21, 2026

Subject

This change adds a hidden command line argument --x-status-file to the sil-kit-registry executable. It expects a path that can be opened for file creation, truncation, and writing.

The registry will rewrite this files content to starting at an early point in the startup procedure.

After the registry has started listening for incoming connection, the files content will be rewritten to running.

When the registry is shutting down 'normally' (e.g., CTRL-C, handled signals, or a handled exception) the files content will be rewritten to stopped. The file is also deleted afterwards. The rewrite ensures that even if the file cannot be deleted for some reason, it will not contain running anymore.

Such a status file is very useful for implementing a health check for orchestrated container setups, e.g., using docker-compose. It allows the user to ensure that participant containers are only started after the registry is up.

Why Hidden & Experimental

The argument is useful in this state (for the example given above), but it may not be enough. We might think about either adding a separate PID-file argument, or integrate that functionality with this argument.

Personally I believe that this needs to be used in our own workflows until it's clear that it can be 'released'.

Developer checklist (address before review)

  • Changelog.md updated
  • Prepared update for depending repositories
  • Documentation updated (public API changes only)
  • API docstrings updated (public API changes only)
  • Rebase → commit history clean
  • Squash and merge → proper PR title

Signed-off-by: Daniel Edwards <Daniel.Edwards@vector.com>
Signed-off-by: Daniel Edwards <Daniel.Edwards@vector.com>
@VDanielEdwards VDanielEdwards self-assigned this Apr 21, 2026

commandlineParser.Add<CliParser::Option>(
"x-status-file", "", "", "[--x-status-file <path>]",
"--x-status-file <path>: The registry process will write the current status ('starting' or 'running') as the "
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actually used states are starting, running, and stopped.

@VDanielEdwards VDanielEdwards added the needs reviewer This issue is looking for a reviewer. label Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs reviewer This issue is looking for a reviewer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant