[SIGNIFICANT] Config reload restarts intentionally stopped services #25

Open
opened 2026-05-11 10:52:01 +00:00 by thabeta · 1 comment
Owner

Problem

In the reload handler in api.rs, for changed services, try_start_service is called unconditionally. If a service was intentionally stopped by the user (status = "stop" or user ran my_init stop <name>), a config reload will restart it.

Impact

Violates user intent. An operator who stopped a service for maintenance finds it restarted after a config reload, potentially causing data corruption or service disruption.

Files

  • crates/my_init_server/src/supervisor/api.rs -- reload method, "changed services" handling

Suggested Fix

  • Check the service's current state before restarting changed services
  • Only restart if the service was previously running
  • Respect status = "stop" configuration during reload
## Problem In the `reload` handler in `api.rs`, for changed services, `try_start_service` is called unconditionally. If a service was intentionally stopped by the user (status = "stop" or user ran `my_init stop <name>`), a config reload will restart it. ## Impact Violates user intent. An operator who stopped a service for maintenance finds it restarted after a config reload, potentially causing data corruption or service disruption. ## Files - `crates/my_init_server/src/supervisor/api.rs` -- `reload` method, "changed services" handling ## Suggested Fix - Check the service's current state before restarting changed services - Only restart if the service was previously running - Respect `status = "stop"` configuration during reload
Member

Classification: valid-bug — config reload restarts services that were intentionally stopped by the operator, violating user intent.

Per the issue description referencing crates/my_init_server/src/supervisor/api.rs reload method: try_start_service is called unconditionally for changed services without checking current state (stopped by user).

> Classification: valid-bug — config reload restarts services that were intentionally stopped by the operator, violating user intent. Per the issue description referencing crates/my_init_server/src/supervisor/api.rs reload method: try_start_service is called unconditionally for changed services without checking current state (stopped by user).
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_code/my_init#25
No description provided.