diff --git a/src/control/lib/control/http.go b/src/control/lib/control/http.go index 8a89cbaf61a1..2ff1f4157f61 100644 --- a/src/control/lib/control/http.go +++ b/src/control/lib/control/http.go @@ -47,6 +47,7 @@ type httpReq struct { url *url.URL getFn httpGetFn allowInsecure bool + cacertpath *string httpsException bool getBodyFn func(context.Context, *url.URL, httpGetFn, time.Duration, bool, bool) ([]byte, error) } diff --git a/src/tests/ftest/config_file_gen.py b/src/tests/ftest/config_file_gen.py index c030abc9f9ef..9ab409ac533d 100755 --- a/src/tests/ftest/config_file_gen.py +++ b/src/tests/ftest/config_file_gen.py @@ -12,14 +12,13 @@ import sys from argparse import ArgumentParser, RawDescriptionHelpFormatter -from util.agent_utils_params import (DaosAgentTelemetryCredentials, DaosAgentTransportCredentials, +from util.agent_utils_params import (DaosAgentTelemetryConfig, DaosAgentTransportCredentials, DaosAgentYamlParameters) from util.command_utils_base import CommonConfig -from util.dmg_utils_params import (DmgTelemetryCredentials, DmgTransportCredentials, - DmgYamlParameters) +from util.dmg_utils_params import DmgTelemetryConfig, DmgTransportCredentials, DmgYamlParameters from util.exception_utils import CommandFailure -from util.server_utils_params import (DaosServerTelemetryCredentials, - DaosServerTransportCredentials, DaosServerYamlParameters) +from util.server_utils_params import (DaosServerTelemetryConfig, DaosServerTransportCredentials, + DaosServerYamlParameters) def generate_agent_config(args): @@ -34,7 +33,7 @@ def generate_agent_config(args): """ common_cfg = CommonConfig(args.group_name, DaosAgentTransportCredentials()) config = DaosAgentYamlParameters(args.agent_file, common_cfg) - config.telemetry_config = DaosAgentTelemetryCredentials() + config.telemetry_config = DaosAgentTelemetryConfig() # Update the configuration file access points config.other_params.access_points.value = args.node_list.split(",") return create_config(args, config) @@ -52,7 +51,7 @@ def generate_server_config(args): """ common_cfg = CommonConfig(args.group_name, DaosServerTransportCredentials()) config = DaosServerYamlParameters(args.server_file, common_cfg) - config.telemetry_config = DaosServerTelemetryCredentials() + config.telemetry_config = DaosServerTelemetryConfig() config.engine_params[0].storage.storage_tiers[0].storage_class.value = "ram" config.engine_params[0].storage.storage_tiers[0].scm_mount.value = "/mnt/daos" config.engine_params[0].storage.storage_tiers[0].scm_size.value = 0 @@ -73,7 +72,7 @@ def generate_dmg_config(args): """ config = DmgYamlParameters( args.dmg_file, args.group_name, DmgTransportCredentials()) - config.telemetry_config = DmgTelemetryCredentials() + config.telemetry_config = DmgTelemetryConfig() # Update the configuration file hostlist config.hostlist.value = args.node_list.split(",") return create_config(args, config) diff --git a/src/tests/ftest/server/storage_tiers.py b/src/tests/ftest/server/storage_tiers.py index ad946baaa72b..536c1c52baf7 100644 --- a/src/tests/ftest/server/storage_tiers.py +++ b/src/tests/ftest/server/storage_tiers.py @@ -8,7 +8,7 @@ import yaml from apricot import TestWithServers from command_utils_base import CommonConfig -from server_utils import (DaosServerTelemetryCredentials, DaosServerTransportCredentials, +from server_utils import (DaosServerTelemetryConfig, DaosServerTransportCredentials, DaosServerYamlParameters) @@ -68,7 +68,7 @@ def test_tiers(self): common_config = CommonConfig("daos_server", DaosServerTransportCredentials()) config = DaosServerYamlParameters(None, common_config) - config.telemetry_config = DaosServerTelemetryCredentials() + config.telemetry_config = DaosServerTelemetryConfig() config.namespace = self.server_config_namespace config.get_params(self) data = config.get_yaml_data() diff --git a/src/tests/ftest/util/agent_utils.py b/src/tests/ftest/util/agent_utils.py index 3fdd421b9dc4..f437bc36e047 100644 --- a/src/tests/ftest/util/agent_utils.py +++ b/src/tests/ftest/util/agent_utils.py @@ -7,7 +7,7 @@ import re import socket -from agent_utils_params import (DaosAgentTelemetryCredentials, DaosAgentTransportCredentials, +from agent_utils_params import (DaosAgentTelemetryConfig, DaosAgentTransportCredentials, DaosAgentYamlParameters) from ClusterShell.NodeSet import NodeSet from command_utils import CommandWithSubCommand, SubprocessManager, YamlCommand @@ -54,7 +54,7 @@ def get_agent_command(group, cert_dir, bin_dir, config_file, run_user, config_te transport_config = DaosAgentTransportCredentials(cert_dir) common_config = CommonConfig(group, transport_config) config = DaosAgentYamlParameters(config_file, common_config) - config.telemetry_config = DaosAgentTelemetryCredentials(cert_dir) + config.telemetry_config = DaosAgentTelemetryConfig(cert_dir) command = DaosAgentCommand(bin_dir, config, run_user=run_user) if config_temp: # Setup the DaosAgentCommand to write the config file data to the diff --git a/src/tests/ftest/util/agent_utils_params.py b/src/tests/ftest/util/agent_utils_params.py index 0a5ac57d5398..b6a04bf874ff 100644 --- a/src/tests/ftest/util/agent_utils_params.py +++ b/src/tests/ftest/util/agent_utils_params.py @@ -5,7 +5,7 @@ """ import os -from command_utils_base import (BasicParameter, LogParameter, TelemetryCredentials, +from command_utils_base import (BasicParameter, LogParameter, TelemetryConfig, TransportCredentials, YamlParameters) @@ -33,12 +33,12 @@ def _get_new(self): return DaosAgentTransportCredentials(self._log_dir) -class DaosAgentTelemetryCredentials(TelemetryCredentials): +class DaosAgentTelemetryConfig(TelemetryConfig): # pylint: disable=too-few-public-methods """Telemetry credentials listing certificates for secure communication.""" def __init__(self, log_dir=os.path.join(os.sep, "tmp")): - """Initialize a TelemetryCredentials object.""" + """Initialize a TelemetryConfig object.""" super().__init__("/run/agent_config/telemetry_config/*", None, log_dir) self.telemetry_port = BasicParameter(None, 9192) @@ -51,9 +51,9 @@ def _get_new(self): """Get a new object based upon this one. Returns: - DaosServerTelemetryCredentials: a new DaosServerTelemetryCredentials object + DaosServerTelemetryConfig: a new DaosServerTelemetryConfig object """ - return DaosAgentTelemetryCredentials(self._log_dir) + return DaosAgentTelemetryConfig(self._log_dir) class DaosAgentYamlParameters(YamlParameters): diff --git a/src/tests/ftest/util/command_utils_base.py b/src/tests/ftest/util/command_utils_base.py index 20a0caea1de5..5b39ca6015ae 100644 --- a/src/tests/ftest/util/command_utils_base.py +++ b/src/tests/ftest/util/command_utils_base.py @@ -799,11 +799,11 @@ def _get_new(self): return TransportCredentials(self.namespace, self.title, self._log_dir) -class TelemetryCredentials(YamlParameters): +class TelemetryConfig(YamlParameters): """Telemetry credentials listing certificates for secure communication.""" def __init__(self, namespace, title, log_dir): - """Initialize a TelemetryCredentials object. + """Initialize a TelemetryConfig object. Args: namespace (str): yaml namespace (path to parameters) @@ -864,9 +864,9 @@ def _get_new(self): """Get a new object based upon this one. Returns: - TelemetryCredentials: a new TelemetryCredentials object + TelemetryConfig: a new TelemetryConfig object """ - return TelemetryCredentials(self.namespace, self.title, self._log_dir) + return TelemetryConfig(self.namespace, self.title, self._log_dir) class CommonConfig(YamlParameters): diff --git a/src/tests/ftest/util/dmg_utils.py b/src/tests/ftest/util/dmg_utils.py index 55f4d8d6705b..d935a2dfda3b 100644 --- a/src/tests/ftest/util/dmg_utils.py +++ b/src/tests/ftest/util/dmg_utils.py @@ -10,7 +10,7 @@ from pwd import getpwuid from dmg_utils_base import DmgCommandBase -from dmg_utils_params import DmgTelemetryCredentials, DmgTransportCredentials, DmgYamlParameters +from dmg_utils_params import DmgTelemetryConfig, DmgTransportCredentials, DmgYamlParameters from exception_utils import CommandFailure from general_utils import dict_to_str, get_numeric_list @@ -39,7 +39,7 @@ def get_dmg_command(group, cert_dir, bin_dir, config_file, config_temp=None, hos """ transport_config = DmgTransportCredentials(cert_dir) - telemetry_config = DmgTelemetryCredentials(cert_dir) + telemetry_config = DmgTelemetryConfig(cert_dir) config = DmgYamlParameters(config_file, group, transport_config, telemetry_config) command = DmgCommand(bin_dir, config, hostlist_suffix) if config_temp: diff --git a/src/tests/ftest/util/dmg_utils_params.py b/src/tests/ftest/util/dmg_utils_params.py index 6f928a96796f..7faa37a0f40e 100644 --- a/src/tests/ftest/util/dmg_utils_params.py +++ b/src/tests/ftest/util/dmg_utils_params.py @@ -4,7 +4,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent """ -from command_utils_base import (BasicParameter, LogParameter, TelemetryCredentials, +from command_utils_base import (BasicParameter, LogParameter, TelemetryConfig, TransportCredentials, YamlParameters) @@ -26,11 +26,11 @@ def _get_new(self): return DmgTransportCredentials(self._log_dir) -class DmgTelemetryCredentials(TelemetryCredentials): +class DmgTelemetryConfig(TelemetryConfig): """Telemetry credentials listing certificates for secure communication.""" def __init__(self, log_dir="/tmp"): - """Initialize a TelemetryCredentials object.""" + """Initialize a TelemetryConfig object.""" super().__init__("/run/dmg/telemetry_config/*", None, log_dir) self.https_exception = BasicParameter(None, True) @@ -38,9 +38,9 @@ def _get_new(self): """Get a new object based upon this one. Returns: - DmgTelemetryCredentials: a new DmgTelemetryCredentials object + DmgTelemetryConfig: a new DmgTelemetryConfig object """ - return DmgTelemetryCredentials(self._log_dir) + return DmgTelemetryConfig(self._log_dir) class DmgYamlParameters(YamlParameters): @@ -54,7 +54,7 @@ def __init__(self, filename, name, transport, telemetry=None): name (str): The DAOS system name. transport (DmgTransportCredentials): dmg security configuration settings. - telemetry (DmgTelemetryCredentials): dmg telemetry + telemetry (DmgTelemetryConfig): dmg telemetry configuration settings. """ super().__init__("/run/dmg/*", filename, None, transport) diff --git a/src/tests/ftest/util/launch_utils.py b/src/tests/ftest/util/launch_utils.py index 0f7284c50ef1..2d33cceac05f 100644 --- a/src/tests/ftest/util/launch_utils.py +++ b/src/tests/ftest/util/launch_utils.py @@ -867,6 +867,7 @@ def _generate_certs(self, logger): message = "Error generating certificates" self.test_result.fail_test(logger, "Prepare", message, sys.exc_info()) return 128 + return 0 def _collect_crash_files(self, logger): diff --git a/src/tests/ftest/util/server_utils.py b/src/tests/ftest/util/server_utils.py index 245a115085f0..65cfb83c19a0 100644 --- a/src/tests/ftest/util/server_utils.py +++ b/src/tests/ftest/util/server_utils.py @@ -21,7 +21,7 @@ from host_utils import get_local_host from run_utils import run_remote, stop_processes from server_utils_base import DaosServerCommand, DaosServerInformation, ServerFailed -from server_utils_params import (DaosServerTelemetryCredentials, DaosServerTransportCredentials, +from server_utils_params import (DaosServerTelemetryConfig, DaosServerTransportCredentials, DaosServerYamlParameters) from user_utils import get_chown_command @@ -46,7 +46,7 @@ def get_server_command(group, cert_dir, bin_dir, config_file, config_temp=None): transport_config = DaosServerTransportCredentials(cert_dir) common_config = CommonConfig(group, transport_config) config = DaosServerYamlParameters(config_file, common_config) - config.telemetry_config = DaosServerTelemetryCredentials(cert_dir) + config.telemetry_config = DaosServerTelemetryConfig(cert_dir) command = DaosServerCommand(bin_dir, config, None) diff --git a/src/tests/ftest/util/server_utils_params.py b/src/tests/ftest/util/server_utils_params.py index 68e90afeab66..55ffc606733c 100644 --- a/src/tests/ftest/util/server_utils_params.py +++ b/src/tests/ftest/util/server_utils_params.py @@ -5,7 +5,7 @@ """ import os -from command_utils_base import (BasicParameter, LogParameter, TelemetryCredentials, +from command_utils_base import (BasicParameter, LogParameter, TelemetryConfig, TransportCredentials, YamlParameters) MAX_STORAGE_TIERS = 5 @@ -57,12 +57,12 @@ def _get_new(self): return DaosServerTransportCredentials(self._log_dir) -class DaosServerTelemetryCredentials(TelemetryCredentials): +class DaosServerTelemetryConfig(TelemetryConfig): # pylint: disable=too-few-public-methods """Telemetry credentials listing certificates for secure communication.""" def __init__(self, log_dir=os.path.join(os.sep, "tmp")): - """Initialize a DaosServerTelemetryCredentials object.""" + """Initialize a DaosServerTelemetryConfig object.""" super().__init__("/run/server_config/telemetry_config/*", None, log_dir) # Additional daos_server telemetry credential parameters: @@ -78,9 +78,9 @@ def _get_new(self): """Get a new object based upon this one. Returns: - DaosServerTelemetryCredentials: a new DaosServerTelemetryCredentials object + DaosServerTelemetryConfig: a new DaosServerTelemetryConfig object """ - return DaosServerTelemetryCredentials(self._log_dir) + return DaosServerTelemetryConfig(self._log_dir) class DaosServerYamlParameters(YamlParameters):