Skip to content

Commit a387116

Browse files
authored
fix: Update hyperconverged-lab script to properly add LAB_NAME_PREFIX to metallb ports (#911)
1 parent 32b4684 commit a387116

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/hyperconverged-lab.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@ if ! openstack security group show ${LAB_NAME_PREFIX}-jump-secgroup -f json 2> /
146146
--description "ping"
147147
fi
148148

149-
if ! METAL_LB_IP=$(openstack port show metallb-vip-0-port -f json 2> /dev/null | jq -r '.fixed_ips[0].ip_address'); then
149+
if ! METAL_LB_IP=$(openstack port show ${LAB_NAME_PREFIX}-metallb-vip-0-port -f json 2> /dev/null | jq -r '.fixed_ips[0].ip_address'); then
150150
echo "Creating the MetalLB VIP port"
151-
METAL_LB_IP=$(openstack port create --security-group ${LAB_NAME_PREFIX}-http-secgroup --network ${LAB_NAME_PREFIX}-net metallb-vip-0-port -f json | jq -r '.fixed_ips[0].ip_address')
151+
METAL_LB_IP=$(openstack port create --security-group ${LAB_NAME_PREFIX}-http-secgroup --network ${LAB_NAME_PREFIX}-net ${LAB_NAME_PREFIX}-metallb-vip-0-port -f json | jq -r '.fixed_ips[0].ip_address')
152152
fi
153153

154-
METAL_LB_PORT_ID=$(openstack port show metallb-vip-0-port -f value -c id)
154+
METAL_LB_PORT_ID=$(openstack port show ${LAB_NAME_PREFIX}-metallb-vip-0-port -f value -c id)
155155

156156
if ! METAL_LB_VIP=$(openstack floating ip list --port ${METAL_LB_PORT_ID} -f json 2> /dev/null | jq -r '.[]."Floating IP Address"'); then
157157
echo "Creating the MetalLB VIP floating IP"

0 commit comments

Comments
 (0)