From 185ceb32fea5d5c2a43d7b6ee2a40228489055f4 Mon Sep 17 00:00:00 2001 From: Ɓukasz 'sil2100' Zemczak Date: Mon, 4 Sep 2017 10:27:07 +0200 Subject: Import patches-unapplied version 2.2.16-0ubuntu1 to ubuntu/artful-proposed Imported using git-ubuntu import. Changelog parent: 43bdf9debe5377216aed0086bff2aad864f6ba82 New changelog entries: * New upstream release (LP: #1714299). --- azurelinuxagent/common/rdma.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'azurelinuxagent/common/rdma.py') diff --git a/azurelinuxagent/common/rdma.py b/azurelinuxagent/common/rdma.py index 226482d..3c01e77 100644 --- a/azurelinuxagent/common/rdma.py +++ b/azurelinuxagent/common/rdma.py @@ -202,7 +202,17 @@ class RDMADeviceHandler(object): RDMADeviceHandler.update_dat_conf(dapl_config_paths, self.ipv4_addr) skip_rdma_device = False - retcode,out = shellutil.run_get_output("modinfo hv_network_direct") + module_name = "hv_network_direct" + retcode,out = shellutil.run_get_output("modprobe -R %s" % module_name, chk_err=False) + if retcode == 0: + module_name = out.strip() + else: + logger.info("RDMA: failed to resolve module name. Use original name") + retcode,out = shellutil.run_get_output("modprobe %s" % module_name) + if retcode != 0: + logger.error("RDMA: failed to load module %s" % module_name) + return + retcode,out = shellutil.run_get_output("modinfo %s" % module_name) if retcode == 0: version = re.search("version:\s+(\d+)\.(\d+)\.(\d+)\D", out, re.IGNORECASE) if version: -- cgit v1.2.3