fix(reboot): use host111 as windows99 vm target
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 4m18s
CD Pipeline / build-and-deploy (push) Successful in 5m7s
CD Pipeline / post-deploy-checks (push) Successful in 1m53s
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 4m18s
CD Pipeline / build-and-deploy (push) Successful in 5m7s
CD Pipeline / post-deploy-checks (push) Successful in 1m53s
This commit is contained in:
@@ -16,7 +16,7 @@ from typing import Any
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
SCHEMA_VERSION = "awoooi_reboot_auto_recovery_slo_scorecard_v1"
|
||||
REQUIRED_HOSTS = {"99", "110", "111", "112", "120", "121", "188"}
|
||||
WINDOWS99_REQUIRED_VM_ALIASES = {"110", "112", "120", "121", "188"}
|
||||
WINDOWS99_REQUIRED_VM_ALIASES = {"111", "112", "120", "121", "188"}
|
||||
|
||||
|
||||
def parse_args() -> argparse.Namespace:
|
||||
|
||||
@@ -87,8 +87,7 @@ def test_reboot_p0_contract_covers_all_required_hosts_and_vmware_autostart() ->
|
||||
assert "Host112Vmx" in windows99
|
||||
assert "D:\\Documents\\Virtual Machines" in windows99
|
||||
assert "D:\\Downloads" in windows99
|
||||
assert '[string[]]$RequiredVmAliases = @("110", "188", "120", "121", "112")' in windows99
|
||||
assert 'if ($Host111Vmx -and -not ($VmOrder -contains "111"))' in windows99
|
||||
assert '[string[]]$RequiredVmAliases = @("111", "188", "120", "121", "112")' in windows99
|
||||
assert "HOST111_VMWARE_TARGET=explicit_or_required" in windows99
|
||||
assert "VMWARE_AUTOSTART_VERIFY_READY" in windows99
|
||||
assert "WINDOWS_UPDATE_POLICY" in windows99
|
||||
|
||||
@@ -18,8 +18,8 @@ VALID_RED_VERIFY = """\
|
||||
AWOOOI_WINDOWS99_VMWARE_AUTOSTART=1
|
||||
MODE=Verify
|
||||
VMRUN_PRESENT=1
|
||||
HOST111_VMWARE_TARGET=not_required_by_default_missing_no_vmx_found_on_99
|
||||
VMX alias=110 path=D:\\Documents\\Virtual Machines\\110\\110.vmx present=1
|
||||
HOST111_VMWARE_TARGET=explicit_or_required
|
||||
VMX alias=111 path=D:\\Documents\\Virtual Machines\\111\\111.vmx present=1
|
||||
VMX alias=188 path=D:\\Documents\\Virtual Machines\\188\\188.vmx present=1
|
||||
VMX alias=120 path=D:\\Documents\\Virtual Machines\\120\\120.vmx present=1
|
||||
VMX alias=121 path=D:\\Documents\\Virtual Machines\\121\\121.vmx present=1
|
||||
@@ -28,7 +28,7 @@ VMWARE_SERVICE name=VMAuthdService present=1 status=Running startup_type=Auto ok
|
||||
VMWARE_SERVICE name=VMnetDHCP present=1 status=Running startup_type=Auto ok=1
|
||||
VMWARE_AUTOSTART_TASK name=AWOOOI-Start-VMware-VMs present=1 enabled=1 state=Ready trigger_count=1 action_count=1 ok=1
|
||||
WINDOWS_UPDATE_POLICY name=NoAutoRebootWithLoggedOnUsers value=1 expected=1 ok=1
|
||||
VM_POWER alias=110 vmx_present=1 running=0
|
||||
VM_POWER alias=111 vmx_present=1 running=0
|
||||
VM_POWER alias=188 vmx_present=1 running=0
|
||||
VM_POWER alias=120 vmx_present=1 running=0
|
||||
VM_POWER alias=121 vmx_present=1 running=0
|
||||
@@ -94,7 +94,7 @@ def test_valid_console_verify_red_artifact_is_accepted_and_normalized(
|
||||
assert values["status"] == "valid_console_verify_artifact_vmware_not_ready"
|
||||
assert values["missing_required_field_count"] == "0"
|
||||
assert values["missing_vmx_aliases"] == ""
|
||||
assert values["powered_off_aliases"] == "110,188,120,121,112"
|
||||
assert values["powered_off_aliases"] == "111,188,120,121,112"
|
||||
assert values["secret_value_read"] == "false"
|
||||
assert normalized.read_text(encoding="utf-8").startswith(
|
||||
"AWOOOI_WINDOWS99_VMWARE_AUTOSTART=1\n"
|
||||
@@ -130,11 +130,11 @@ def test_explicit_host111_artifact_can_be_validated_with_required_alias_override
|
||||
raw = tmp_path / "console-111.txt"
|
||||
raw.write_text(
|
||||
VALID_RED_VERIFY.replace(
|
||||
"HOST111_VMWARE_TARGET=not_required_by_default_missing_no_vmx_found_on_99",
|
||||
"HOST111_VMWARE_TARGET=explicit_or_required",
|
||||
"HOST111_VMWARE_TARGET=explicit_or_required",
|
||||
)
|
||||
.replace("VMX alias=110 path=D:\\Documents\\Virtual Machines\\110\\110.vmx present=1", "VMX alias=111 path= present=0")
|
||||
.replace("VM_POWER alias=110 vmx_present=1 running=0", "VM_POWER alias=111 vmx_present=0 running=0"),
|
||||
.replace("VMX alias=111 path=D:\\Documents\\Virtual Machines\\111\\111.vmx present=1", "VMX alias=111 path= present=0")
|
||||
.replace("VM_POWER alias=111 vmx_present=1 running=0", "VM_POWER alias=111 vmx_present=0 running=0"),
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ from pathlib import Path
|
||||
|
||||
|
||||
SCHEMA_VERSION = "windows99_console_verify_artifact_validator_v1"
|
||||
DEFAULT_REQUIRED_ALIASES = ("110", "188", "120", "121", "112")
|
||||
DEFAULT_REQUIRED_ALIASES = ("111", "188", "120", "121", "112")
|
||||
SENSITIVE_RE = re.compile(
|
||||
r"(?i)(password|passwd|secret|token|authorization|cookie|private[_ -]?key)\s*[=:]"
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ param(
|
||||
[string]$Host120Vmx = "",
|
||||
[string]$Host121Vmx = "",
|
||||
[string]$Host112Vmx = "",
|
||||
[string[]]$RequiredVmAliases = @("110", "188", "120", "121", "112"),
|
||||
[string[]]$RequiredVmAliases = @("111", "188", "120", "121", "112"),
|
||||
[string[]]$DiscoveryRoot = @(
|
||||
"D:\Documents\Virtual Machines",
|
||||
"D:\Downloads",
|
||||
@@ -25,9 +25,6 @@ $TaskName = "AWOOOI-Start-VMware-VMs"
|
||||
$ProgramDataDir = "C:\ProgramData\AWOOOI"
|
||||
$StartScript = Join-Path $ProgramDataDir "Start-AWOOOI-VMs.ps1"
|
||||
$VmOrder = @($RequiredVmAliases)
|
||||
if ($Host111Vmx -and -not ($VmOrder -contains "111")) {
|
||||
$VmOrder = @("111") + $VmOrder
|
||||
}
|
||||
$SuppliedVmx = @{
|
||||
"110" = $Host110Vmx
|
||||
"111" = $Host111Vmx
|
||||
|
||||
Reference in New Issue
Block a user