We should pass the interpreter executable as --exec and the actual
script to run as --startas, as documented in the man page. Otherwise
start-stop-daemon will not be able to match the executable currently
running, and will consider that the daemon is *not* running. Use --name
to match on the process name.
Change-Id: Icb7a608aaf2dd3d54083f77ed6df67a7dbecdb8d
First reopen stdout and stderr to /dev/null, then fork and disassociate
from terminate, then reopen stdout and stderr to the logger. Otherwise
the logger process remains associated with the controlling terminal.
Change-Id: I589d36ea3f0d362dc0b797549f927bf72ef73e75
tests made in 'docker run' create files with 'root' owner and ws-cleanup
plugin can't delete them after. Fixing umask here to allow files
deletion.
Change-Id: I2de3c74070b0c1d48899bfafdcb8a3d531040b72
File /.dockerinit no longer exists. With Docker versions 1.11 and
1.12 there's /.dockerenv available, though it's not yet sure
whether this will be present in the future too, so check for either
/.dockerenv or a proper cgroup setup inside the docker container.
File /proc/1/cgroup with Docker version 1.12.1 on Debian/jessie
looks like:
| root@4c3a1c6d773c:/# cat /proc/1/cgroup
| 8:freezer:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 7:perf_event:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 6:net_cls,net_prio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 5:cpuset:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 4:blkio:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 3:cpu,cpuacct:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 2:devices:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
| 1:name=systemd:/docker/4c3a1c6d773c1a5675f24ff58540ff1a290489e7325e1e66ec2c3392aa3a1145
See https://github.com/docker/docker/issues/18355 and
https://github.com/docker/docker/pull/19490 for details.
Change-Id: I2d649f65c8bba50193171ec7fbfd20160ddfc319
* Docker file/image is common for all releases now, so we should not
have release specific components inside. In the same time we mount
whole repo folder to Docker conteiner, so we can start rate-o-mat
from the repo directly and be sure tests and rate-o-mat code are
in sync.
* Add support to start fast/stable/all/some specific tests only
Change-Id: I992190ecb1a7268801a05a0b63397a23c07b352b
Remove useless shlibs:Depends, as these are only relevant on arch:any
packages. Replace perl-modules dependency with perl:Depends substvar.
Change-Id: I840ab4ce153f57d4d6164984a9431faa4c5bebd3
txn were not rolled back for application errors (i.e. contract id not found),
so the uncommitted txn was picked up for the next iteration and then ratomat
dies with an error like this:
Change-Id: I73382aa9be0b12c4b5e168894b288c6d3e4a3444
rate-o-mat: DBD::mysql::db do failed: Transaction isolation level can't be changed while a transaction is in progress at /usr/sbin/rate-o-mat line 287.
+added contract_balance_id's
+fix: get_call_costs calculates total call costs
for cash_balance_interval only if no balance
is available. which is not mandatory for
post-paid *still under discussion*
REMOVED FOR THIS CHANGE
+option to shuffle cdr batch to reduce lock waits
when running multiple rateomats against same cdr
table
+fix: free cash carry over calculation was
wrong (typos only)
+fix: provider profile selection
is now caller-IP based, so roaming should be
properly supported here now as well
+reworked and cleanup provider "info" retrieval
(billing profile and package, balance records)
+balance underrun checks that are performed after
call costs were calculated will skip applying
subscriber lock and adding underrun profile mappings,
if preapid && out direction && a call cost record
from swrate exists. this should avoid polluting
the billing mappings table in the first.
+.t now use run_rateomat_threaded to work with
perl's "prove"
+update/create statements are modified to be make
it safe if multiple rateomat's are processing
the same accounting.cdr table at the same time:
UPDATE CDR .. WHERE id = ?
AND rating_status = 'unrated'"
+rateomat termination behaviour: do not exit
upon the first but a given number of failed cdrs
+reworked prepaid cost table preloading
+option to disable prepaid preference flag update
+prepared to take prepaid flag values from cdr,
not profile
+prepaid costs processing testcase
+onnet full-scale testcase
+offnet full-scale testcase
+test case order and comments
+rateomat parallel execution testcase
+fix missing source/destination_lnp_prefix columns
for duplication stmt
+writing profile package id, contract balance id, cash
balance before/after, free time balance before/after
fields to EAV tables
+extended onnet testcase to verify written EAV values
+extended offnet testcase to verify written EAV values
+freetime testcase
Change-Id: I3b08b2bb04adf2272d9400048ce45e3b709e7971
Otherwise we have the following error when we are trying to start rate-o-mat:
> Can't locate NetAddr/IP.pm in @INC (you may need to install the NetAddr::IP module)
> ... at /usr/sbin/rate-o-mat line 9.
Change-Id: I6703af515f1010b68c69a27b066b82f5b74d8cd3
btw. it was difficult to find a setup to really
make it split the cdrs, and not getting the
"inconsistent rating profile fragements" error.
so using RATEOMAT_SPLIT_PEAK_PARTS=1 has to be
used with care definitely.
Change-Id: If3e3376fd9cab7de31a3ace3e9e6fa1e1a0f9b12