* sync_extra_sockets() renamed into sync_lb_and_extra_sockets()
* extra_sockets_sync() renamed into lb_and_extra_sockets_sync()
* $config now also contains merged $NETWORK_CONFIG (network.yml)
* lb_and_extra_sockets_sync does the following and then calls
generic_enum_sync() to provide with the gathered data:
* all shared ips from interfaces that
- host have 'lb' role
- host status 'online'
- interface has type '^sip_'
are added into the outbound sockets list of protos (udp, tcp, tls)
as: 'host:interface:proto' = 'proto:shared_ip:port'
(port is taken from config.kamailio.lb.port in case of ('udp', 'tcp')
and config.kamailio.tls.port in case of 'tls'
)
- if an interface has multiple shared IPs,
the key becomes 'host:interface:shared_ip:proto'
- $config->{kamailio}{lb}{extra_sockets} keys are merged
with the gathered config
* generic_enum_sync() - processes hash keys are now sorted
to have consistent output/processing
Change-Id: I218f1ae584e2dc9dfeb3a51c43d9f3fc950e829b
Debian/bookworm is the current stable release and this
is also what we're supporting, so switch GitHub actions
accordingly from bullseye to bookworm.
Change-Id: I427ede88cec3ba2ef26c1351807b06d75ed4a37a
We need to get the network information for the remote site. So we add
a new library file, and extend the get_all_shared_ips* ones to support
specifying a site name, defaulting to 'current'.
Change-Id: Id133ba1fc62b758c0779ac5951075c10cdf5736c
We check whether we have both a sites.yml and a sites/ directory.
If so, and multi-sites support is enabled, then we proceed to load
all the multi-sites configurations, by placing each of them under
«sites.<site-name>.<config>». Adding a «sites.current» link to the
current site, and filling the root tree config with the current site
as well for backwards compatibility.
Change-Id: Ia810f57e8e976eef6a7582bddda46c1701456ed6
This will replace the geo_cluster.enable knob from config.yml, as it
needs to be a out-of-band option and not one from within the site
specific configuration YAML files.
Change-Id: I1c062091bb3bc1c7e52311c09524dabec5a00e97
This variable has been deprecated for a long time (since mr10.5), and it
is not used anywhere in our entire NGCP code base.
Change-Id: Ic142a347fcef0405f8cf8304728b076af3369e0d
For multi-site support we need to pass all the possible files to load,
and these might be different between sites, so we need to check for
their existence from within tt2-process, instead of from the outside as
that would restrict them to only the current site.
Change-Id: I0965506832aa2f0a1ba67b19511c509bec60922e
The script got supported added for the maintenance file, but missed a
spot where the actual selection is performed.
Fixes: commit 948f940975
Change-Id: I9d092fd99a821f6f8ce72b0f7b8c05e5ab1c25e6
This variable has been deprecated for a long time (since mr10.5), and it
is not used anywhere in our entire NGCP code base.
Change-Id: I83b3f00c519c8e152fcb166b4ebeb635246b1915
In the deployment of our lab carrier, we are heavily using ngcpcfg set
command for example to change the IP addresses of all proxies. The issue is that
execution of a command takes around 1,5 seconds and this seems because every time
"set" is used, we call the check-permissions script, which has some time
penalty to be executed. Most likely nobody uses set quite often, so that is why
the problem was not so visible for a long time.
Change-Id: I47c6c3b88b0f108aadf9d8d9a2b131e0cb76b498
Add a library to return the full list of ping nodes to use for HA
verification. This makes it possible to print an identical list of ping
nodes in several places without code duplication.
The code is taken from templates/pacemaker/cluster.crm
Change-Id: Ie121a6062a15c09bf15af1761a22c5f4bcc3199e
* sync_timezone_version() checks the current olson database
version from DateTime::TimeZone vs ngcp.timezone.version
and updates billing.contacts.timezone field with the new
names following the "links" (aliases)
Change-Id: Iacb552a9151ffb8eaaa40a16b530cbde0cc4b718
We currently only fix up owner and permissions for known local files,
including the stock config.yml and any variant affecting the current
host (which include role selectors, pair or host specific files).
The problem is that when pushing these to the remotes where the files
are local there, then their permissions will be fixed up, and that will
happen independently for different files on different nodes. Which
results in git conflicts when trying to merge back these files.
Instead add a new variable that contains the glob for all such
customized files which we will fix up in the current node.
Change-Id: Ib2a7317a92733ad5b4d2fa8106759b00049edb68
This new library code will fetch a list of instances for a given service
name with a specific status.
Change-Id: I161af48d777e8478a8f1358ffd40c996cee9b4a5
We need to pass the host lists to the check remote code, and we should
not be passing any host lists to the check shared storage code, as that
takes an action instead.
Change-Id: I7292cf56f110df81f5a3b83da911742bae2af1b2
If value is already quoted it's written as '''X.X''' into yml file so
causes validation fail.
Fix of a38c0e6.
Change-Id: I4baa303950471782e1500561a4535131e4232123
Previously 'set-value' sets 1 even in case 1.0 was passed.
Check if the value is number and if yes - do not reval() it.
Add a testcase for a float number.
Change-Id: I6b4e014b036fe12ad62206ad3386d0bf0b1225f7
Fixing issues reported by new shellcheck v0.9.0:
1) SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
https://www.shellcheck.net/wiki/SC2317
(new feature as of shellcheck v0.9.0)
2) SC2086 (info): Double quote to prevent globbing and word splitting.
https://www.shellcheck.net/wiki/SC2086
(behavior change with shellcheck v0.9.0)
Change-Id: I73d50157f72b772c381cf1bff497079133bc6d09
If the element of array is not quoted it causes malformed output:
=======================
ngcpcfg set /tmp/config.yml "geo_cluster.remote_shared_proxy=[172.30.52.170]"
---
geo_cluster:
remote_shared_lb: []
remote_shared_proxy:
- "¬\x1E4ª"
======================
So detect it and print the error.
Add a testcase.
Change-Id: I7119256728c82b123eff5a171aa4e257b67ac5ff
Until Debian/bookworm is getting the new stable release, it's
known as bookworm/sid in /etc/debian_version.
Fixes:
| sp1: Error: Cannot process template '/etc/ngcp-config/templates/etc/default/ngcp-proxy.tt2':
| undef error - Error: unsupported Debian codename bookworm at (eval 16) line 30.
Change-Id: Idfe0119ce47cbe8fdcbcd57e9a2c2014e93cf6e1
These commands are db-specific, and the constants one involves the
database credentials, so give both better names to make it clear these
are not general purpose commands.
Preserve backwards compatibility symlinks for external callers, or
user muscle memory, which this gets migrated away.
Change-Id: I3baae364e786ebbdc9e386dfc4f8c0bf54333cd1
This makes this function spN ready, by getting the entire list of
siblings and returning the first of them.
Change-Id: Ifc69b1764bc6d8c1007b8b567f4158a66eca81d8
This method returns a sorted list of hostnames for the pair of the
specified hostname, except itself. This is useful for spN support.
Change-Id: I4e7d46de4f480f4c56701b1663877812f74e3640
To make the code easier to follow and not having to add exceptions or
needing to amend the config for each different ngcp-type-related test,
we split it into three different config types and objects that we can
use when needed, and in an isolated way, so that they are future-proof
against additions to other types.
Change-Id: Ic6ba9ae8a5afc44a53e14a5a3ef9725fb9ccd773
These are only needed on the first dereference, subsequent ones within
the same data structure are implicit.
Change-Id: I9f8b8a9b21540affd1ba342bc1b75eb16788fd5e
Move perl code which actually modifies yml file to separate helper as
there is no sense to recreate it every call of 'ngcpcfg del'.
Change-Id: Iab9e023318cf9798bdb10d89b08dc2afe125c495