Repository navigation
DSV41-6 enroll sshpass as a host_cli_dependency for password-session runners (srv3/srv4 lack it) #11096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DSV41-6 enroll sshpass as a host_cli_dependency for password-session runners (srv3/srv4 lack it) #11096
Changes from all commits
a7e455e
af8a680
7e89e4d
25896c4
25f3db7
5bdcf51
2704b51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -168,6 +168,7 @@ type FleetConvergeWorkflowMode | |
| | HostResetReturn | ||
| | RunnerHostFileObserve | ||
| | RunnerHostFileConverge | ||
| | RunnerPasswordSessionToolConverge | ||
|
|
||
| fn fleet_converge_workflow_mode_wire(mode: FleetConvergeWorkflowMode) -> String { | ||
| match mode { | ||
|
|
@@ -190,6 +191,7 @@ fn fleet_converge_workflow_mode_wire(mode: FleetConvergeWorkflowMode) -> String | |
| HostResetReturn => "host_reset_return" | ||
| RunnerHostFileObserve => "runner_host_file_observe" | ||
| RunnerHostFileConverge => "runner_host_file_converge" | ||
| RunnerPasswordSessionToolConverge => "runner_password_session_tool_converge" | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -214,7 +216,7 @@ fn fleet_converge_spark_target_description() -> String { | |
| ], "") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Adding this twentieth mode makes both enrolled assertions in Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| data fleet_converge_workflow_modes: List<FleetConvergeWorkflowMode> = [FullHostPlan, LaunchEnvironmentPlan, AllocationStorePlan, FleetApply, OrgActionsObserve, AppControlPlaneObserve, MicrovmHostConverge, GuestImageObserve, GuestImageConverge, MicrovmBootProbe, SparkGrants, SparkBootstrap, SparkServingApply, SparkRuntimeImageProbe, DashboardDeploy, RlmLaunchDeploymentReceipt, HostResetReturn, RunnerHostFileObserve, RunnerHostFileConverge] | ||
| data fleet_converge_workflow_modes: List<FleetConvergeWorkflowMode> = [FullHostPlan, LaunchEnvironmentPlan, AllocationStorePlan, FleetApply, OrgActionsObserve, AppControlPlaneObserve, MicrovmHostConverge, GuestImageObserve, GuestImageConverge, MicrovmBootProbe, SparkGrants, SparkBootstrap, SparkServingApply, SparkRuntimeImageProbe, DashboardDeploy, RlmLaunchDeploymentReceipt, HostResetReturn, RunnerHostFileObserve, RunnerHostFileConverge, RunnerPasswordSessionToolConverge] | ||
|
|
||
| // WHICH SCOPE A MODE SELECTS, WHERE IT SELECTS ONE AT ALL. | ||
| // | ||
|
|
@@ -260,6 +262,7 @@ fn fleet_converge_mode_scope(mode: FleetConvergeWorkflowMode) -> FleetConvergeSc | |
| HostResetReturn => none | ||
| RunnerHostFileObserve => none | ||
| RunnerHostFileConverge => none | ||
| RunnerPasswordSessionToolConverge => none | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -651,6 +654,35 @@ data fleet_converge_runner_host_file_converge_step_if: String = fleet_converge_m | |
|
|
||
| data fleet_converge_runner_host_file_any_step_if: String = fleet_converge_any_mode_step_if(modes: [RunnerHostFileObserve, RunnerHostFileConverge]) | ||
|
|
||
| // THE MODE THAT CLOSES #11061'S REFUSAL. That change made a password-session leg refuse with a | ||
| // typed cause naming sshpass; this mode is the route that makes the refusal stop being true. It is | ||
| // a STEP in the existing host-pinned fleet-converge job rather than a job of its own, because the | ||
| // two own-job precedents here each state a reason that does not apply to it: host reset kills its | ||
| // own runner, and dashboard deploy needs the mutation concurrency domain. An apt ensure needs | ||
| // neither. | ||
| data fleet_converge_runner_password_session_tool_converge_step_if: String = fleet_converge_mode_step_if(mode: RunnerPasswordSessionToolConverge) | ||
|
|
||
| // THE RECEIPT IS UPLOADED ON FAILURE TOO. FailFast means the step's cat never runs when the | ||
| // ensure refuses, which is exactly when the body names the cause. always() is what keeps that | ||
| // body reachable after the job has already failed. | ||
| fn fleet_converge_runner_password_session_tool_receipt_upload_step() -> Step { | ||
| UsesStep { | ||
| name: Present { value: "Upload password-session tool converge receipt" }, | ||
| id: Present { value: "runner_password_session_tool_receipt_upload" }, | ||
| uses: upload_artifact_action, | ||
| with: Present { value: [ | ||
| kv(key: "name", value: yaml_string(s: "runner-password-session-tool-converge-receipt")), | ||
| kv(key: "path", value: yaml_string(s: "target/runner-password-session-tool-converge-receipt.txt")), | ||
| kv(key: "if-no-files-found", value: yaml_string(s: "error")), | ||
| kv(key: "retention-days", value: yaml_int(n: 30)), | ||
| ] }, | ||
| env: none, | ||
| if_condition: Present { value: concat("always() && (", concat(fleet_converge_runner_password_session_tool_converge_step_if, ")")) }, | ||
| continue_on_error: none, | ||
| timeout_minutes: Present { value: gunbc_ci_artifact_transfer_step_timeout_minutes } | ||
| } | ||
| } | ||
|
|
||
| data fleet_converge_spark_grants_step_if: String = fleet_converge_mode_step_if(mode: SparkGrants) | ||
|
|
||
| data fleet_converge_spark_bootstrap_step_if: String = fleet_converge_mode_step_if(mode: SparkBootstrap) | ||
|
|
@@ -931,6 +963,18 @@ fn fleet_converge_runner_host_file_converge_step() -> Step { | |
| ) | ||
| } | ||
|
|
||
| // IT REUSES THE RUNNER-HOST STEP SHAPER rather than spelling a fifth Step literal: same population | ||
| // (a rostered runner named by the host input), same env binding, same timeout authority. What | ||
| // differs is only the id, the sentence and the mode gate, which is exactly what the shaper takes. | ||
| fn fleet_converge_runner_password_session_tool_converge_step() -> Step { | ||
| fleet_converge_runner_host_file_step( | ||
| id: "runner_password_session_tool_converge", | ||
| name: "Password-session tools: ensure every tool password_session_host_cli_requirements enrolls is present on this runner, installing only what is measured absent", | ||
| invoke: gunbc_ci_runner_password_session_tool_converge_invoke(), | ||
| if_condition: fleet_converge_runner_password_session_tool_converge_step_if, | ||
| ) | ||
| } | ||
|
|
||
| fn fleet_converge_runner_host_file_receipt_upload_step() -> Step { | ||
| UsesStep { | ||
| name: Present { value: "Upload runner host file converge receipt" }, | ||
|
|
@@ -1355,6 +1399,8 @@ fn fleet_converge_job() -> Job { | |
| fleet_converge_spark_runtime_image_probe_step(), | ||
| fleet_converge_runner_host_file_observe_step(), | ||
| fleet_converge_runner_host_file_converge_step(), | ||
| fleet_converge_runner_password_session_tool_converge_step(), | ||
| fleet_converge_runner_password_session_tool_receipt_upload_step(), | ||
| fleet_converge_runner_host_file_receipt_upload_step(), | ||
| ci_fleet_key_agent_cleanup_step(), | ||
| ] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
runner_password_session_tool_convergeruns, this is the only exposure oftarget/runner-password-session-tool-converge-receipt.txt; the following upload step points at the runner-host-file receipt and is gated exclusively to the tworunner_host_file_*modes. Consequently this mode never publishes its receipt as an artifact, including on the failure path for which the new entry explicitly writes the receipt before returning, so a dedicatedalways()-gated upload is needed.Useful? React with 👍 / 👎.