Skip to content

Commit

Permalink
AMA is not supported on cbl-mariner 1.0 (#3002)
Browse files Browse the repository at this point in the history
* Cbl-mariner 1.0 is not supported by AMA

* Use get distro to check distro

* Add comment to get_distro
  • Loading branch information
maddieford authored Dec 29, 2023
1 parent 284fbd5 commit 5dcb2e1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests_e2e/tests/agent_bvt/vm_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
class VmAccessBvt(AgentVmTest):
def run(self):
ssh_client: SshClient = self._context.create_ssh_client()
if not VmExtensionIds.VmAccess.supports_distro(ssh_client.run_command("uname -a")):
if not VmExtensionIds.VmAccess.supports_distro(ssh_client.run_command("get_distro.py").rstrip()):
raise TestSkipped("Currently VMAccess is not supported on this distro")

# Try to use a unique username for each test run (note that we truncate to 32 chars to
Expand Down
2 changes: 1 addition & 1 deletion tests_e2e/tests/ext_sequencing/ext_sequencing.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def run(self):
for instance in instances_ip_address:
ssh_clients[instance.instance_name] = SshClient(ip_address=instance.ip_address, username=self._context.username, identity_file=self._context.identity_file)

if not VmExtensionIds.AzureMonitorLinuxAgent.supports_distro(next(iter(ssh_clients.values())).run_command("uname -a")):
if not VmExtensionIds.AzureMonitorLinuxAgent.supports_distro(next(iter(ssh_clients.values())).run_command("get_distro.py").rstrip()):
raise TestSkipped("Currently AzureMonitorLinuxAgent is not supported on this distro")

# This is the base ARM template that's used for deploying extensions for this scenario
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def run(self):

# Extensions we will create events for
extensions = ["Microsoft.Azure.Extensions.CustomScript"]
if VmExtensionIds.VmAccess.supports_distro(ssh_client.run_command("uname -a")):
if VmExtensionIds.VmAccess.supports_distro(ssh_client.run_command("get_distro.py").rstrip()):
extensions.append("Microsoft.OSTCExtensions.VMAccessForLinux")

# Set the etp collection period to 30 seconds instead of default 5 minutes
Expand Down
2 changes: 1 addition & 1 deletion tests_e2e/tests/lib/vm_extension_identifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, publisher: str, ext_type: str, version: str):

unsupported_distros: Dict[str, List[str]] = {
"Microsoft.OSTCExtensions.VMAccessForLinux": ["flatcar"],
"Microsoft.Azure.Monitor.AzureMonitorLinuxAgent": ["flatcar"]
"Microsoft.Azure.Monitor.AzureMonitorLinuxAgent": ["flatcar", "mariner_1"]
}

def supports_distro(self, system_info: str) -> bool:
Expand Down

0 comments on commit 5dcb2e1

Please sign in to comment.