Skip to content

Commit 841385d

Browse files
authored
Merge pull request #122 from Azure/201811
201811
2 parents c6655b8 + e98be74 commit 841385d

File tree

103 files changed

+3392
-268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+3392
-268
lines changed

build_debian.sh

+14-29
Original file line numberDiff line numberDiff line change
@@ -307,31 +307,8 @@ sudo sed -i 's/^ListenAddress ::/#ListenAddress ::/' $FILESYSTEM_ROOT/etc/ssh/ss
307307
sudo sed -i 's/^#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/' $FILESYSTEM_ROOT/etc/ssh/sshd_config
308308

309309
## Config monit
310-
sudo sed -i '
311-
s/^# set logfile syslog/set logfile syslog/;
312-
s/^\s*set logfile \/var/# set logfile \/var/;
313-
s/^# set httpd port/set httpd port/;
314-
s/^# use address localhost/ use address localhost/;
315-
s/^# allow localhost/ allow localhost/;
316-
s/^# allow admin:monit/ allow admin:monit/;
317-
s/^# allow @monit/ allow @monit/;
318-
s/^# allow @users readonly/ allow @users readonly/
319-
' $FILESYSTEM_ROOT/etc/monit/monitrc
320-
321-
sudo tee -a $FILESYSTEM_ROOT/etc/monit/monitrc > /dev/null <<'EOF'
322-
check filesystem root-overlay with path /
323-
if space usage > 90% for 5 times within 10 cycles then alert
324-
check filesystem var-log with path /var/log
325-
if space usage > 90% for 5 times within 10 cycles then alert
326-
check system $HOST
327-
if memory usage > 50% for 5 times within 10 cycles then alert
328-
if cpu usage (user) > 90% for 5 times within 10 cycles then alert
329-
if cpu usage (system) > 90% for 5 times within 10 cycles then alert
330-
check process rsyslog with pidfile /var/run/rsyslogd.pid
331-
start program = "/bin/systemctl start rsyslog.service"
332-
stop program = "/bin/systemctl stop rsyslog.service"
333-
if totalmem > 800 MB for 5 times within 10 cycles then restart
334-
EOF
310+
sudo cp files/image_config/monit/monitrc $FILESYSTEM_ROOT/etc/monit/
311+
sudo chmod 600 $FILESYSTEM_ROOT/etc/monit/monitrc
335312

336313
## Config sysctl
337314
sudo mkdir -p $FILESYSTEM_ROOT/var/core
@@ -422,6 +399,17 @@ build_number: ${BUILD_NUMBER:-0}
422399
built_by: $USER@$BUILD_HOSTNAME
423400
EOF
424401

402+
## Copy over clean-up script
403+
sudo cp ./files/scripts/core_cleanup.py $FILESYSTEM_ROOT/usr/bin/core_cleanup.py
404+
405+
## Copy ASIC config checksum
406+
python files/build_scripts/generate_asic_config_checksum.py
407+
if [[ ! -f './asic_config_checksum' ]]; then
408+
echo 'asic_config_checksum not found'
409+
exit 1
410+
fi
411+
sudo cp ./asic_config_checksum $FILESYSTEM_ROOT/etc/sonic/asic_config_checksum
412+
425413
if [ -f sonic_debian_extension.sh ]; then
426414
./sonic_debian_extension.sh $FILESYSTEM_ROOT $PLATFORM_DIR
427415
fi
@@ -452,10 +440,7 @@ then
452440
sudo LANG=C chroot $FILESYSTEM_ROOT /bin/bash -c "echo '/debug is mounted in each docker' >> /etc/motd"
453441

454442
sudo mkdir -p $FILESYSTEM_ROOT/src
455-
pushd src
456-
../dbg_files.sh | sudo tar -cvzf ../$FILESYSTEM_ROOT/src/sonic_src.tar.gz -T -
457-
popd
458-
443+
sudo cp $DEBUG_SRC_ARCHIVE_FILE $FILESYSTEM_ROOT/src/
459444
sudo mkdir -p $FILESYSTEM_ROOT/debug
460445

461446
fi

dbg_files.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
# Provide file paths to archive for debug image as relative to src subdir
44
#
5-
for i in $debug_src_archive
6-
do
7-
find $i/ -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" -type f
8-
done
5+
if [ "$DEBUG_IMG" == "y" ]
6+
then
7+
for i in $DEBUG_SRC_ARCHIVE_DIRS
8+
do
9+
find src/$i/ -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" -type f
10+
done | tar -czf $DEBUG_SRC_ARCHIVE_FILE -T -
11+
fi
912

