Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Azure Linux 3 #3183

Merged
merged 9 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azurelinuxagent/common/osutil/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Copy link
Contributor

@nagworld9 nagworld9 Aug 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think same change needed in setup.py too

return MarinerOSUtil()

if distro_name == "nsbsd":
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
2 changes: 2 additions & 0 deletions tests_e2e/test_suites/agent_persist_firewall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion tests_e2e/test_suites/ext_sequencing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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"
13 changes: 12 additions & 1 deletion tests_e2e/test_suites/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ image-sets:
- "debian_11"
- "flatcar"
- "suse_12"
- "mariner_1"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mariner 1 is deprecated now

- "mariner_2"
- "azure-linux_3"
- "suse_15"
- "rhel_79"
- "rhel_82"
Expand All @@ -37,6 +37,7 @@ image-sets:
- "debian_11_arm64"
- "flatcar_arm64"
- "mariner_2_arm64"
- "azure-linux_3_arm64"
- "rhel_90_arm64"
- "ubuntu_2204_arm64"

Expand Down Expand Up @@ -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"
Expand Down
18 changes: 18 additions & 0 deletions tests_e2e/tests/lib/agent_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
maddieford marked this conversation as resolved.
Show resolved Hide resolved
#
# 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:
Expand Down
Loading