Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dag/gunbc/ci_deploy_target_host.dag
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import std.disposition { Disposition, Scaffold, SingleAuthority }
import std.decl_ref { DeclarationRef, WholeDeclaration }
import extdeps.shell
import gunbc.hostname_read {
hostname_short_read_local,
hostname_short_read,
HostnameShortCaptured,
HostnameShortCaptureRefused,
}
Expand All @@ -35,7 +35,7 @@ type DeployTargetHostObservation {
}

fn deploy_target_host_observed_hostname() -> String {
match hostname_short_read_local() {
match hostname_short_read(transport: LocalShell) {
HostnameShortCaptured { value: name } => name
HostnameShortCaptureRefused { reason: _ } => ""
}
Expand Down
4 changes: 2 additions & 2 deletions dag/gunbc/fleet_converge_cli.dag
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import gunbc.fleet_posix_accounts { fleet_posix_operator_user }
import gunbc.hostname_read {
HostnameShortCaptured,
HostnameShortCaptureRefused,
hostname_short_read_local,
hostname_short_read,
}
import gunbc.fleet_converge_apply { converge_apply_for_host, fleet_compute_host_for_identity }
import gunbc.host_layout { fleet_converge_receipt_dir, srv1_gunbc_repo_root }
Expand Down Expand Up @@ -135,7 +135,7 @@ fn converge_kernel_short_hostname_from_content(raw: String) -> String {
}

fn converge_local_kernel_short_hostname() -> String {
match hostname_short_read_local() {
match hostname_short_read(transport: LocalShell) {
HostnameShortCaptured { value: v } => v
HostnameShortCaptureRefused { reason: _ } => ""
}
Expand Down
9 changes: 5 additions & 4 deletions dag/gunbc/host_converge_slice1.dag
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module gunbc.host_converge_slice1

import std.types { String, NonEmptyStr, Bool, Int, List }
import gunbc.host_effect { LocalShell }
import std.disposition { Disposition, Terminal }
import product.placement_supply { HostIdentity }
import extdeps.systemd {
Expand All @@ -16,7 +17,7 @@ import extdeps.systemd {
TaskLimitAbsent,
}
import gunbc.systemctl_show_read {
systemctl_show_property_read_local,
systemctl_show_property_read,
SystemdPropertyCaptured,
SystemdPropertyCaptureRefused,
}
Expand Down Expand Up @@ -177,7 +178,7 @@ fn host_converge_slice1_probed_at() -> NonEmptyStr? {
}

fn host_converge_slice1_read_memory_max_raw(unit: NonEmptyStr) -> String? {
match systemctl_show_property_read_local(unit: unit, property: MemoryMax) {
match systemctl_show_property_read(transport: LocalShell, unit: unit, property: MemoryMax) {
SystemdPropertyCaptured { value: raw } => Present { value: raw }
SystemdPropertyCaptureRefused { reason: _ } => none
}
Expand Down Expand Up @@ -321,14 +322,14 @@ fn host_converge_slice1_tasks_knob(host: HostIdentity) -> ConvergeKnob? {
}

fn host_converge_slice1_read_tasks_max_raw(unit: NonEmptyStr) -> String? {
match systemctl_show_property_read_local(unit: unit, property: TasksMax) {
match systemctl_show_property_read(transport: LocalShell, unit: unit, property: TasksMax) {
SystemdPropertyCaptured { value: raw } => Present { value: raw }
SystemdPropertyCaptureRefused { reason: _ } => none
}
}

fn host_converge_slice1_read_tasks_current_raw(unit: NonEmptyStr) -> String? {
match systemctl_show_property_read_local(unit: unit, property: TasksCurrent) {
match systemctl_show_property_read(transport: LocalShell, unit: unit, property: TasksCurrent) {
SystemdPropertyCaptured { value: raw } => Present { value: raw }
SystemdPropertyCaptureRefused { reason: _ } => none
}
Expand Down
7 changes: 4 additions & 3 deletions dag/gunbc/host_hygiene_reaper_observe.dag
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
module gunbc.host_hygiene_reaper_observe

import std.types { String, NonEmptyStr, Bool, List, FilePath }
import gunbc.host_effect { LocalShell }
import std.disposition { Disposition, Terminal }
import std.realization_reconcile { ShowEffectiveRead, ReadObserved, ReadAbsent, Reconciliation }
import extdeps.systemd { SystemdUnitActiveState, ActiveState, ControlGroup, parse_systemd_unit_active_state }
import extdeps.shell
import gunbc.host_converge { gunbc_runner_all_slots_unit_glob }
import gunbc.systemctl_show_read {
systemctl_show_property_read_local,
systemctl_show_property_read,
SystemdPropertyCaptured,
SystemdPropertyCaptureRefused,
}
Expand All @@ -33,14 +34,14 @@ data host_hygiene_cgroupfs_root: String = "/sys/fs/cgroup"
data host_hygiene_build_cache_cmdline_marker: String = "sccache"

fn host_hygiene_read_active_state(unit: NonEmptyStr) -> SystemdUnitActiveState? {
match systemctl_show_property_read_local(unit: unit, property: ActiveState) {
match systemctl_show_property_read(transport: LocalShell, unit: unit, property: ActiveState) {
SystemdPropertyCaptured { value: raw } => parse_systemd_unit_active_state(raw: raw)
SystemdPropertyCaptureRefused { reason: _ } => none
}
}

fn host_hygiene_read_control_group(unit: NonEmptyStr) -> String? {
match systemctl_show_property_read_local(unit: unit, property: ControlGroup) {
match systemctl_show_property_read(transport: LocalShell, unit: unit, property: ControlGroup) {
SystemdPropertyCaptured { value: cg } => if cg == "" { none } else { Present { value: cg } }
SystemdPropertyCaptureRefused { reason: _ } => none
}
Expand Down
Loading
Loading