diff --git a/azurelinuxagent/common/osutil/factory.py b/azurelinuxagent/common/osutil/factory.py index 58afd0af1..fd66fbb0e 100644 --- a/azurelinuxagent/common/osutil/factory.py +++ b/azurelinuxagent/common/osutil/factory.py @@ -142,7 +142,7 @@ def _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name) if distro_name == "iosxe": return IosxeOSUtil() - if distro_name == "mariner": + if distro_name in ["mariner", "azurelinux"]: return MarinerOSUtil() if distro_name == "nsbsd": diff --git a/setup.py b/setup.py index 2d51fae8c..0bb053d4c 100755 --- a/setup.py +++ b/setup.py @@ -147,7 +147,7 @@ def get_data_files(name, version, fullname): # pylint: disable=R0912 src=["config/clearlinux/waagent.conf"]) set_systemd_files(data_files, dest=systemd_dir_path, src=["init/clearlinux/waagent.service"]) - elif name == 'mariner': + elif name in ["mariner", "azurelinux"]: set_bin_files(data_files, dest=agent_bin_path) set_conf_files(data_files, dest="/etc", src=["config/mariner/waagent.conf"]) diff --git a/tests_e2e/test_suites/agent_persist_firewall.yml b/tests_e2e/test_suites/agent_persist_firewall.yml index f749046a2..ea877b9f0 100644 --- a/tests_e2e/test_suites/agent_persist_firewall.yml +++ b/tests_e2e/test_suites/agent_persist_firewall.yml @@ -14,6 +14,8 @@ owns_vm: true # This vm cannot be shared with other tests because it modifies t # so skipping the test run on flatcar distro. # (2023-11-14T19:04:13.738695Z ERROR ExtHandler ExtHandler Unable to setup the persistent firewall rules: [Errno 30] Read-only file system: '/lib/systemd/system/waagent-network-setup.service) skip_on_images: + - "azure-linux_3" # TODO: the test in unstable on Azure Linux 3; skipping for now + - "azure-linux_3_arm64" # TODO: the test in unstable on Azure Linux 3; skipping for now - "debian_9" # TODO: Reboot is slow on debian_9. Need to investigate further. - "flatcar" - "flatcar_arm64" diff --git a/tests_e2e/test_suites/ext_sequencing.yml b/tests_e2e/test_suites/ext_sequencing.yml index 1976a8502..78c73dee1 100644 --- a/tests_e2e/test_suites/ext_sequencing.yml +++ b/tests_e2e/test_suites/ext_sequencing.yml @@ -7,4 +7,7 @@ tests: - "ext_sequencing/ext_sequencing.py" images: "endorsed" # This scenario is executed on instances of a scaleset created by the agent test suite. -executes_on_scale_set: true \ No newline at end of file +executes_on_scale_set: true +skip_on_images: # TODO: AzureMonitorLinuxAgent, used by this test, currently does not work on Azure Linux 3. Remove this once it is fixed. + - "azure-linux_3" + - "azure-linux_3_arm64" diff --git a/tests_e2e/test_suites/images.yml b/tests_e2e/test_suites/images.yml index fb6cc7f1f..976c987f9 100644 --- a/tests_e2e/test_suites/images.yml +++ b/tests_e2e/test_suites/images.yml @@ -17,8 +17,8 @@ image-sets: - "debian_11" - "flatcar" - "suse_12" - - "mariner_1" - "mariner_2" + - "azure-linux_3" - "suse_15" - "rhel_79" - "rhel_82" @@ -37,6 +37,7 @@ image-sets: - "debian_11_arm64" - "flatcar_arm64" - "mariner_2_arm64" + - "azure-linux_3_arm64" - "rhel_90_arm64" - "ubuntu_2204_arm64" @@ -87,6 +88,16 @@ images: urn: "almalinux almalinux 9-gen2 latest" locations: AzureChinaCloud: [] + azure-linux_3: + urn: "microsoftcblmariner azure-linux-3 azure-linux-3 latest" + locations: + AzureUSGovernment: [] + AzureChinaCloud: [] + azure-linux_3_arm64: + urn: "microsoftcblmariner azure-linux-3 azure-linux-3-arm64 latest" + locations: + AzureUSGovernment: [] + AzureChinaCloud: [] centos_610: "OpenLogic CentOS 6.10 latest" centos_75: "OpenLogic CentOS 7.5 latest" centos_79: "OpenLogic CentOS 7_9 latest" diff --git a/tests_e2e/tests/lib/agent_log.py b/tests_e2e/tests/lib/agent_log.py index 83f77b1ea..9c02406f9 100644 --- a/tests_e2e/tests/lib/agent_log.py +++ b/tests_e2e/tests/lib/agent_log.py @@ -380,6 +380,24 @@ def get_errors(self) -> List[AgentLogRecord]: 'message': r"Unable to determine version of iptables: \[Errno 2\] No such file or directory: 'iptables'", 'if': lambda r: DISTRO_NAME == 'ubuntu' }, + # + # TODO: The Daemon has not been updated on Azure Linux 3; remove this message when it is. + # + # 2024-08-05T14:36:48.004865Z WARNING Daemon Daemon Unable to load distro implementation for azurelinux. Using default distro implementation instead. + # + { + 'message': r"Unable to load distro implementation for azurelinux. Using default distro implementation instead.", + 'if': lambda r: DISTRO_NAME == 'azurelinux' and r.prefix == 'Daemon' and r.level == 'WARNING' + }, + # + # TODO: The OMS extension does not support Azure Linux 3; remove this message when it does. + # + # 2024-08-12T17:40:48.375193Z ERROR ExtHandler ExtHandler Event: name=Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux, op=Install, message=[ExtensionOperationError] Non-zero exit code: 51, /var/lib/waagent/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux-1.19.0/omsagent_shim.sh -install + # + { + 'message': r"name=Microsoft\.EnterpriseCloud\.Monitoring\.OmsAgentForLinux.+Non-zero exit code: 51", + 'if': lambda r: DISTRO_NAME == 'azurelinux' and DISTRO_VERSION == '3.0' + }, ] def is_error(r: AgentLogRecord) -> bool: