Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove check for "ibXX" interface format to expand support #3128

Closed
wants to merge 3 commits into from
Closed
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
12 changes: 6 additions & 6 deletions azurelinuxagent/pa/rdma/rdma.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,6 @@ def update_iboip_interfaces(self, mac_ip_array):
count = 0

for nic in nics:
# look for IBoIP interface of format ibXXX
if not re.match(r"ib\w+", nic):
continue

mac_addr = None
with open(os.path.join(net_dir, nic, "address")) as address_file:
mac_addr = address_file.read()
Expand All @@ -381,8 +377,12 @@ def update_iboip_interfaces(self, mac_ip_array):
continue

mac_addr = mac_addr.upper()

match = re.match(r".+(\w\w):(\w\w):(\w\w):\w\w:\w\w:(\w\w):(\w\w):(\w\w)\n", mac_addr)

# if this is an IB interface, match IB-specific regex
if re.match(r"ib\w+", nic):
match = re.match(r".+(\w\w):(\w\w):(\w\w):\w\w:\w\w:(\w\w):(\w\w):(\w\w)\n", mac_addr)
else:
match = re.match(r"^(\w\w):(\w\w):(\w\w):(\w\w):(\w\w):(\w\w)$", mac_addr)
if not match:
logger.error("RDMA: failed to parse address for device {0} address {1}".format(nic, mac_addr))
continue
Expand Down