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
basically, the fix means to reload contract balance
rows just when they were created, in order to have
the mysql 'local' timezone applied through the
statements' UNIX_TIMSTAMP function.
+get rid of perl's DateTime
+test cases added
Change-Id: Ib6611242c941809bed03d33523b2ac5eeef580b4
while porting to rateomat changes to libswrate,
Richard noticed a missing from_unixtime
conversion for the underrun detection timestamp
columns.
this results in invalid timestamps, if balance
is discarded during catchup and is hereby fixed.
no functional impact anyway, since these columns
are displayed in panle only.
Change-Id: I13bef59f6961125c5eee84b58f17c6cb00743616
provisioning db connectivity was added to ratomat
recently. to bring flexibility with the order of
how packages are upgraded, this fix allows ratomat
to run without provisioning db connectifity, i.e.
if ngcp-update-cfg-schema was not performed before.
note that it will have legacy behaviour in that case,
i.e. it will not lock subscribers upon balance
underrun.
+warning messages added
Change-Id: I50b1b8147a87e10806e594a994250bb173f5a584
sub catchup_contract_balances is a drop-in replacement
for the prior sub create_contract_balance. it was
directly transcribed from the tested panel/restapi
code, but not tested yet. therefore CDRs have to be
generated somehow.
this modifications have to be directly ported into
libswrate!
Change-Id: I04b4be8de95b4a70b9117423dced9c415325bd91