Skip to content

Commit

Permalink
tests/vm-migration: simplify member2 init
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Oct 11, 2024
1 parent c6bc3c1 commit 608c36c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/vm-migration
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,14 @@ fi

# Create a preseed file for member2 to join member1.
member2Address="$(lxc query /1.0/instances/member2?recursion=2 | jq -r ".state.network.enp5s0.addresses[0].address")"
preseed="$(
cat <<EOF

# Initialise member2 with the preseed.
lxc exec member2 -- lxd init --preseed << EOF
cluster:
enabled: true
server_address: "${member2Address}"
cluster_token: "${joinToken}"
EOF
)"

# Initialise member2 with the preseed.
echo "${preseed}" | lxc exec member2 -- lxd init --preseed

# Copy the ceph config from the microceph node into each cluster member.
rm -rf etc/ceph
Expand Down

0 comments on commit 608c36c

Please sign in to comment.