mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
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>
This commit is contained in:
parent
85a7b4bf70
commit
22c016b121
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user