chore(clsp): auto disable ztp on agent start to simplify dev - #1502
chore(clsp): auto disable ztp on agent start to simplify dev#1502Frostman wants to merge 1 commit into
Conversation
Signed-off-by: Sergei Lukianov <me@slukjanov.name>
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the Celestica (SONiC+) enforcement path in the agent to additionally disable ZTP when processing/applying config, aiming to simplify developer workflows on CLS+ devices.
Changes:
- Pass the request context into
enforceCelesticaStateso it can be used for command timeouts/cancellation. - Add a
sudo ztp disable --yescommand execution with a 5-minute timeout during Celestica enforcement. - Update logging to reflect the new enforcement behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ctx, cancel := context.WithTimeout(ctx, 5*time.Minute) | ||
| defer cancel() | ||
|
|
||
| cmd := exec.CommandContext(ctx, "sudo", "ztp", "disable", "--yes") | ||
| cmd.Stdout = logutil.NewSink(ctx, slog.Debug, "ztp-disable: ") | ||
| cmd.Stderr = logutil.NewSink(ctx, slog.Debug, "ztp-disable: ") |
| if err := cmd.Run(); err != nil { | ||
| return fmt.Errorf("ztp-disable: %w", err) | ||
| } |
|
|
||
| // temp hack to patch shadow file for admin user on Celestica SONiC+ to avoid prompt for changing password | ||
| slog.Info("Celestica SONiC+ configuration not supported, just enforcing admin password") | ||
| slog.Info("Celestica SONiC+ configuration not supported, just enforcing admin password and turning off ZTP") |
|
🚀 Temp artifacts published: |
We need to make sure Celestica SONiC+ 5.0 works fine w/o it so we know that it doesn't break anything by running it too early