For a long time our installation and upgrade uses a temporary "policy-rc.d" to
prevent to [re]start services in the middle of the installation, so some uses of
"invoke-rc.d" (which defers to "policy-rc.d") can cause changes in behaviour.
Upon review because of this change, we found out that the restart of kamailio
when updating ngcp-db-schema didn't happen for a long time because of the use of
"policy-rc.d" that we were using during installations of upgrades in the last
few months/years, but besides this, the code is obsolete since quite a while
ago.
So we drop it completely now.
Change-Id: I76eae2fbda340a1021f10d28f95e76b35ea92c90
We suppress some warning here to mark the repo as clean
while further cleanup can be done to remove some labels
'shellcheck disable'.
The first step here is to prevent new errors appearing.
Change-Id: I23ca9dd6fdf80bab6b9ec465dd4a53983e34a52a
I can't find any reason why we should Pre-Depend on ngcp-system-tools.
Since piupart fails to run because of the Pre-Dependency let's try
switching to Depends instead.
Change-Id: Ic3e64f765ed2dd860d03bdbb02f6e7103da627d9
This dramatically speeds up the ngcp-update-db-schema process if
everything has been applied already or if just a few single
scripts have to be executed.
Execution times for old mode vs new (batch) mode with all present
scripts executed already:
| root@spce:~# time { /usr/sbin/ngcp-update-db-schema.orig >/dev/null ; }
|
| real 0m53.281s
| user 0m45.439s
| sys 0m5.100s
vs.
| root@spce:~# time /usr/sbin/ngcp-update-db-schema
| [ ok ] Starting MySQL database server: mysqld already running.
| Synchronizing passwords with MySQL
|
| real 0m4.096s
| user 0m1.812s
| sys 0m0.472s
The main behaviour of ngcp-check-rev-applied hasn't been changed,
it's backwards compatible (so also cfg-schema which uses
ngcp-check-rev-applied continues to work as it is), now it's just
possible to provide multiple arguments to the "--revision" option
and its output is parsed by ngcp-update-db-schema then.