@@ -20,6 +20,9 @@ rhel_subscription="${PARAM_rhel_subscription:-Red Hat Enterprise Linux Server, S
2020
2121ak=" ${PARAM_ak:- ActivationKey} "
2222
23+ expected_concurrent_registrations=${PARAM_expected_concurrent_registrations:- 64}
24+ initial_batch=${PARAM_initial_batch:- 1}
25+
2326repo_download_test=" ${PARAM_repo_download_test:- http:// repos.example.com/ pub/ satperf/ test_sync_repositories/ repo* } "
2427repo_count_download_test=" ${PARAM_repo_count_download_test:- 8} "
2528package_name_download_test=" ${PARAM_package_name_download_test:- foo* } "
@@ -105,60 +108,48 @@ skip_measurement='true' ap downtest-44-recreate-client-scripts.log \
105108 playbooks/satellite/client-scripts.yaml
106109
107110
108- section " Register more and more"
109- ansible_container_hosts=" $( ansible -i $inventory --list-hosts container_hosts 2> /dev/null | grep ' ^ hosts' | sed ' s/^ hosts (\([0-9]\+\)):$/\1/' ) "
110- sum=0
111- for b in $download_test_batches ; do
112- (( sum += b * ansible_container_hosts ))
113- done
114- log " Going to register $sum hosts in total. Make sure there is enough hosts available."
115-
111+ section " Register"
116112# Install PiP
117113a downtest-49-install-python3-pip.log \
118114 -m ' ansible.builtin.dnf' \
119115 -a ' name=python3-pip state=latest' \
120116 satellite6
121117
122- iter=1
123- sum=0
124- totalclients=0
125- for batch in $download_test_batches ; do
126- ap downtest-50-register-$iter -$batch .log \
127- -e " size=$batch " \
128- -e " registration_logs='../../$logs /downtest-50-register-container-host-client-logs'" \
118+
119+ number_container_hosts=$( ansible -i $inventory --list-hosts container_hosts 2> /dev/null | grep ' ^ hosts' | sed ' s/^ hosts (\([0-9]\+\)):$/\1/' )
120+ number_containers_per_container_host=$( ansible -i $inventory -m debug -a " var=containers_count" container_hosts[0] | awk ' / "containers_count":/ {print $NF}' )
121+ total_number_containers=$(( number_container_hosts * number_containers_per_container_host ))
122+ concurrent_registrations_per_container_host=$(( expected_concurrent_registrations / number_container_hosts ))
123+ real_concurrent_registrations=$(( concurrent_registrations_per_container_host * number_container_hosts ))
124+ registration_iterations=$(( ( total_number_containers + real_concurrent_registrations - 1 ) / real_concurrent_registrations )) # We want ceiling rounding: Ceiling( X / Y ) = ( X + Y – 1 ) / Y
125+
126+ log " Going to register $total_number_containers hosts: $concurrent_registrations_per_container_host hosts per container host ($number_container_hosts available) in $(( registration_iterations + 1 )) batches."
127+
128+ for (( batch= initial_batch, total_clients= real_concurrent_registrations; batch <= ( registration_iterations + 1 ); batch++, total_clients += real_concurrent_registrations )) ; do
129+ ap downtest-50-register-${batch} -${total_clients} .log \
130+ -e " size='${concurrent_registrations_per_container_host} '" \
131+ -e " registration_logs='../../$logs /44b-register-container-host-client-logs'" \
129132 -e ' re_register_failed_hosts=true' \
130133 playbooks/tests/registrations.yaml
131- e Register $logs /downtest-50-register-$iter -$batch .log
132-
133- (( sum += batch ))
134- (( totalclients = sum * ansible_container_hosts ))
134+ e Register $logs /downtest-50-register-${batch} -${total_clients} .log
135135
136136 if vercmp_ge " $satellite_version " " 6.12.0" ; then
137137 job_template_ssh_default=' Run Command - Script Default'
138138 else
139139 job_template_ssh_default=' Run Command - SSH Default'
140140 fi
141141
142- ap downtest-50-$iter - $sum - $totalclients -Download.log \
142+ ap downtest-50-${batch} - ${total_clients} -Download.log \
143143 -e " job_template_ssh_default='$job_template_ssh_default '" \
144144 -e " package_name_download_test=$package_name_download_test " \
145145 -e " max_age_task=$max_age_input " \
146146 playbooks/tests/downloadtest.yaml
147- log " $( grep ' RESULT:' $logs /downtest-50-$iter -$sum -$totalclients -Download.log) "
148- (( iter++ ))
147+ log " $( grep ' RESULT:' $logs /downtest-50-${batch} -${total_clients} -Download.log) "
149148done
150149
151150
152151section " Summary"
153- iter=1
154- sum=0
155- totalclients=0
156- for batch in $download_test_batches ; do
157- (( sum += batch ))
158- (( totalclients = sum * ansible_container_hosts ))
159- log " $( grep ' RESULT:' $logs /downtest-50-$iter -$sum -$totalclients -Download.log) "
160- (( iter++ ))
161- done
152+ log " $( grep ' RESULT:' $logs /downtest-50-* -* -Download.log) "
162153
163154
164155junit_upload
0 commit comments