Skip to content
Snippets Groups Projects
Commit b4006ba3 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Added recommended size for partitions test.

parent 38892c4a
No related branches found
No related tags found
No related merge requests found
...@@ -28,24 +28,28 @@ paths = [ ...@@ -28,24 +28,28 @@ paths = [
{ {
'mount_point': '/', 'mount_point': '/',
'recommended_types': ('ext4',), 'recommended_types': ('ext4',),
'min_size_gbytes': 14, 'min_size_gbytes': 9,
'reco_size_gbytes': 14,
'min_available_gbytes': 4, 'min_available_gbytes': 4,
}, },
{ {
'mount_point': '/home/msuser/msinstance', 'mount_point': '/home/msuser/msinstance',
'recommended_types': ('ext4', 'nfs', 'nfsv4'), 'recommended_types': ('ext4', 'nfs', 'nfs4'),
'min_size_gbytes': 300, 'min_size_gbytes': 5,
'min_available_gbytes': 15, 'reco_size_gbytes': 300,
'min_available_gbytes': 5,
}, },
{ {
'mount_point': '/home/skyreach', 'mount_point': '/home/skyreach',
'recommended_types': ('ext4', 'nfs', 'nfsv4'), 'recommended_types': ('ext4', 'nfs', 'nfs4'),
'min_size_gbytes': 19, 'min_size_gbytes': 5,
'min_available_gbytes': 5, 'reco_size_gbytes': 9,
'min_available_gbytes': 2,
}, },
{ {
'type': 'swap', 'type': 'swap',
'min_size_gbytes': 1, 'min_size_gbytes': 1,
'reco_size_gbytes': 2,
}, },
] ]
...@@ -129,9 +133,13 @@ def check_path(p): ...@@ -129,9 +133,13 @@ def check_path(p):
name = 'swap' name = 'swap'
psize = get_swap_gbytes() psize = get_swap_gbytes()
if psize and psize < p['min_size_gbytes']: if psize:
print('Partition of %s is smaller than the minimum required size %s(%s GB < %s GB)%s.' % (name, RED, psize, p['min_size_gbytes'], DEF)) if psize < p['min_size_gbytes']:
error = True print('Partition of %s is smaller than the minimum required size %s(%s GB < %s GB)%s.' % (name, RED, psize, p['min_size_gbytes'], DEF))
error = True
elif psize < p['reco_size_gbytes']:
print('Partition of %s is smaller than the recommended size %s(%s GB < %s GB)%s.' % (name, YELLOW, psize, p['reco_size_gbytes'], DEF))
warning = True
for p in paths: for p in paths:
check_path(p) check_path(p)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment