From 6f2a728d82dd88842ae471915578a5e77b0665e7 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello <66272872+aromanielloNTIA@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:34:06 -0500 Subject: [PATCH 1/5] Remove hard-coded SSD_DEVICE --- scos_actions/actions/acquire_sea_data_product.py | 5 +++-- scos_actions/settings.py | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scos_actions/actions/acquire_sea_data_product.py b/scos_actions/actions/acquire_sea_data_product.py index 5e72550d..e31cd83f 100644 --- a/scos_actions/actions/acquire_sea_data_product.py +++ b/scos_actions/actions/acquire_sea_data_product.py @@ -54,7 +54,7 @@ ntia_sensor, ) from scos_actions.metadata.structs.capture import CaptureSegment -from scos_actions.settings import SCOS_SENSOR_GIT_TAG +from scos_actions.settings import SCOS_SENSOR_GIT_TAG, SSD_DEVICE from scos_actions.signal_processing.apd import get_apd from scos_actions.signal_processing.fft import ( get_fft, @@ -712,7 +712,8 @@ def capture_diagnostics( Various CPU metrics make assumptions about the system: only Intel CPUs are supported. - Disk health check assumes the SSD is ``/dev/nvme0n1`` and + Disk health check assumes collects SMART diagnostics on the + SSD specified by the `SSD_DEVICE` environment variable. This requires the Docker container to have the required privileges or capabilities and device passthrough. For more information, see ``scos_actions.hardware.utils.get_disk_smart_data()``. diff --git a/scos_actions/settings.py b/scos_actions/settings.py index e924bc57..e719ca5e 100644 --- a/scos_actions/settings.py +++ b/scos_actions/settings.py @@ -45,3 +45,6 @@ logger.debug(f"scos-actions: PRESELECTOR_MODULE:{PRESELECTOR_MODULE}") PRESELECTOR_CLASS = env("PRESELECTOR_CLASS", default=None) logger.debug(f"scos-actions: PRESELECTOR_CLASS:{PRESELECTOR_CLASS}") + +SSD_DEVICE = env("SSD_DEVICE", default="/dev/nvme0n1") +logger.debug(f"scos-actions: SSD-DEVICE:{SSD_DEVICE}") From b3c3b7a9d601bd8c47e96cc3ca44360218dab9dc Mon Sep 17 00:00:00 2001 From: Anthony Romaniello <66272872+aromanielloNTIA@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:34:28 -0500 Subject: [PATCH 2/5] Update pre-commit hook markdownlint --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 52848726..0eeed2dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: - id: black types: [file, python] - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.42.0 + rev: v0.43.0 hooks: - id: markdownlint types: [file, markdown] From 995909f966009ce03fca6fdb9dfa928c9c3939e5 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello <66272872+aromanielloNTIA@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:35:53 -0500 Subject: [PATCH 3/5] Remove hard-coded SSD_DEVICE in function call --- scos_actions/actions/acquire_sea_data_product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scos_actions/actions/acquire_sea_data_product.py b/scos_actions/actions/acquire_sea_data_product.py index e31cd83f..6550a300 100644 --- a/scos_actions/actions/acquire_sea_data_product.py +++ b/scos_actions/actions/acquire_sea_data_product.py @@ -791,7 +791,7 @@ def capture_diagnostics( except: logger.warning("Failed to get SCOS uptime") try: # SSD SMART data - smart_data = get_disk_smart_data("/dev/nvme0n1") + smart_data = get_disk_smart_data(SSD_DEVICE) cpu_diag["ssd_smart_data"] = ntia_diagnostics.SsdSmartData(**smart_data) except: logger.warning("Failed to get SSD SMART data") From 11730d5f31b4a865acb8fef234f89f50b670dbbc Mon Sep 17 00:00:00 2001 From: Anthony Romaniello <66272872+aromanielloNTIA@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:36:38 -0500 Subject: [PATCH 4/5] Bump version to 11.1.0 --- scos_actions/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scos_actions/__init__.py b/scos_actions/__init__.py index 5b461163..f9e29a7c 100644 --- a/scos_actions/__init__.py +++ b/scos_actions/__init__.py @@ -1 +1 @@ -__version__ = "11.0.0" +__version__ = "11.1.0" From b0ab0541737ff50df4e4996b7faefb63fc7d66f2 Mon Sep 17 00:00:00 2001 From: Anthony Romaniello <66272872+aromanielloNTIA@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:10:43 -0500 Subject: [PATCH 5/5] Remove word --- scos_actions/actions/acquire_sea_data_product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scos_actions/actions/acquire_sea_data_product.py b/scos_actions/actions/acquire_sea_data_product.py index 6550a300..29861cf8 100644 --- a/scos_actions/actions/acquire_sea_data_product.py +++ b/scos_actions/actions/acquire_sea_data_product.py @@ -712,7 +712,7 @@ def capture_diagnostics( Various CPU metrics make assumptions about the system: only Intel CPUs are supported. - Disk health check assumes collects SMART diagnostics on the + Disk health check collects SMART diagnostics on the SSD specified by the `SSD_DEVICE` environment variable. This requires the Docker container to have the required privileges or capabilities and device passthrough. For more information,