Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .github/workflows/fleet-converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ jobs:
WIF_ACCESS_TOKEN: ${{ steps.wif_auth.outputs.access_token }}
FLEET_CONVERGE_EXPECTED_HOST: ${{ github.event.inputs.host }}
if: github.event.inputs.mode == 'mtcollins1_boot'
timeout-minutes: 38
timeout-minutes: 43
- name: Upload Mt. Collins unit 1 boot SOL capture and receipts
id: mtcollins1_boot_receipt_upload
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
Expand Down
100 changes: 99 additions & 1 deletion dag/extdeps/bmc/http.dag
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import extdeps.external_authority { ExternalAuthority }
import extdeps.uri { Uri, Https }
import std.decl_ref { DeclarationRef, WholeDeclaration }
import std.disposition { Disposition, RealizationDispatch, Scaffold }
import std.types { Bool, NonEmptyStr, Unit }
import std.types { Bool, Int, NonEmptyStr, Unit }
import std.string_type { String }
data extdeps_external_authority_anchor: ExternalAuthority = ExternalAuthority {
uri: Uri {
Expand Down Expand Up @@ -80,6 +80,15 @@ data redfish_http_hardwired_transport_note: String = "§3(b) declared debt: ever
// on an unreachable host stdout is "\n000" and stderr is the only text naming the cause. A caller
// that refuses on this op must refuse with stderr; refusing with the stdout blob refuses with
// "\n000", which is typed but locates nothing.
// THE INVENTORY READS (GetSystemsCollection, GetMemoryCollection, GetMemory, GetProcessorCollection,
// GetProcessor) BIND stderr AND exit_code BESIDE THE BODY, because their consumer
// (gunbc.machine_intake_mtcollins1_boot_diagnostic_bundle) records WHY a read failed, not only that
// it did: curl exit 7 (connection refused or host unreachable), 28 (timeout), 6 (name not
// resolved) and 22 with "returned error: 401" on stderr (authentication refused) are different
// diagnoses for a remote operator, and a Bool collapses them. They carry --connect-timeout and
// --max-time so a BMC that does not answer is a bounded, typed reading rather than a hung step.
// The system id is an INPUT, never the literal "system" GetSystem hardcodes for OpenBMC: which Id a
// controller publishes is read from its Systems collection, not assumed.
service redfish.Http {

operation GetServiceRoot {
Expand Down Expand Up @@ -315,4 +324,93 @@ service redfish.Http {
nonzero => String "redfish system reset POST failed"
}
}
operation GetSystemsCollection {
input { bmc_host: NonEmptyStr, netrc_file: NonEmptyStr }
output {
body: String from "stdout",
transport_stderr: String from "stderr",
exit_code: Int from "exit_code",
success: Bool from "exit_success",
}
readonly
transport shell {
argv: ["curl", "--fail-with-body", "-sS", "-k", "--connect-timeout", "10", "--max-time", "30", "--netrc-file", "{netrc_file}", "https://{bmc_host}/redfish/v1/Systems"]
}
exit {
0 => Unit
nonzero => String "redfish Systems collection GET failed"
}
}

operation GetMemoryCollection {
input { bmc_host: NonEmptyStr, netrc_file: NonEmptyStr, system_id: NonEmptyStr }
output {
body: String from "stdout",
transport_stderr: String from "stderr",
exit_code: Int from "exit_code",
success: Bool from "exit_success",
}
readonly
transport shell {
argv: ["curl", "--fail-with-body", "-sS", "-k", "--connect-timeout", "10", "--max-time", "30", "--netrc-file", "{netrc_file}", "https://{bmc_host}/redfish/v1/Systems/{system_id}/Memory"]
}
exit {
0 => Unit
nonzero => String "redfish Memory collection GET failed"
}
}

operation GetMemory {
input { bmc_host: NonEmptyStr, netrc_file: NonEmptyStr, system_id: NonEmptyStr, memory_id: NonEmptyStr }
output {
body: String from "stdout",
transport_stderr: String from "stderr",
exit_code: Int from "exit_code",
success: Bool from "exit_success",
}
readonly
transport shell {
argv: ["curl", "--fail-with-body", "-sS", "-k", "--connect-timeout", "10", "--max-time", "30", "--netrc-file", "{netrc_file}", "https://{bmc_host}/redfish/v1/Systems/{system_id}/Memory/{memory_id}"]
}
exit {
0 => Unit
nonzero => String "redfish Memory GET failed"
}
}

operation GetProcessorCollection {
input { bmc_host: NonEmptyStr, netrc_file: NonEmptyStr, system_id: NonEmptyStr }
output {
body: String from "stdout",
transport_stderr: String from "stderr",
exit_code: Int from "exit_code",
success: Bool from "exit_success",
}
readonly
transport shell {
argv: ["curl", "--fail-with-body", "-sS", "-k", "--connect-timeout", "10", "--max-time", "30", "--netrc-file", "{netrc_file}", "https://{bmc_host}/redfish/v1/Systems/{system_id}/Processors"]
}
exit {
0 => Unit
nonzero => String "redfish Processors collection GET failed"
}
}

operation GetProcessor {
input { bmc_host: NonEmptyStr, netrc_file: NonEmptyStr, system_id: NonEmptyStr, processor_id: NonEmptyStr }
output {
body: String from "stdout",
transport_stderr: String from "stderr",
exit_code: Int from "exit_code",
success: Bool from "exit_success",
}
readonly
transport shell {
argv: ["curl", "--fail-with-body", "-sS", "-k", "--connect-timeout", "10", "--max-time", "30", "--netrc-file", "{netrc_file}", "https://{bmc_host}/redfish/v1/Systems/{system_id}/Processors/{processor_id}"]
}
exit {
0 => Unit
nonzero => String "redfish Processor GET failed"
}
}
}
24 changes: 23 additions & 1 deletion dag/extdeps/bmc/ipmi.dag
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module extdeps.bmc.ipmi

import extdeps.external_authority { ExternalAuthority }
import extdeps.uri { Uri, Https }
import std.types { Bool, NonEmptyStr, Unit }
import std.types { Bool, Int, NonEmptyStr, Unit }
import std.string_type { String }
data extdeps_external_authority_anchor: ExternalAuthority = ExternalAuthority {
uri: Uri {
Expand Down Expand Up @@ -58,6 +58,12 @@ data extdeps_external_authority_anchor: ExternalAuthority = ExternalAuthority {
// THIS PROSE SITS ABOVE THE SERVICE AND NOT BESIDE EACH OPERATION because §4c admits annotations at
// module-item grain only; a `//` block inside a declaration body is a hard error, which is how the
// first draft of these operations was caught.
// SelListAuthenticated IS SelList WITH A CREDENTIAL, FOR THE SAME REASON SdrTypeList IS SdrList
// WITH ONE: every controller in this fleet refuses an unauthenticated session, and changing what
// SelList means would silently change its existing readers. It binds stderr and exit_code because
// its consumer (gunbc.machine_intake_mtcollins1_boot_diagnostic_bundle) records WHY a read failed,
// and it carries -N/-R so a controller that does not answer is a bounded reading, not a hung step.
//
// SdrTypeList IS THE AUTHENTICATED, TYPE-SELECTED READ, AND IT EXISTS BECAUSE SdrList COULD NOT BE
// USED. The three original readonly operations carry no credential, which the asymmetry paragraph
// above already records as a real gap; every controller in this fleet now requires one, so a sensor
Expand Down Expand Up @@ -115,6 +121,22 @@ service diagnostic.ipmi.Tool {
}
}

operation SelListAuthenticated {
input { bmc_host: NonEmptyStr, username: NonEmptyStr, password_file: NonEmptyStr }
output {
stdout: String from "stdout",
transport_stderr: String from "stderr",
exit_code: Int from "exit_code",
success: Bool from "exit_success",
}
readonly
transport shell { argv: ["ipmitool", "-H", "{bmc_host}", "-I", "lanplus", "-U", "{username}", "-f", "{password_file}", "-N", "5", "-R", "2", "sel", "elist"] }
exit {
0 => Unit
nonzero => String "ipmitool authenticated sel elist failed"
}
}

operation ChassisBootDev {
input { bmc_host: NonEmptyStr, username: NonEmptyStr, password_file: NonEmptyStr, device: NonEmptyStr }
output { stdout: String from "stdout", success: Bool from "exit_success" }
Expand Down
Loading
Loading