Skip to content

launchd/orchdi: REQUIRES dep without HEALTHCHECK gets no gate and no enforcement #41

Description

@adiled

Deviation: REQUIRES is a hard dependency — "Required services are started first; if required service fails to become healthy, dependent does not start." On launchd and orchdi, a REQUIRES dep without a HEALTHCHECK produces no readiness gate and no enforcement at all.

src/orchdi.rs::build_dep_gates():

for (names, required) in [(&service.requires, true), (&service.after, false)] {
    for dep_name in names {
        if let Some(dep) = lookup(dep_name) {
            if let Some(hc) = &dep.healthcheck {   // skipped when no healthcheck
                gates.push(...)
            }
        }
    }
}

A REQUIRES dep with no healthcheck → no DepGate, so the supervisor starts the dependent with no requirement check. This ties back to the root-cause issue: the "started" readiness signal is missing, so the requirement is only expressible via healthcheck.

On systemd the requirement holds even without a healthcheck (REQUIRES emits BindsTo+After unconditionally), so this is a launchd/orchdi-specific gap.

Fix: per the root-cause issue — gate every dependency on start/completion first, and layer the healthcheck poll on top when present. A REQUIRES dep must at least have a start/completion gate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions