[#171] Components versions check
Components versions check Signed-off-by: Mikhail Kadilov m.kadilov@yadro.com
This commit is contained in:
parent
6caa77dedf
commit
8ba2cb8030
3 changed files with 9 additions and 17 deletions
|
@ -51,11 +51,11 @@ basic = "frostfs_testlib.healthcheck.basic_healthcheck:BasicHealthcheck"
|
|||
config = "frostfs_testlib.storage.controllers.state_managers.config_state_manager:ConfigStateManager"
|
||||
|
||||
[project.entry-points."frostfs.testlib.services"]
|
||||
s = "frostfs_testlib.storage.dataclasses.frostfs_services:StorageNode"
|
||||
s3-gate = "frostfs_testlib.storage.dataclasses.frostfs_services:S3Gate"
|
||||
http-gate = "frostfs_testlib.storage.dataclasses.frostfs_services:HTTPGate"
|
||||
morph-chain = "frostfs_testlib.storage.dataclasses.frostfs_services:MorphChain"
|
||||
ir = "frostfs_testlib.storage.dataclasses.frostfs_services:InnerRing"
|
||||
frostfs-storage = "frostfs_testlib.storage.dataclasses.frostfs_services:StorageNode"
|
||||
frostfs-s3 = "frostfs_testlib.storage.dataclasses.frostfs_services:S3Gate"
|
||||
frostfs-http = "frostfs_testlib.storage.dataclasses.frostfs_services:HTTPGate"
|
||||
neo-go = "frostfs_testlib.storage.dataclasses.frostfs_services:MorphChain"
|
||||
frostfs-ir = "frostfs_testlib.storage.dataclasses.frostfs_services:InnerRing"
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
|
|
@ -105,7 +105,7 @@ class ClusterNode:
|
|||
service_entry = self.class_registry.get_entry(service_type)
|
||||
service_name = service_entry["hosting_service_name"]
|
||||
|
||||
pattern = f"{service_name}{self.id:02}"
|
||||
pattern = f"{service_name}_{self.id:02}"
|
||||
config = self.host.get_service_config(pattern)
|
||||
|
||||
return service_type(
|
||||
|
@ -120,7 +120,7 @@ class ClusterNode:
|
|||
svcs_names_on_node = [svc.name for svc in self.host.config.services]
|
||||
for entry in self.class_registry._class_mapping.values():
|
||||
hosting_svc_name = entry["hosting_service_name"]
|
||||
pattern = f"{hosting_svc_name}{self.id:02}"
|
||||
pattern = f"{hosting_svc_name}_{self.id:02}"
|
||||
if pattern in svcs_names_on_node:
|
||||
config = self.host.get_service_config(pattern)
|
||||
svcs.append(
|
||||
|
@ -267,13 +267,13 @@ class Cluster:
|
|||
service_name = service["hosting_service_name"]
|
||||
cls: type[NodeBase] = service["cls"]
|
||||
|
||||
pattern = f"{service_name}\d*$"
|
||||
pattern = f"{service_name}_\d*$"
|
||||
configs = self.hosting.find_service_configs(pattern)
|
||||
|
||||
found_nodes = []
|
||||
for config in configs:
|
||||
# config.name is something like s3-gate01. Cut last digits to know service type
|
||||
service_type = re.findall(".*\D", config.name)[0]
|
||||
service_type = re.findall("(.*)_\d+", config.name)[0]
|
||||
# exclude unsupported services
|
||||
if service_type != service_name:
|
||||
continue
|
||||
|
|
|
@ -18,11 +18,3 @@ class ConfigAttributes:
|
|||
UN_LOCODE = "un_locode"
|
||||
HTTP_HOSTNAME = "http_hostname"
|
||||
S3_HOSTNAME = "s3_hostname"
|
||||
|
||||
|
||||
class _FrostfsServicesNames:
|
||||
STORAGE = "s"
|
||||
S3_GATE = "s3-gate"
|
||||
HTTP_GATE = "http-gate"
|
||||
MORPH_CHAIN = "morph-chain"
|
||||
INNER_RING = "ir"
|
||||
|
|
Loading…
Reference in a new issue