From 31fdcefacf66d5f650bdf6792bda286e07d1bbcb Mon Sep 17 00:00:00 2001 From: hc-github-team-secure-vault-core <82990506+hc-github-team-secure-vault-core@users.noreply.github.com> Date: Wed, 27 Sep 2023 19:39:59 -0400 Subject: [PATCH] backport of commit 460b5de47b2b75b9cbeab06933f15774b7819d50 (#23357) Co-authored-by: Ryan Cragun --- enos/enos-scenario-replication.hcl | 13 +++++++++++-- .../scripts/get-follower-private-ips.sh | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/enos/enos-scenario-replication.hcl b/enos/enos-scenario-replication.hcl index 638011b8e6..1fd753fa07 100644 --- a/enos/enos-scenario-replication.hcl +++ b/enos/enos-scenario-replication.hcl @@ -382,8 +382,12 @@ scenario "replication" { } step "get_primary_cluster_ips" { - module = module.vault_get_cluster_ips - depends_on = [step.verify_that_vault_primary_cluster_is_unsealed] + module = module.vault_get_cluster_ips + depends_on = [ + step.verify_vault_version, + step.verify_ui, + step.verify_that_vault_primary_cluster_is_unsealed, + ] providers = { enos = local.enos_provider[matrix.distro] @@ -802,6 +806,11 @@ scenario "replication" { value = step.create_secondary_cluster_targets.hosts } + output "secondary_cluster_root_token" { + description = "The Vault secondary cluster root token" + value = step.create_secondary_cluster.root_token + } + output "remaining_hosts" { description = "The Vault cluster primary hosts after removing the leader and follower" value = step.get_remaining_hosts_replication_data.remaining_hosts diff --git a/enos/modules/vault_get_cluster_ips/scripts/get-follower-private-ips.sh b/enos/modules/vault_get_cluster_ips/scripts/get-follower-private-ips.sh index 1926961174..369d896dd7 100644 --- a/enos/modules/vault_get_cluster_ips/scripts/get-follower-private-ips.sh +++ b/enos/modules/vault_get_cluster_ips/scripts/get-follower-private-ips.sh @@ -20,7 +20,7 @@ binpath=${VAULT_INSTALL_DIR}/vault test -x "$binpath" || fail "Unable to locate vault binary at $binpath" count=0 -retries=5 +retries=10 while :; do # Vault >= 1.10.x has the operator members. If we have that then we'll use it. if $binpath operator -h 2>&1 | grep members &> /dev/null; then