device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/buffers_defaults_t0.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"egress_lossless_profile": {
3737
"pool":"[BUFFER_POOL|egress_lossless_pool]",
3838
"size":"1518",
39-
"static_th":"3995680"
39+
"static_th":"15982720"
4040
},
4141
"egress_lossy_profile": {
4242
"pool":"[BUFFER_POOL|egress_lossy_pool]",

device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/buffers_defaults_t1.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"egress_lossless_profile": {
3737
"pool":"[BUFFER_POOL|egress_lossless_pool]",
3838
"size":"1518",
39-
"static_th":"3995680"
39+
"static_th":"15982720"
4040
},
4141
"egress_lossy_profile": {
4242
"pool":"[BUFFER_POOL|egress_lossy_pool]",

device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/buffers_defaults_t0.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"egress_lossless_profile": {
5151
"pool":"[BUFFER_POOL|egress_lossless_pool]",
5252
"size":"1518",
53-
"static_th":"3995680"
53+
"static_th":"15982720"
5454
},
5555
"egress_lossy_profile": {
5656
"pool":"[BUFFER_POOL|egress_lossy_pool]",

device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q32/buffers_defaults_t0.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"egress_lossless_profile": {
3737
"pool":"[BUFFER_POOL|egress_lossless_pool]",
3838
"size":"1518",
39-
"static_th":"3995680"
39+
"static_th":"15982720"
4040
},
4141
"egress_lossy_profile": {
4242
"pool":"[BUFFER_POOL|egress_lossy_pool]",

device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q32/buffers_defaults_t1.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"egress_lossless_profile": {
3737
"pool":"[BUFFER_POOL|egress_lossless_pool]",
3838
"size":"1518",
39-
"static_th":"3995680"
39+
"static_th":"15982720"
4040
},
4141
"egress_lossy_profile": {
4242
"pool":"[BUFFER_POOL|egress_lossy_pool]",

device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/th2-a7260cx3-64-64x100G.config.bcm

-1
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,6 @@ portmap_9=17:100
939939
robust_hash_disable_egress_vlan=1
940940
robust_hash_disable_mpls=1
941941
robust_hash_disable_vlan=1
942-
sram_scan_enable=0
943942
stable_size=0x5500000
944943
stable_size=0x5500000
945944
tdma_timeout_usec=15000000

device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/buffers_defaults_t0.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@
3838
"ingress_lossy_profile": {
3939
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
4040
"size":"0",
41-
"static_th":"11075584"
41+
"static_th":"44302336"
4242
},
4343
"egress_lossless_profile": {
4444
"pool":"[BUFFER_POOL|egress_lossless_pool]",
4545
"size":"0",
46-
"static_th":"10587408"
46+
"static_th":"42349632"
4747
},
4848
"egress_lossy_profile": {
4949
"pool":"[BUFFER_POOL|egress_lossy_pool]",
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# PG lossless profiles.
2-
# speed cable size xon xoff threshold xon_offset
3-
50000 5m 1248 1248 56160 -3 2496
4-
100000 5m 1248 1248 96928 -3 2496
5-
50000 40m 1248 1248 56160 -3 2496
6-
100000 40m 1248 1248 96928 -3 2496
7-
50000 300m 1248 1248 56160 -3 2496
8-
100000 300m 1248 1248 96928 -3 2496
2+
# speed cable size xon xoff threshold xon_offset
3+
50000 5m 1248 1248 56160 -3 2496
4+
100000 5m 1248 1248 96928 -3 2496
5+
50000 40m 1248 1248 96096 -3 2496
6+
100000 40m 1248 1248 177632 -3 2496
7+
50000 300m 1248 1248 141856 -3 2496
8+
100000 300m 1248 1248 268736 -3 2496

device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/th2-a7260cx3-64-112x50G+8x100G.config.bcm

-1
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,6 @@ port_init_cl72_hg=1
681681
robust_hash_disable_egress_vlan=1
682682
robust_hash_disable_mpls=1
683683
robust_hash_disable_vlan=1
684-
sram_scan_enable=0
685684
stable_size=0x5500000
686685
stable_size=0x5500000
687686
tdma_timeout_usec=15000000

device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_defaults_t0.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
"ingress_lossy_profile": {
3131
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
3232
"size":"0",
33-
"static_th":"11075584"
33+
"static_th":"44302336"
3434
},
3535
"egress_lossless_profile": {
3636
"pool":"[BUFFER_POOL|egress_lossless_pool]",
3737
"size":"0",
38-
"static_th":"10587408"
38+
"static_th":"42349632"
3939
},
4040
"egress_lossy_profile": {
4141
"pool":"[BUFFER_POOL|egress_lossy_pool]",
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# PG lossless profiles.
2-
# speed cable size xon xoff threshold xon_offset
3-
40000 5m 1248 1248 56160 -3 2496
4-
50000 5m 1248 1248 56160 -3 2496
5-
100000 5m 1248 1248 96928 -3 2496
6-
40000 40m 1248 1248 56160 -3 2496
7-
50000 40m 1248 1248 56160 -3 2496
8-
100000 40m 1248 1248 96928 -3 2496
9-
40000 300m 1248 1248 56160 -3 2496
10-
50000 300m 1248 1248 56160 -3 2496
11-
100000 300m 1248 1248 96928 -3 2496
2+
# speed cable size xon xoff threshold xon_offset
3+
40000 5m 1248 1248 56160 -3 2496
4+
50000 5m 1248 1248 56160 -3 2496
5+
100000 5m 1248 1248 96928 -3 2496
6+
40000 40m 1248 1248 71552 -3 2496
7+
50000 40m 1248 1248 96096 -3 2496
8+
100000 40m 1248 1248 177632 -3 2496
9+
40000 300m 1248 1248 108160 -3 2496
10+
50000 300m 1248 1248 141856 -3 2496
11+
100000 300m 1248 1248 268736 -3 2496

device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/th2-a7260cx3-64-64x40G.config.bcm

-1
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,6 @@ portmap_9=17:40
939939
robust_hash_disable_egress_vlan=1
940940
robust_hash_disable_mpls=1
941941
robust_hash_disable_vlan=1
942-
sram_scan_enable=0
943942
stable_size=0x5500000
944943
stable_size=0x5500000
945944
tdma_timeout_usec=15000000
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{%- set default_topo = 't1' %}
2+
{%- include 'buffers_config.j2' %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
{%- set default_cable = '5m' %}
3+
4+
{%- set ports2cable = {
5+
'torrouter_server' : '300m',
6+
'leafrouter_torrouter' : '300m',
7+
'spinerouter_leafrouter' : '300m'
8+
}
9+
-%}
10+
11+
{%- macro generate_port_lists(PORT_ALL) %}
12+
{# Generate list of ports #}
13+
{%- for port_idx in range(0,32) %}
14+
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
15+
{%- endfor %}
16+
{%- endmacro %}
17+
18+
{%- macro generate_buffer_pool_and_profiles() %}
19+
"BUFFER_POOL": {
20+
"ingress_lossless_pool": {
21+
"size": "10875072",
22+
"type": "ingress",
23+
"mode": "dynamic",
24+
"xoff": "4194112"
25+
},
26+
"egress_lossy_pool": {
27+
"size": "9243812",
28+
"type": "egress",
29+
"mode": "dynamic"
30+
},
31+
"egress_lossless_pool": {
32+
"size": "15982720",
33+
"type": "egress",
34+
"mode": "static"
35+
}
36+
},
37+
"BUFFER_PROFILE": {
38+
"ingress_lossy_profile": {
39+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
40+
"size":"0",
41+
"dynamic_th":"3"
42+
},
43+
"egress_lossless_profile": {
44+
"pool":"[BUFFER_POOL|egress_lossless_pool]",
45+
"size":"1518",
46+
"static_th":"15982720"
47+
},
48+
"egress_lossy_profile": {
49+
"pool":"[BUFFER_POOL|egress_lossy_pool]",
50+
"size":"1518",
51+
"dynamic_th":"3"
52+
}
53+
},
54+
{%- endmacro %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
{%- set default_cable = '40m' %}
3+
4+
{%- set ports2cable = {
5+
'torrouter_server' : '300m',
6+
'leafrouter_torrouter' : '300m',
7+
'spinerouter_leafrouter' : '300m'
8+
}
9+
-%}
10+
11+
{%- macro generate_port_lists(PORT_ALL) %}
12+
{# Generate list of ports #}
13+
{%- for port_idx in range(0,32) %}
14+
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
15+
{%- endfor %}
16+
{%- endmacro %}
17+
18+
{%- macro generate_buffer_pool_and_profiles() %}
19+
"BUFFER_POOL": {
20+
"ingress_lossless_pool": {
21+
"size": "10875072",
22+
"type": "ingress",
23+
"mode": "dynamic",
24+
"xoff": "4194112"
25+
},
26+
"egress_lossy_pool": {
27+
"size": "9243812",
28+
"type": "egress",
29+
"mode": "dynamic"
30+
},
31+
"egress_lossless_pool": {
32+
"size": "15982720",
33+
"type": "egress",
34+
"mode": "static"
35+
}
36+
},
37+
"BUFFER_PROFILE": {
38+
"ingress_lossy_profile": {
39+
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
40+
"size":"0",
41+
"dynamic_th":"3"
42+
},
43+
"egress_lossless_profile": {
44+
"pool":"[BUFFER_POOL|egress_lossless_pool]",
45+
"size":"1518",
46+
"static_th":"15982720"
47+
},
48+
"egress_lossy_profile": {
49+
"pool":"[BUFFER_POOL|egress_lossy_pool]",
50+
"size":"1518",
51+
"dynamic_th":"3"
52+
}
53+
},
54+
{%- endmacro %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# PG lossless profiles.
2+
# speed cable size xon xoff threshold xon_offset
3+
10000 5m 1248 2288 35776 -3 2288
4+
25000 5m 1248 2288 53248 -3 2288
5+
40000 5m 1248 2288 66560 -3 2288
6+
50000 5m 1248 2288 90272 -3 2288
7+
100000 5m 1248 2288 165568 -3 2288
8+
10000 40m 1248 2288 37024 -3 2288
9+
25000 40m 1248 2288 53248 -3 2288
10+
40000 40m 1248 2288 71552 -3 2288
11+
50000 40m 1248 2288 96096 -3 2288
12+
100000 40m 1248 2288 177632 -3 2288
13+
10000 300m 1248 2288 46176 -3 2288
14+
25000 300m 1248 2288 79040 -3 2288
15+
40000 300m 1248 2288 108160 -3 2288
16+
50000 300m 1248 2288 141856 -3 2288
17+
100000 300m 1248 2288 268736 -3 2288
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# name lanes alias speed index
2+
Ethernet0 65,66,67,68 etp1 100000 1
3+
Ethernet4 69,70,71,72 etp2 100000 2
4+
Ethernet8 73,74,75,76 etp3 100000 3
5+
Ethernet12 77,78,79,80 etp4 100000 4
6+
Ethernet16 33,34,35,36 etp5 100000 5
7+
Ethernet20 37,38,39,40 etp6 100000 6
8+
Ethernet24 41,42,43,44 etp7 100000 7
9+
Ethernet28 45,46,47,48 etp8 100000 8
10+
Ethernet32 49,50,51,52 etp9 100000 9
11+
Ethernet36 53,54,55,56 etp10 100000 10
12+
Ethernet40 57,58,59,60 etp11 100000 11
13+
Ethernet44 61,62,63,64 etp12 100000 12
14+
Ethernet48 81,82,83,84 etp13 100000 13
15+
Ethernet52 85,86,87,88 etp14 100000 14
16+
Ethernet56 89,90,91,92 etp15 100000 15
17+
Ethernet60 93,94,95,96 etp16 100000 16
18+
Ethernet64 97,98,99,100 etp17 100000 17
19+
Ethernet68 101,102,103,104 etp18 100000 18
20+
Ethernet72 105,106,107,108 etp19 100000 19
21+
Ethernet76 109,110,111,112 etp20 100000 20
22+
Ethernet80 1,2,3,4 etp21 100000 21
23+
Ethernet84 5,6,7,8 etp22 100000 22
24+
Ethernet88 9,10,11,12 etp23 100000 23
25+
Ethernet92 13,14,15,16 etp24 100000 24
26+
Ethernet96 17,18,19,20 etp25 100000 25
27+
Ethernet100 21,22,23,24 etp26 100000 26
28+
Ethernet104 25,26,27,28 etp27 100000 27
29+
Ethernet108 29,30,31,32 etp28 100000 28
30+
Ethernet112 113,114,115,116 etp29 100000 29
31+
Ethernet116 117,118,119,120 etp30 100000 30
32+
Ethernet120 121,122,123,124 etp31 100000 31
33+
Ethernet124 125,126,127,128 etp32 100000 32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{%- include 'qos_config.j2' %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{# Get sai.profile based on switch_role #}
2+
{%- if DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined -%}
3+
{%- set switch_role = DEVICE_METADATA['localhost']['type'] -%}
4+
{%- if switch_role.lower() == 'torrouter' %}
5+
{% set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th-seastone-dx010-32x100G-t0.config.bcm' -%}
6+
{%- else %}
7+
{% set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th-seastone-dx010-32x100G-t1.config.bcm' -%}
8+
{%- endif %}
9+
{%- else %}
10+
{% set sai_profile_contents = 'SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/th-seastone-dx010-32x100G-t1.config.bcm' -%}
11+
{%- endif %}
12+
{# Write the contents of sai_ profile_filename to sai.profile file #}
13+
{{ sai_profile_contents }}

0 commit comments

Comments
 (0)