Skip to content

Add step CLI version check and improve PKI initialization#108

Merged
aidankhogg merged 1 commit into
dev/alphafrom
claude/netengine-setup-diagnostics-p4dqek
Jun 29, 2026
Merged

Add step CLI version check and improve PKI initialization#108
aidankhogg merged 1 commit into
dev/alphafrom
claude/netengine-setup-diagnostics-p4dqek

Conversation

@aidankhogg

Copy link
Copy Markdown
Contributor

Summary

This PR adds diagnostic checking for the step CLI tool and improves error handling and logging in PKI initialization. The changes ensure better visibility into PKI setup issues and provide clearer guidance when step CLI is unavailable or incompatible.

Key Changes

  • Added step CLI version check: New _check_step_version() diagnostic probe that verifies step CLI availability and reports its version. This check is non-required and will skip gracefully if step is not found.
  • Integrated version check into diagnostics: Added the new step version check to the standard diagnostic probes pipeline.
  • Removed unsupported --ip flag: Removed the --ip flag from the step ca init command as it's not supported in newer step versions. Docker networking now handles IP assignment instead.
  • Enhanced error logging: Added detailed logging for step ca init failures including the command executed, exit code, and output to aid in debugging.
  • Improved error messages: Updated PKI error messages to provide actionable guidance about step CLI version compatibility and the removal of the --ip flag.

Implementation Details

  • The step version check uses shutil.which() to locate the step CLI and runs step version to verify it's working
  • The check returns a SKIP status if step is not found (non-blocking for systems not using PKI features)
  • Returns WARN status if version check fails, allowing diagnostics to continue
  • Error handling in PKI initialization now logs the full command and output for better troubleshooting

https://claude.ai/code/session_01YZeM5c3NRxL5jVCNGtbcCD

- Remove unsupported '--ip' flag from step ca init command (newer step versions don't support this flag; IP assignment is handled by Docker networking)
- Improve error diagnostics in PKI handler with detailed logging of step command invocation and failure reasons
- Add step CLI version check to preflight diagnostics for early detection of PKI compatibility issues
- Better error messages guide users when step CLI is missing or incompatible

Fixes Phase 3 PKI initialization failure with newer step-ca images that removed the --ip flag.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YZeM5c3NRxL5jVCNGtbcCD
@aidankhogg aidankhogg self-assigned this Jun 29, 2026
@aidankhogg aidankhogg merged commit c44fcf7 into dev/alpha Jun 29, 2026
3 of 5 checks passed
@aidankhogg aidankhogg deleted the claude/netengine-setup-diagnostics-p4dqek branch June 29, 2026 08:25
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