Skip to content

Commit 315bea1

Browse files
byu343Staphylo
andauthored
Increase kdump crashkernel memory (#308)
On some products with 64G of memory, kdump doesn't work. Increasing the reserved memory is the only thing that make it work. Adding new policies for 16G-32G and 32G- The value used for 32G- was tested on a 64G system and it would fail with anything below 1G. Co-authored-by: Samuel Angebault <staphylo@arista.com>
1 parent 1633661 commit 315bea1

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

scripts/hostcfgd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ class KdumpCfg(object):
11631163
self.config_db = CfgDb
11641164
self.kdump_defaults = {
11651165
"enabled": "false",
1166-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M",
1166+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G",
11671167
"num_dumps": "3",
11681168
"remote": "false", # New feature: remote, default is "false"
11691169
"ssh_string": "user@localhost", # New feature: SSH key, default value

tests/hostcfgd/hostcfgd_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def test_kdump_event(self):
213213
expected = [
214214
call(['sonic-kdump-config', '--disable']),
215215
call(['sonic-kdump-config', '--num_dumps', '3']),
216-
call(['sonic-kdump-config', '--memory', '0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M']),
216+
call(['sonic-kdump-config', '--memory', '0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G']),
217217
call(['sonic-kdump-config', '--remote', 'false']), # Covering remote
218218
call(['sonic-kdump-config', '--ssh_string', 'user@localhost']), # Covering ssh_string
219219
call(['sonic-kdump-config', '--ssh_path', '/a/b/c']) # Covering ssh_path
@@ -234,7 +234,7 @@ def test_kdump_load(self):
234234
expected = [
235235
call(['sonic-kdump-config', '--enable']),
236236
call(['sonic-kdump-config', '--num_dumps', '3']),
237-
call(['sonic-kdump-config', '--memory', '0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M']),
237+
call(['sonic-kdump-config', '--memory', '0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G']),
238238
call(['sonic-kdump-config', '--remote', 'false']), # Covering remote
239239
call(['sonic-kdump-config', '--ssh_string', 'user@localhost']), # Covering ssh_string
240240
call(['sonic-kdump-config', '--ssh_path', '/a/b/c']) # Covering ssh_path

tests/hostcfgd/test_passwh_vectors.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"config": {
4141
"enabled": "false",
4242
"num_dumps": "3",
43-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
43+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
4444
}
4545
}
4646
},
@@ -79,7 +79,7 @@
7979
"config": {
8080
"enabled": "false",
8181
"num_dumps": "3",
82-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
82+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
8383
}
8484
}
8585
},
@@ -118,7 +118,7 @@
118118
"config": {
119119
"enabled": "false",
120120
"num_dumps": "3",
121-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
121+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
122122
}
123123
}
124124
},
@@ -157,7 +157,7 @@
157157
"config": {
158158
"enabled": "false",
159159
"num_dumps": "3",
160-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
160+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
161161
}
162162
},
163163
},
@@ -196,7 +196,7 @@
196196
"config": {
197197
"enabled": "false",
198198
"num_dumps": "3",
199-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
199+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
200200
}
201201
}
202202
},
@@ -235,7 +235,7 @@
235235
"config": {
236236
"enabled": "false",
237237
"num_dumps": "3",
238-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
238+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
239239
}
240240
}
241241
}

tests/hostcfgd/test_radius_vectors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"config": {
4040
"enabled": "false",
4141
"num_dumps": "3",
42-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
42+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
4343
}
4444
},
4545
"AAA": {
@@ -192,7 +192,7 @@
192192
"config": {
193193
"enabled": "false",
194194
"num_dumps": "3",
195-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
195+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
196196
}
197197
},
198198
"AAA": {

tests/hostcfgd/test_ssh_server_vectors.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"config": {
3636
"enabled": "false",
3737
"num_dumps": "3",
38-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
38+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
3939
}
4040
},
4141
"SERIAL_CONSOLE": {
@@ -75,7 +75,7 @@
7575
"config": {
7676
"enabled": "false",
7777
"num_dumps": "3",
78-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
78+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
7979
}
8080
},
8181
"SERIAL_CONSOLE": {
@@ -115,7 +115,7 @@
115115
"config": {
116116
"enabled": "false",
117117
"num_dumps": "3",
118-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
118+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
119119
}
120120
},
121121
"SERIAL_CONSOLE": {
@@ -155,7 +155,7 @@
155155
"config": {
156156
"enabled": "false",
157157
"num_dumps": "3",
158-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
158+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
159159
}
160160
},
161161
"SERIAL_CONSOLE": {
@@ -405,7 +405,7 @@
405405
"config": {
406406
"enabled": "false",
407407
"num_dumps": "3",
408-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
408+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
409409
}
410410
},
411411
"SERIAL_CONSOLE": {

tests/hostcfgd/test_tacacs_vectors.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"config": {
2929
"enabled": "false",
3030
"num_dumps": "3",
31-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
31+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
3232
}
3333
},
3434
"AAA": {
@@ -90,7 +90,7 @@
9090
"config": {
9191
"enabled": "false",
9292
"num_dumps": "3",
93-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
93+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
9494
}
9595
},
9696
"AAA": {
@@ -152,7 +152,7 @@
152152
"config": {
153153
"enabled": "false",
154154
"num_dumps": "3",
155-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
155+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
156156
}
157157
},
158158
"AAA": {
@@ -214,7 +214,7 @@
214214
"config": {
215215
"enabled": "false",
216216
"num_dumps": "3",
217-
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M"
217+
"memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-16G:448M,16G-32G:768M,32G-:1G"
218218
}
219219
},
220220
"AAA": {

0 commit comments

Comments
 (0)