MT#65735 Update mariadb ip checks with latest improvements

The 821_network-ports.ngcp.yaml file is updated to take into
consideration the improvement done on templatesi.get repo in
following commits:
- 4ab3a9cc80726d48ca99ffa53ac3d7b3635de091
- f655716189a1d448a7e9a69d8699cbce54b7d9cb

This way it will check for the correct IP addresses depending on
what system it is (CE or PRO/CARRIER) and if it is PRO/CARRIER it
will check what value mariadb.bin_all_interfaces has.

NOTE: redis_ips has been renamed to int_ips in order to use the
same variable for both Redis and Mariadb IPs as they are the same.

Change-Id: I1809e88b6321d2182282f2d9733007fb1e865ff6
mr26.3.1
Jose Su 2 months ago
parent 3fdacc4af7
commit 00663d6ed4

@ -66,8 +66,8 @@
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;
int_ips = ['127.0.0.1', ha_int_ips.0];
int_ips = int_ips.sort.unique;
-%]
port:
@ -117,9 +117,23 @@ port:
[% END -%]
# MySQL
[%
IF general.ngcp_type == 'spce';
ip_list = ['127.0.0.1'];
ELSE;
IF mariadb.bind_all_interfaces == 'no';
ip_list = int_ips;
ELSE;
ip_list = ['0.0.0.0'];
END;
END;
-%]
tcp:3306:
listening: true
ip: ["[% general.ngcp_type == 'spce' ? '127.0.0.1' : '0.0.0.0' %]"]
ip:
[% FOREACH ip IN ip_list -%]
- "[% ip %]"
[% END -%]
[% IF is_lb -%]
# Kamailio load-balancer
@ -234,7 +248,7 @@ port:
tcp:6379:
listening: true
ip:
[% FOREACH ip IN redis_ips -%]
[% FOREACH ip IN int_ips -%]
- "[% ip %]"
[% END -%]
tcp6:6379:

Loading…
Cancel
Save