python-azure-agent/paa_12_sp5_rdma_no_ext_driver.patch

22 lines
910 B
Diff

--- azurelinuxagent/pa/rdma/suse.py.orig
+++ azurelinuxagent/pa/rdma/suse.py
@@ -31,8 +31,17 @@ class SUSERDMAHandler(RDMAHandler):
def install_driver(self): # pylint: disable=R1710
"""Install the appropriate driver package for the RDMA firmware"""
+ suport_pci_passthrough = False
+ if Version(DISTRO_VERSION) == Version('12'):
+ release_data = open('/etc/os-release').read()
+ if 'SP5' in release_data:
+ suport_pci_passthrough = True
+
if Version(DISTRO_VERSION) >= Version('15'):
- msg = 'SLE 15 and later only supports PCI pass through, no '
+ suport_pci_passthrough = True
+
+ if suport_pci_passthrough:
+ msg = 'SLE 12 SP5 and later only supports PCI pass through, no '
msg += 'special driver needed for IB interface'
logger.info(msg)
return True