Skip to content

Commit 246f86b

Browse files
committed
WIP: initial prof-accept testcase and environment components to allow us to profile simple config of the server
1 parent 208fee2 commit 246f86b

9 files changed

Lines changed: 230 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
User-Name = "testuser"
2+
User-Password = "testpass"
3+
Calling-Station-ID = "F1-F2-F3-F4-F5-F6"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
testuser Password.Cleartext := "testpass"
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name = profiling-server
2+
3+
raddbdir = /etc/freeradius
4+
confdir = ${raddbdir}
5+
modconfdir = ${confdir}/mods-config
6+
logdir = /var/log/freeradius
7+
radacctdir = ${logdir}/radacct
8+
9+
security {
10+
allow_core_dumps = yes
11+
}
12+
13+
modules {
14+
15+
# Common always module configuration, required for the control policy
16+
{% include "freeradius/common/mods-available/always" %}
17+
18+
}
19+
20+
policy {
21+
# Common control policy configuration, needed for accept action
22+
{% include "freeradius/common/policy.d/control" %}
23+
}
24+
25+
server profiling-server {
26+
27+
namespace = radius
28+
29+
listen load {
30+
handler = load
31+
type = Access-Request
32+
transport = step
33+
34+
step {
35+
36+
# Default packet config to use by proto_load module
37+
filename = ${confdir}/load-generator-packets/packet.conf
38+
39+
# Saving proto_load statistics disabled by default, can be enabled for debugging purposes.
40+
#csv = ${confdir}/stats/load-generator-client-stats.csv
41+
42+
max_attributes = 64
43+
44+
#
45+
# The load profile is configured via environment variables set
46+
# in the testcase configuration files.
47+
#
48+
start_pps = $ENV{TEST_LOADGEN_START_PPS}
49+
max_pps = $ENV{TEST_LOADGEN_MAX_PPS}
50+
duration = $ENV{TEST_LOADGEN_DURATION}
51+
step = $ENV{TEST_LOADGEN_STEP}
52+
max_backlog = $ENV{TEST_LOADGEN_MAX_BACKLOG}
53+
parallel = $ENV{TEST_LOADGEN_PARALLEL}
54+
num_messages = $ENV{TEST_LOADGEN_NUM_MESSAGES}
55+
repeat = no
56+
}
57+
}
58+
59+
listen authentication {
60+
type = Access-Request
61+
transport = udp
62+
require_message_authenticator = auto
63+
limit_proxy_state = auto
64+
65+
limit {
66+
max_clients = 256
67+
max_connections = 256
68+
idle_timeout = 60.0
69+
dynamic_timeout = 600.0
70+
nak_lifetime = 30.0
71+
cleanup_delay = 5.0
72+
}
73+
74+
udp {
75+
ipaddr = *
76+
port = 1812
77+
networks {
78+
allow = 127/8
79+
allow = 192.0.2/24
80+
}
81+
}
82+
83+
tcp {
84+
ipaddr = *
85+
port = 1812
86+
networks {
87+
allow = 127/8
88+
allow = 192.0.2/24
89+
}
90+
}
91+
}
92+
93+
listen authentication {
94+
type = Access-Request
95+
transport = tcp
96+
97+
tcp {
98+
ipaddr = *
99+
port = 1812
100+
networks {
101+
allow = 127/8
102+
allow = 192.0.2/24
103+
}
104+
}
105+
}
106+
107+
client localhost {
108+
shortname = client-localhost
109+
ipaddr = *
110+
secret = testing123
111+
}
112+
113+
recv Access-Request {
114+
accept
115+
}
116+
117+
send Access-Accept {
118+
119+
}
120+
121+
send Access-Reject {
122+
123+
}
124+
125+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"time","last_packet","rtt","rttvar","pps","pps_accepted","sent","received","backlog","max_backlog","<usec","us","10us","100us","ms","10ms","100ms","s","blocked"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
#
3+
# radius module template for load-generator
4+
#
5+
radius-module-dst-server-tmpl {
6+
mode = client
7+
transport = udp
8+
type = Access-Request
9+
require_message_authenticator = auto
10+
file {
11+
filename = ${logdir}/packets.bin
12+
}
13+
udp {
14+
port = 1812
15+
secret = testing123
16+
}
17+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Topology
2+
compose_num_of_home_servers: 5
3+
compose_num_of_proxy_servers: 0
4+
listener_type: file
5+
6+
# Routing
7+
load_gen_num_of_dst_servers: 5
8+
load_gen_dst_server_name: homeserver
9+
10+
# Load generator profile
11+
loadgen:
12+
start_pps: 5
13+
max_pps: 50
14+
duration: 300
15+
step: 5
16+
parallel: 1
17+
max_backlog: 1000
18+
repeat: "no"
19+
20+
# Test framework
21+
test_timeout: 350
22+
test_verify_timeout: 340
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../environments/profiling.yml.j2
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Topology
2+
compose_num_of_home_servers: 5
3+
compose_num_of_proxy_servers: 0
4+
listener_type: file
5+
6+
# Routing
7+
load_gen_num_of_dst_servers: 5
8+
load_gen_dst_server_name: homeserver
9+
10+
# Load generator profile
11+
loadgen:
12+
start_pps: 5
13+
max_pps: 10
14+
duration: 5
15+
step: 5
16+
parallel: 1
17+
max_backlog: 1000
18+
repeat: "no"
19+
20+
# Test framework
21+
test_timeout: 50
22+
test_verify_timeout: 40
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
timeout: {{ test_timeout }}
2+
state_order: sequence
3+
states:
4+
state_1:
5+
description: >
6+
Baseline profiling test
7+
host:
8+
profiling-server:
9+
actions:
10+
- execute_command:
11+
command: |
12+
##
13+
## proto_load configuration via environment variables
14+
##
15+
#{%- for key, value in loadgen.items() %}
16+
#export TEST_LOADGEN_{{ key | upper }}="{{ value }}"
17+
#{%- endfor %}
18+
#TEST_LOADGEN_NUM_MESSAGES=0
19+
#for ((pps=$TEST_LOADGEN_START_PPS; pps<=$TEST_LOADGEN_MAX_PPS; pps+=$TEST_LOADGEN_STEP)); do
20+
# TEST_LOADGEN_NUM_MESSAGES=$((TEST_LOADGEN_NUM_MESSAGES + TEST_LOADGEN_DURATION * pps))
21+
#done
22+
#export TEST_LOADGEN_NUM_MESSAGES
23+
##
24+
## Starting load-generator server which will generate traffic based on env configuration
25+
## from above.
26+
##
27+
#printf "Starting load-generator with the following configuration:\n"
28+
#{%- for key, value in loadgen.items() %}
29+
#printf " {{ key | upper }}:%s\n" "$TEST_LOADGEN_{{ key | upper }}"
30+
#{%- endfor %}
31+
#printf " NUM_MESSAGES: %s\n" "$TEST_LOADGEN_NUM_MESSAGES"
32+
#
33+
#exec freeradius -f -l stdout
34+
35+
detach: true
36+
verify:
37+
timeout: {{ test_verify_timeout }}
38+
trigger_mode: unordered

0 commit comments

Comments
 (0)