MT#61541 Fix redis IP checks

We should not repeat the loopback IP in case it appears in the
ha_int_ips. Use a dedicated array to track it, so that we can sort
and filter it.

The duplication has been present for a long time, but with newer goss,
it now fails.

Change-Id: I8f79551f74675607ba803605d8b83949dcf8a599
mr13.3
Guillem Jover 1 year ago
parent a15e2099e1
commit 4e065de31d

@ -65,6 +65,9 @@
argv.type = 'ha_int';
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
ha_int_ips = out;
redis_ips = ['127.0.0.1', ha_int_ips.0];
redis_ips = redis_ips.sort.unique;
-%]
port:
@ -230,7 +233,10 @@ port:
# Redis
tcp:6379:
listening: true
ip: ["127.0.0.1", "[% ha_int_ips.0 %]"]
ip:
[% FOREACH ip IN redis_ips -%]
- "[% ip %]"
[% END -%]
tcp6:6379:
listening: true
ip: ["::1"]

Loading…
Cancel
Save