The default is 90s, so when it fails for some reason, it takes (unnecessarily)
too long to recover.
This happens when calling twice "ngcp-service ngcp-sems restart", or "systemctl
restart ngcp-sems", while having debugging enabled. The processes apparently
get blocked, until they get killed after 90s of default timeout.
Perhaps it is still necessary (and better) to fix it in other ways, like finding
the root cause of the blockage (racing conditions during initialisation?).
Waiting for ~1s between restarts almost completely solves the problem, which
points to some problem of that sort.
However, given the current problem and the fact that 10s should be enough to for
this service to stop, it's probably a good idea to change from the default to
10s, so if finding similar problems for other reasons, they have less impact and
the timeouts are more acceptable.
Change-Id: I5487493bee5c9147972d9fa6e063176a8d9ca4fd
With the previous change (b106d5bb0e), the file
was not processed correctly by dh_installinit because of an extra -s in the
filename.
Change-Id: Ie78bcfbb9565e520c395fc26e1551ecfe961dd46
According to Guillem (thanks to him) in a comment to another package:
"Actually dh_installinit already handles these files in stretch you just need
to name it debian/pkgname.tmpfile."
Change-Id: I43f23be57fb4c19adaeebb9f4e522d24816ca018
It breaks some tests, that could be changed, but maybe there are some other
unintended consequences, and it's not important to change to /run right now (in
fact, it might be undesired for consistency reasons with respect to the other
sems-service variant, etc.)
User: sems: home: doesn't match, expect: [{"or":["/var/run/ngcp-sems","/var/run/sems"]}] found: ["/run/ngcp-sems"]
Change-Id: I2038e0d90b46dc12eeecf4bcc7ad4e249688ad20
One reason to have full systemd support is to increase consistency when bringing
up and shutting down the system, or when restarting services, to have more
integration with the init system as a whole.
But apart from that reason, the original reason is that it has been noticed as
part of TT#31163 (service action tests) that the autogenerated unit file in
/run/systemd/generator.late/ngcp-sems.service does not properly depend on
MariaDB/MySQL (it had "After=mysql.service", but not Wants or Requires).
Unlike with sysvinit, with systemd the services are started in parallel, so
starting "after" another doesn't mean that the former is finished and fully
working by the time that the latter is ready.
Under these tests, this service sometimes fails to start, so it might be because
the DB is not ready (or at least it can be one of the reasons contributing to
the failure). In any case, if it should start after "mysql" in sysvinit (or
"mariadb.service", as we're renaming it under systemd), SEMS probably assumes
that "mariadb.service" would be fully working, so the additional annotation
"Requires" is more correct than having only "After=mariadb.service".
As part of this change and since we are revamping the init support, we also
remove sysvinit support (including /etc/default/ngcp-sems) and delete or modify
some maintainer scripts referencing old sysvinit support.
Change-Id: I46b0b7b92fc6b13b467aafbb38e9383e88d0ad65
Unset Sems internal Session Timers in case B leg doesn't support it
(no Timer in Supported header of 200OK message).
Change-Id: I21fd1de2a088ab71042cbee54bd00cd1ea9f5a0b
These override any of our global settings set in sysctl.d for example.
Which can be very confusing. Only set process specific settings to not
disturb the whole system.
Change-Id: I131d273804b530b1a5326fec82f44517676d4b40
This helper does not work properly when we specify a private directory
on the command-line, so we need to run it twice.
Change-Id: I67498cbd6d1db20c95ce7c1dbba989eea2d2c9c2
This has become an opaque struct in latest versions, use instead the
accessor that is available already in Debian jessie.
Change-Id: I2a5e17f91707871343b0b358fd195db507d7e43b
port from 1.4-ha-sw:
upstream commit 1f02da5 implements
https://services.frafos.net/frafosbt/view.php?id=758
commit 1f02da5c8cc9dc711ded015059ae85a5126dd269
Author: Stefan Sayer <stefan.sayer@googlemail.com>
Date: Fri Jan 13 23:30:01 2017 +0100
db_reg_agent: add username_with_domain option to use auth user with domain part
implements M758
Change-Id: I8de585443f4efa941a30cff185c426d90ad7a1c6
Noticed during an upgrade:
| Setting up ngcp-sems-app (1.6.0-1+0~mr4.5.3.1) ...
| -ne Sems start disabled by default file
| Setting up ngcp-prompts-pro (0.8.3.1+0~mr4.5.3.1) ...
This is caused by POSIX echo not supporting the "-e"
option, compare dash:
| $ echo -ne "Sems start disabled by default file"
| -ne Sems start disabled by default file
with e.g. bash:
| $ echo -ne "Sems start disabled by default file"
| Sems start disabled by default file$
Let's avoid the "-n" option as well though to
have a proper and full newline in package
upgrades.
Change-Id: I620da808843c0c29d8d59994c5652a3fdc3ceef0
* Make all the C++ code build again. Due to the build system not
failing on compilation/link errors, parts of the code base has
suffered bit rot.
* Build the library as shared. Otherwise we are trying to link a
static library built as PIE into a shared library.
* Fix module exclusion logic. Several of the modules cannot be
compiled because they miss Makefiles, others require additional
dependencies or similar. So encode this in the build system so
that people building do not have to figure this out, even if
they pass an explicit list of modules to include or exclude.
* Revamp the build system.
- Make errors fatal, so that they do not get ignored anymore.
- Use sane make variables that a shell will accept as valid,
otherwise the exports do not work at all.
- Do not use system paths when we should use in-tree ones.
Change-Id: I795783e0f1bd655cdbb2de0329c389e2bb2e2f07
This reverts commit 693429e353.
libmysql++-dev is needed for building, it was just hidden by the
broken sems build system and therefore commit 693429e353 looked
like it was ok but it clearly wasn't (the mysql++/*.h files provided
by libmysql++-dev are required).
FTR: libmysql++-dev is on its way back to Debian testing (AKA stretch)
currently.
Change-Id: I1d7ab3ea0c3013f6fedb3f19a9d8b945d20fb2e0
This addresses the build issue against Debian/stretch:
| resolver.cpp: In member function 'bool dns_entry_map::insert(const string&, dns_entry*)':
| resolver.cpp:826:57: error: no matching function for call to 'make_pair(const string&, dns_entry*&)'
Change-Id: Ie3dc6103d46af82a588035669932fb8615ad96b6
Don't bail out on missing config options, rather than using some
invalid defaults.
Also only check for existence of sound files in the places where
they are needed for optimization purposes.
Use macros to clean up redundant code.
Change-Id: I9cd0e9b44e850bca509043d21ad2c3f8f60b8473
Let's avoid Pre-Depends everywhere, in case of problems we can
re-add them iff needed, but as a starting point get rid of then.
Quoting Guillem:
Pre-Depends impose some harsh constraints on the package manager,
and consequently make upgrades harder. That's one of the reasons
in Debian any packager considering to add them needs to send a
mail to the debian-devel mailing list to see if there's any
problem with it.
postinst should never require Pre-Depends, preinst *might*
require them.
Change-Id: I174936d4b9784f0985641e6cb37db968d24180ae