fix(reboot): surface vmx locator execution readiness
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m19s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m19s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -3435,6 +3435,19 @@ def _enrich_from_current_readbacks(
|
||||
state["windows99_vmx_source_locator_check_mode_ready"] = bool(
|
||||
windows99_vmx_source_locator_readback.get("locator_check_mode_ready") is True
|
||||
)
|
||||
state["windows99_vmx_source_locator_effective_collect_ready"] = bool(
|
||||
windows99_vmx_source_locator_readback.get("effective_locator_collect_ready")
|
||||
is True
|
||||
)
|
||||
state["windows99_vmx_source_locator_collect_blocker"] = str(
|
||||
windows99_vmx_source_locator_readback.get("locator_collect_blocker") or ""
|
||||
)
|
||||
state["windows99_vmx_source_locator_ssh_batch_ready"] = bool(
|
||||
windows99_vmx_source_locator_readback.get("ssh_batch_ready") is True
|
||||
)
|
||||
state["windows99_vmx_source_locator_ssh_batch_status"] = str(
|
||||
windows99_vmx_source_locator_readback.get("ssh_batch_status") or "unknown"
|
||||
)
|
||||
state["windows99_vmx_source_locator_target_aliases"] = _strings(
|
||||
windows99_vmx_source_locator_readback.get("target_vm_aliases")
|
||||
)
|
||||
@@ -3822,6 +3835,18 @@ def _enrich_from_current_readbacks(
|
||||
evidence["windows99_vmx_source_locator_check_mode_ready"] = state[
|
||||
"windows99_vmx_source_locator_check_mode_ready"
|
||||
]
|
||||
evidence["windows99_vmx_source_locator_effective_collect_ready"] = state[
|
||||
"windows99_vmx_source_locator_effective_collect_ready"
|
||||
]
|
||||
evidence["windows99_vmx_source_locator_collect_blocker"] = state[
|
||||
"windows99_vmx_source_locator_collect_blocker"
|
||||
]
|
||||
evidence["windows99_vmx_source_locator_ssh_batch_ready"] = state[
|
||||
"windows99_vmx_source_locator_ssh_batch_ready"
|
||||
]
|
||||
evidence["windows99_vmx_source_locator_ssh_batch_status"] = state[
|
||||
"windows99_vmx_source_locator_ssh_batch_status"
|
||||
]
|
||||
evidence["windows99_vmx_source_locator_target_aliases"] = state[
|
||||
"windows99_vmx_source_locator_target_aliases"
|
||||
]
|
||||
@@ -4584,6 +4609,18 @@ def _set_rollups_and_summary(
|
||||
"windows99_vmx_source_locator_check_mode_ready": (
|
||||
state.get("windows99_vmx_source_locator_check_mode_ready") is True
|
||||
),
|
||||
"windows99_vmx_source_locator_effective_collect_ready": (
|
||||
state.get("windows99_vmx_source_locator_effective_collect_ready") is True
|
||||
),
|
||||
"windows99_vmx_source_locator_collect_blocker": str(
|
||||
state.get("windows99_vmx_source_locator_collect_blocker") or ""
|
||||
),
|
||||
"windows99_vmx_source_locator_ssh_batch_ready": (
|
||||
state.get("windows99_vmx_source_locator_ssh_batch_ready") is True
|
||||
),
|
||||
"windows99_vmx_source_locator_ssh_batch_status": str(
|
||||
state.get("windows99_vmx_source_locator_ssh_batch_status") or "unknown"
|
||||
),
|
||||
"windows99_vmx_source_locator_target_aliases": _strings(
|
||||
state.get("windows99_vmx_source_locator_target_aliases")
|
||||
),
|
||||
@@ -4876,6 +4913,18 @@ def _set_rollups_and_summary(
|
||||
"windows99_vmx_source_locator_check_mode_ready": (
|
||||
state.get("windows99_vmx_source_locator_check_mode_ready") is True
|
||||
),
|
||||
"windows99_vmx_source_locator_effective_collect_ready": (
|
||||
state.get("windows99_vmx_source_locator_effective_collect_ready") is True
|
||||
),
|
||||
"windows99_vmx_source_locator_collect_blocker": str(
|
||||
state.get("windows99_vmx_source_locator_collect_blocker") or ""
|
||||
),
|
||||
"windows99_vmx_source_locator_ssh_batch_ready": (
|
||||
state.get("windows99_vmx_source_locator_ssh_batch_ready") is True
|
||||
),
|
||||
"windows99_vmx_source_locator_ssh_batch_status": str(
|
||||
state.get("windows99_vmx_source_locator_ssh_batch_status") or "unknown"
|
||||
),
|
||||
"windows99_vmx_source_locator_target_aliases": _strings(
|
||||
state.get("windows99_vmx_source_locator_target_aliases")
|
||||
),
|
||||
|
||||
@@ -75,6 +75,17 @@ def build_windows99_vmx_source_locator_readback(
|
||||
and package.get("package_ready") is True
|
||||
and package.get("check_mode_allowed_by_this_package") is True
|
||||
)
|
||||
management_channel_ready = package.get("management_channel_ready") is True
|
||||
ssh_batch_ready = package.get("ssh_batch_ready") is True
|
||||
ssh_batch_status = str(package.get("ssh_batch_status") or "unknown")
|
||||
can_collect_vmware_verify_without_secret = (
|
||||
package.get("can_collect_vmware_verify_without_secret") is True
|
||||
)
|
||||
local_console_channel_reachable = (
|
||||
package.get("local_console_channel_reachable") is True
|
||||
)
|
||||
console_collection_channels = _strings(package.get("console_collection_channels"))
|
||||
effective_locator_collect_ready = bool(locator_check_mode_ready and ssh_batch_ready)
|
||||
if locator_check_mode_ready:
|
||||
status = "check_mode_locator_ready_windows99_vmx_source_required"
|
||||
next_step = "run_no_secret_windows99_vmx_source_locator_collect"
|
||||
@@ -82,6 +93,12 @@ def build_windows99_vmx_source_locator_readback(
|
||||
"bash scripts/reboot-recovery/locate-windows99-vmx-source.sh "
|
||||
"--collect"
|
||||
)
|
||||
if not effective_locator_collect_ready:
|
||||
next_step = "restore_windows99_ssh_publickey_channel_then_rerun_locator"
|
||||
safe_next_step = (
|
||||
"select_existing_authorized_public_key_user_or_set_WINDOWS99_SSH_USERS_"
|
||||
"then_rerun_locator_no_password"
|
||||
)
|
||||
elif source_locator_required:
|
||||
status = "blocked_locator_package_not_ready"
|
||||
next_step = "repair_package_first"
|
||||
@@ -112,6 +129,18 @@ def build_windows99_vmx_source_locator_readback(
|
||||
"locator_schema_version": _LOCATOR_SCHEMA_VERSION,
|
||||
"collector_readback_present": False,
|
||||
"collector_collection_status": "not_collected_by_api_readback",
|
||||
"management_channel_ready": management_channel_ready,
|
||||
"can_collect_vmware_verify_without_secret": (
|
||||
can_collect_vmware_verify_without_secret
|
||||
),
|
||||
"ssh_batch_ready": ssh_batch_ready,
|
||||
"ssh_batch_status": ssh_batch_status,
|
||||
"local_console_channel_reachable": local_console_channel_reachable,
|
||||
"console_collection_channels": console_collection_channels,
|
||||
"effective_locator_collect_ready": effective_locator_collect_ready,
|
||||
"locator_collect_blocker": (
|
||||
"" if effective_locator_collect_ready else f"ssh_batch_{ssh_batch_status}"
|
||||
),
|
||||
"remote_locator_mode": "in_memory_stdin_scriptblock",
|
||||
"expected_vmx_path_count": expected_vmx_path_count,
|
||||
"expected_vmx_path_present_count": None,
|
||||
@@ -146,11 +175,14 @@ def build_windows99_vmx_source_locator_readback(
|
||||
},
|
||||
"check_mode": {
|
||||
"allowed": locator_check_mode_ready,
|
||||
"effective_collect_ready": effective_locator_collect_ready,
|
||||
"path_existence_only": True,
|
||||
"vmx_file_content_read": False,
|
||||
"raw_path_output": False,
|
||||
"path_fingerprint_only": True,
|
||||
"collector_command": safe_next_step if locator_check_mode_ready else "",
|
||||
"ssh_batch_ready": ssh_batch_ready,
|
||||
"ssh_batch_status": ssh_batch_status,
|
||||
},
|
||||
"target_selector": {
|
||||
"host_alias": "99",
|
||||
|
||||
Reference in New Issue
Block a user