fix(installer): Detect early cloud-init completion#69
Open
ryanheffernan wants to merge 5 commits into
Open
Conversation
📝 WalkthroughWalkthroughThe installer reorders cloud-init output to show cluster status and a deploy command before the completion banner. It also checks remote logs for the setup marker before and during cloud-init waiting, with shared tail-process cleanup and tests for these paths. ChangesCloud-init setup completion
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant AirSimulationManager
participant RemoteServer
participant CloudInitTailProcess
AirSimulationManager->>RemoteServer: Check setup marker in configured logs
RemoteServer-->>AirSimulationManager: Marker found or not found
alt marker found
AirSimulationManager-->>AirSimulationManager: Return success
else marker not found
AirSimulationManager->>CloudInitTailProcess: Tail cloud-init output
RemoteServer-->>AirSimulationManager: Report cloud-init done
AirSimulationManager->>RemoteServer: Recheck setup marker
RemoteServer-->>AirSimulationManager: Marker found or not found
AirSimulationManager->>CloudInitTailProcess: Terminate or kill tail process
AirSimulationManager-->>AirSimulationManager: Return success or failure
end
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@installer/src/nv_config_manager_installer/air_sim/sim_manager.py`:
- Around line 771-785: The _remote_setup_marker_exists method is building the
grep call as separate ssh arguments, which causes the remote shell to
re-tokenize the setup banner and miss existing markers. Update the ssh
invocation in _remote_setup_marker_exists so sudo grep is passed as one remote
command string, preserving the exact _SETUP_COMPLETE_MARKER and _SETUP_LOG_PATHS
handling. Keep the fix localized to the _remote_setup_marker_exists path so the
shortcut checks work before falling back to the tail/status flow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: a42922c4-508e-4926-8f49-0d88b8735017
📒 Files selected for processing (1)
installer/src/nv_config_manager_installer/air_sim/sim_manager.py
Signed-off-by: rheffernan <rheffernan@nvidia.com>
Signed-off-by: rheffernan <rheffernan@nvidia.com>
Signed-off-by: rheffernan <rheffernan@nvidia.com>
ryanheffernan
force-pushed
the
codex/fix-air-sim-setup-watcher
branch
from
July 6, 2026 23:20
73bd500 to
77c0f4b
Compare
Collaborator
Author
|
/ok to test 77c0f4b |
ryanheffernan
marked this pull request as ready for review
July 6, 2026 23:26
ryanheffernan
requested review from
dmathur0,
jojung1,
polarweasel,
spidercensus,
susanhooks and
zsblevins
as code owners
July 6, 2026 23:26
Signed-off-by: rheffernan <rheffernan@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix false Air simulation setup failures caused by two issues in the cloud-init watcher:
tail -fstream. Whencloud-init statusbecomesdone, the watcher previously treated the missing streamed banner as failure even when/var/log/nvcm-setup.logshowed that setup completed successfully.subprocess.TimeoutExpiredexception then masks the setup result and reports the overall run as failed.This change:
/var/log/cloud-init-output.logand/var/log/nvcm-setup.logfor an existing completion marker before starting the live tail;donebefore declaring setup failure;terminate()tokill()when the process does not exit within five seconds;Validation
Checklist
CONTRIBUTING.md.