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

Commit

Permalink
CORTX-33705: confd and ios ports are not aligned with cluster
Browse files Browse the repository at this point in the history
Solution:

Modified ios and confd port info to fetch correct endpoints.

Signed-off-by: pavankrishnat <pavan.k.thunuguntla@seagate.com>
  • Loading branch information
pavankrishnat committed Aug 15, 2022
1 parent 4458b54 commit 1292f44
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions cfgen/cfgen
Original file line number Diff line number Diff line change
Expand Up @@ -961,15 +961,15 @@ class m0ProcT(Enum):


class PortalGroup(Enum):
hax = 22000
hax = 22001
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 Down Expand Up @@ -1002,17 +1002,17 @@ def get_lnet_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,
m0_client_s3=m0_client_s3,
m0_client_other=m0_client_other)
protal_group.m0_client_other.append({'name': 'default',
'port': 22500})
'port': 22501})
return protal_group


Expand Down Expand Up @@ -1076,7 +1076,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

0 comments on commit 1292f44

Please sign in to comment.