Skip to content

Commit e46c18c

Browse files
authored
Fix gateway chassis prefix stripping (#1928)
1 parent 3fd38bc commit e46c18c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

etc/kayobe/ansible/fixes/ovn-fix-chassis-priorities.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181
gateway_info=$(ovn-nbctl lrp-get-gateway-chassis "$ext_port" 2>/dev/null || true)
8282
8383
while IFS= read -r line; do
84-
# Strip prefix
85-
chassis=$(echo "$line" | awk '{print $1}' | cut -d'_' -f2-)
84+
# Strip prefix, allowing '-' or '_' separator
85+
chassis=$(echo "$line" | awk '{print $1}' | sed "s/^${ext_port}[-_]//")
8686
gateway_chassis="$gateway_chassis $chassis"
8787
done <<< "$gateway_info"
8888

0 commit comments

Comments
 (0)