Skip to content

Commit

Permalink
Merge branch 'develop' into etp_preview_flag__add_back
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinclark19a authored Aug 30, 2021
2 parents acbde66 + 167e494 commit 1132f4a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion azurelinuxagent/common/osutil/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name)

return DebianOSBaseUtil()

if distro_name in ("redhat", "rhel", "centos", "oracle"):
if distro_name in ("redhat", "rhel", "centos", "oracle", "almalinux"):
if Version(distro_version) < Version("7"):
return Redhat6xOSUtil()

Expand Down
2 changes: 1 addition & 1 deletion azurelinuxagent/pa/rdma/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_rdma_handler(
):
return SUSERDMAHandler()

if distro_full_name == 'CentOS Linux' or distro_full_name == 'CentOS' or distro_full_name == 'Red Hat Enterprise Linux Server':
if distro_full_name in ('CentOS Linux', 'CentOS', 'Red Hat Enterprise Linux Server', 'AlmaLinux'):
return CentOSRDMAHandler(distro_version)

if distro_full_name == 'Ubuntu':
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912
systemd_dir_path = osutil.get_systemd_unit_file_install_path()
agent_bin_path = osutil.get_agent_bin_path()

if name == 'redhat' or name == 'centos': # pylint: disable=R1714
if name == 'redhat' or name == 'centos' or name == 'almalinux': # pylint: disable=R1714
if version.startswith("8.2"):
# redhat8+ default to py3
set_bin_files(data_files, dest=agent_bin_path,
Expand Down
7 changes: 7 additions & 0 deletions tests/common/osutil/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ def test_get_osutil_it_should_return_redhat(self):
self.assertTrue(isinstance(ret, RedhatOSUtil))
self.assertEqual(ret.get_service_name(), "waagent")

ret = _get_osutil(distro_name="almalinux",
distro_code_name="",
distro_full_name="",
distro_version="8")
self.assertTrue(isinstance(ret, RedhatOSUtil))
self.assertEqual(ret.get_service_name(), "waagent")

def test_get_osutil_it_should_return_euleros(self):
ret = _get_osutil(distro_name="euleros",
distro_code_name="",
Expand Down

0 comments on commit 1132f4a

Please sign in to comment.