diff options
author | Ćukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> | 2017-09-04 10:27:07 +0200 |
---|---|---|
committer | usd-importer <ubuntu-server@lists.ubuntu.com> | 2017-09-04 09:38:24 +0000 |
commit | e919bdd14e48919244da9e499070fb64377993e5 (patch) | |
tree | 33c260c7c99410ac94d5f265fc506cc0b40bb6e4 /azurelinuxagent/common/rdma.py | |
parent | 70c0ea1ac879b2e1cba0a8edb1f3fbe82652413b (diff) | |
parent | 3a1d96a77ccaf023256d16183428e3d895f8a051 (diff) | |
download | vyos-walinuxagent-e919bdd14e48919244da9e499070fb64377993e5.tar.gz vyos-walinuxagent-e919bdd14e48919244da9e499070fb64377993e5.zip |
Import patches-applied version 2.2.16-0ubuntu1 to applied/ubuntu/artful-proposed
Imported using git-ubuntu import.
Changelog parent: 70c0ea1ac879b2e1cba0a8edb1f3fbe82652413b
Unapplied parent: 3a1d96a77ccaf023256d16183428e3d895f8a051
New changelog entries:
* New upstream release (LP: #1714299).
Diffstat (limited to 'azurelinuxagent/common/rdma.py')
-rw-r--r-- | azurelinuxagent/common/rdma.py | 12 |
1 files changed, 11 insertions, 1 deletions
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: |