Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

CORTX-33705: confd and ios ports are not aligned with cluster #2149

Merged
merged 1 commit into from
Aug 23, 2022
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
28 changes: 14 additions & 14 deletions cfgen/cfgen
Original file line number Diff line number Diff line change
Expand Up @@ -1001,15 +1001,15 @@ class m0ProcT(Enum):


class PortalGroup(Enum):
hax = 22000
hax = 22001
d-nayak marked this conversation as resolved.
Show resolved Hide resolved
m0_server = [{'name': 'confd', 'port': m0ProcT.confd},
{'name': 'ios', 'port': m0ProcT.ios}]
m0_client_s3 = 22500
m0_client_other = [{'name': 'default', 'port': 22500}]
m0_client_s3 = 22501
m0_client_other = [{'name': 'default', 'port': 22501}]


class Portals:
def __init__(self, hax=22000,
def __init__(self, hax=22001,
m0_server=[{'name': 'confd', 'port': m0ProcT.confd},
{'name': 'ios', 'port': m0ProcT.ios}],
m0_client_s3=22500,
Expand All @@ -1033,27 +1033,27 @@ def get_lnet_portal_group(
m0_client_s3=3,
m0_client_other=[]
) -> Portals:
protal_group = Portals(hax=hax, m0_server=m0_server,
portal_group = Portals(hax=hax, m0_server=m0_server,
m0_client_s3=m0_client_s3,
m0_client_other=m0_client_other)
protal_group.m0_client_other.append({'name': 'default',
portal_group.m0_client_other.append({'name': 'default',
'port': 4})
return protal_group
return portal_group


def get_libfab_portal_group(
hax=22000,
hax=22001,
m0_server=[{'name': 'confd', 'port': m0ProcT.confd},
{'name': 'ios', 'port': m0ProcT.ios}],
m0_client_s3=22500,
m0_client_s3=22501,
m0_client_other=[]
) -> Portals:
protal_group = Portals(hax=hax, m0_server=m0_server,
portal_group = Portals(hax=hax, m0_server=m0_server,
m0_client_s3=m0_client_s3,
m0_client_other=m0_client_other)
protal_group.m0_client_other.append({'name': 'default',
'port': 22500})
return protal_group
portal_group.m0_client_other.append({'name': 'default',
'port': 22501})
return portal_group


class Endpoint:
Expand Down Expand Up @@ -1116,7 +1116,7 @@ class LibfabricEndpoint(Endpoint):
assert portal > 0
self.portal = 0
self.portal = self.ep_map.setdefault((ipaddr, portal),
(portal + 1))
(portal))
self.ep_map[(ipaddr, portal)] += 1

def __repr__(self):
Expand Down
12 changes: 6 additions & 6 deletions cfgen/examples/multipools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ nodes:
- name: m0_client_other # name of the motr client
instances: 2 # Number of instances, this host will run
# network_ports:
# hax: 22000
# hax: 22001
# hax_http: 8008
# m0_server:
# - name: ios
Expand All @@ -34,8 +34,8 @@ nodes:
# port: 21000
# m0_client_other:
# - name: m0_client_other
# port: 21500
# m0_client_s3: 22500
# port: 21501
# m0_client_s3: 22501
- hostname: srvnode-2
node_group: srvnode-2
data_iface: enp175s0f1_c2
Expand All @@ -62,7 +62,7 @@ nodes:
- name: m0_client_other # name of the motr client
instances: 2 # Number of instances, this host will run
# network_ports:
# hax: 22000
# hax: 22001
# hax_http: 8008
# m0_server:
# - name: ios
Expand All @@ -71,8 +71,8 @@ nodes:
# port: 21000
# m0_client_other:
# - name: m0_client_other
# port: 21500
# m0_client_s3: 22500
# port: 21501
# m0_client_s3: 22501
pools:
- name: tier1-nvme
disk_refs:
Expand Down
8 changes: 4 additions & 4 deletions provisioning/miniprov/hare_mp/cdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def _create_fdmi_filter_descriptions(

def _create_ports_descriptions(self, hostname: str) -> NetworkPorts:
conf = self.provider
m0serverT = ['ios', 'confd']
m0serverT = ['confd', 'ios']
m0server_ports = []
m0client_ports = []
for srv in NetworkPorts.__annotations__.keys():
Expand All @@ -318,7 +318,7 @@ def _create_ports_descriptions(self, hostname: str) -> NetworkPorts:
_hax_http = _parsed_url.port
else:
if _parsed_url.hostname == hostname:
_hax = round(_parsed_url.port / 100) * 100
_hax = _parsed_url.port
elif srv == 'm0_client_other':
num_clients = int(conf.get('cortx>motr>num_clients'))
for i in range(num_clients):
Expand All @@ -332,7 +332,7 @@ def _create_ports_descriptions(self, hostname: str) -> NetworkPorts:
f'cortx>motr>clients[{i}]>endpoints[{j}]')
_parsed_url = urlparse(url)
if _parsed_url.hostname == hostname:
port = round(_parsed_url.port / 100) * 100
port = _parsed_url.port
client_name = conf.get(
f'cortx>motr>clients[{i}]>name')
m0client_ports.append(
Expand All @@ -347,7 +347,7 @@ def _create_ports_descriptions(self, hostname: str) -> NetworkPorts:
url = conf.get(f'cortx>motr>{server}>endpoints[{i}]')
_parsed_url = urlparse(url)
if _parsed_url.hostname == hostname:
port = round(_parsed_url.port / 100) * 100
port = _parsed_url.port
m0server_ports.append(
ServerPort(name=Text(server),
port=int(port)))
Expand Down