diff options
author | Tim Beale <timbeale@catalyst.net.nz> | 2019-02-05 12:23:43 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-02-13 04:15:15 +0100 |
commit | 22c016b12142e675c5b8ef0ea1f450385f555268 (patch) | |
tree | eef62d266a3862900f358c3d6717eb32a84e7d18 /selftest/target | |
parent | 85a7b4bf7040b0c95edc2f5a13252830c8c0d378 (diff) | |
download | samba-22c016b12142e675c5b8ef0ea1f450385f555268.tar.gz |
selftest: Change backup/restore testenvs to use 1 prefork child
Recently the gitlab CI jobs were hitting memory resource limits and
using swap, which then caused test failures. The process model used in
the testenvs seemed to be contributing to this problem.
We can reduce the memory overhead of the restore/backup testenvs by
using 1 prefork child process instead of the default of 4 (kudos to
Garming for the idea). The tests run against these testenvs are basic
sanity-checks, rather than heavy-duty stress tests, so the number of
prefork workers shouldn't matter.
This is a bit of a tradeoff between testing the defaults that will
actually be used in production vs using limited resources efficiently on
shared CI runner machines.
Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'selftest/target')
-rwxr-xr-x | selftest/target/Samba4.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index c0f557999eb..647e1f14467 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -3081,7 +3081,8 @@ sub setup_restoredc # we arbitrarily designate the restored DC as having SMBv1 disabled my $extra_conf = " server min protocol = SMB2 - client min protocol = SMB2"; + client min protocol = SMB2 + prefork children = 1"; my ($env, $ctx) = $self->prepare_dc_testenv($prefix, "restoredc", $dcvars->{DOMAIN}, @@ -3124,11 +3125,12 @@ sub setup_renamedc # note: dcvars contains the env info for the dependent testenv ('backupfromdc') my ($self, $prefix, $dcvars) = @_; print "Preparing RENAME DC...\n"; + my $extra_conf = "prefork children = 1"; my $realm = "renamedom.samba.example.com"; my ($env, $ctx) = $self->prepare_dc_testenv($prefix, "renamedc", "RENAMEDOMAIN", $realm, - $dcvars->{PASSWORD}, ""); + $dcvars->{PASSWORD}, $extra_conf); # create a backup of the 'backupfromdc' which renames the domain my $backupdir = File::Temp->newdir(); @@ -3171,11 +3173,12 @@ sub setup_offlinebackupdc # note: dcvars contains the env info for the dependent testenv ('backupfromdc') my ($self, $prefix, $dcvars) = @_; print "Preparing OFFLINE BACKUP DC...\n"; + my $extra_conf = "prefork children = 1"; my ($env, $ctx) = $self->prepare_dc_testenv($prefix, "offlinebackupdc", $dcvars->{DOMAIN}, $dcvars->{REALM}, - $dcvars->{PASSWORD}, ""); + $dcvars->{PASSWORD}, $extra_conf); # create an offline backup of the 'backupfromdc' target my $backupdir = File::Temp->newdir(); @@ -3215,11 +3218,12 @@ sub setup_labdc # note: dcvars contains the env info for the dependent testenv ('backupfromdc') my ($self, $prefix, $dcvars) = @_; print "Preparing LAB-DOMAIN DC...\n"; + my $extra_conf = "prefork children = 1"; my ($env, $ctx) = $self->prepare_dc_testenv($prefix, "labdc", "LABDOMAIN", "labdom.samba.example.com", - $dcvars->{PASSWORD}, ""); + $dcvars->{PASSWORD}, $extra_conf); # create a backup of the 'backupfromdc' which renames the domain and uses # the --no-secrets option to scrub any sensitive info |