fix: prefer tagged OCI edge over stale state

This commit is contained in:
juvenal.diaz 2026-10-28 13:08:47 -06:00
parent 3080289280
commit 5246b8107c
1 changed files with 3 additions and 1 deletions

View File

@ -8039,7 +8039,9 @@ refresh_oci_edge_endpoint() {
# State may have been lost even though the Jeannie-created instance still
# exists. Recover only the exact managed identity: display name
# homelab-edge plus managed_by=jeannie. Never adopt arbitrary jump boxes.
if [[ -z "${discovered_edge_instance_id}" && -n "${LAB_OCI_TENANCY_ID:-}" ]] &&
if [[ -n "${LAB_OCI_TENANCY_ID:-}" &&
"${LAB_OCI_EDGE_EXISTING_INSTANCE_ID:-}" == "" &&
"${LAB_OCI_EDGE_INSTANCE_MANAGED:-false}" != "true" ]] &&
declare -F oci_cli_resolve >/dev/null 2>&1; then
oci_bin="${oci_bin:-$(oci_cli_resolve 2>/dev/null || true)}"
if [[ -n "${oci_bin}" ]]; then