Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-6903 Test: Fix regression in NVMe health test code. (#4832) #5240

Merged
merged 1 commit into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/tests/ftest/nvme/enospace.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ def test_enospace_lazy_with_bg(self):
#Run IOR to fill the pool.
self.run_enospace_with_bg_job()

@skipForTicket("DAOS-7018")
def test_enospace_lazy_with_fg(self):
"""Jira ID: DAOS-4756.

Expand Down Expand Up @@ -270,6 +271,7 @@ def test_enospace_time_with_bg(self):
#Run IOR to fill the pool.
self.run_enospace_with_bg_job()

@skipForTicket("DAOS-7018")
def test_enospace_time_with_fg(self):
"""Jira ID: DAOS-4756.

Expand Down Expand Up @@ -347,6 +349,7 @@ def test_performance_storage_full(self):
' Baseline Read MiB = {} and latest IOR Read MiB = {}'
.format(max_mib_baseline, max_mib_latest))

@skipForTicket("DAOS-7018")
def test_enospace_no_aggregation(self):
"""Jira ID: DAOS-4756.

Expand Down
22 changes: 10 additions & 12 deletions src/tests/ftest/nvme/nvme_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@

SPDX-License-Identifier: BSD-2-Clause-Patent
'''
from __future__ import division
import os

from nvme_utils import ServerFillUp, get_device_ids
from test_utils_pool import TestPool
from dmg_utils import DmgCommand
from command_utils_base import CommandFailure
from apricot import skipForTicket


class NvmeHealth(ServerFillUp):
# pylint: disable=too-many-ancestors
"""
Test Class Description: To validate NVMe health test cases
:avocado: recursive
"""

@skipForTicket("DAOS-7011")
def test_monitor_for_large_pools(self):
"""Jira ID: DAOS-4722.

Expand All @@ -34,21 +32,21 @@ def test_monitor_for_large_pools(self):
# pylint: disable=attribute-defined-outside-init
# pylint: disable=too-many-branches
no_of_pools = self.params.get("number_of_pools", '/run/pool/*')
# Stop the servers to run SPDK too to get the server capacity
self.stop_servers()
storage = self.get_nvme_max_capacity()
self.start_servers()
pool_capacity = self.params.get("pool_used_percentage", '/run/pool/*')
pool_capacity = pool_capacity / 100
storage = self.get_max_storage_sizes()

# Create the pool from 80% of available of storage space
single_pool_nvme_size = int((storage * 0.80)/no_of_pools)
#Create the pool from available of storage space
single_pool_nvme_size = int((storage[1] * pool_capacity)/no_of_pools)
single_pool_scm_size = int((storage[0] * pool_capacity)/no_of_pools)

self.pool = []
# Create the Large number of pools
for _pool in range(no_of_pools):
self.log.info("-- Creating pool number = %s", _pool)
pool = TestPool(self.context, self.get_dmg_command())
pool.get_params(self)
# SCM size is 10% of NVMe
pool.scm_size.update('{}'.format(int(single_pool_nvme_size * 0.10)))
pool.scm_size.update('{}'.format(single_pool_scm_size))
pool.nvme_size.update('{}'.format(single_pool_nvme_size))
pool.create()
self.pool.append(pool)
Expand Down
1 change: 1 addition & 0 deletions src/tests/ftest/nvme/nvme_health.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ pool:
name: daos_server
control_method: dmg
number_of_pools: 40
pool_used_percentage: 75
3 changes: 2 additions & 1 deletion src/tests/ftest/nvme/nvme_io.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pool:
ior:
flags: "-w -r -k -vv"
repetitions: 1
test_file: /testFile
object_type:
- "SX"
- "S1"
Expand All @@ -41,7 +42,7 @@ ior:
dfs_destroy: False
ior_sequence:
# - [scmsize, nvmesize, stripesize, blocksize, clientslots]
- [6000000000, 139586437120, 1048576, 17179869184, 1] #[6G, 130G, 1M, 16G, 1]
- [6000000000, 214748364800, 1048576, 17179869184, 1] #[6G, 200G, 1M, 16G, 1]
- [1000000000, 9000000000, 4096, 1073741824, 1] #[1G, 9G, 4k, 1G, 1]
- [10000000000, 9000000000, 2048, 1073741824, 1] #[10G, 9G, 2k, 1G, 1]
- [3000000000, 9000000000, 8, 10485760, 1] #[3G, 9G, 8B, 10M, 1]
Expand Down
3 changes: 1 addition & 2 deletions src/tests/ftest/util/general_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ def error_count(error, hostlist, log_file):
# Get the Client side Error from client_log file.
requested_error_count = 0
other_error_count = 0
command = 'cat {} | grep ERR'.format(get_log_file(log_file))
command = 'cat {} | grep \" ERR \"'.format(get_log_file(log_file))
results = run_pcmd(hostlist, command, False, None, None)
for result in results:
for line in result["stdout"]:
Expand All @@ -865,7 +865,6 @@ def error_count(error, hostlist, log_file):

return requested_error_count, other_error_count


def get_module_class(name, module):
"""Get the class object in the specified module by its name.

Expand Down