Skip to content

Commit

Permalink
Fixes for Azure clouds (Azure#2823)
Browse files Browse the repository at this point in the history
* Fixes for Azure clouds

* add debug info

---------

Co-authored-by: narrieta <narrieta>
  • Loading branch information
narrieta authored May 18, 2023
1 parent c7bef38 commit 3d713a2
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
14 changes: 10 additions & 4 deletions tests_e2e/orchestrator/lib/agent_junit.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from lisa.messages import ( # pylint: disable=E0401
MessageBase,
TestResultMessage,
TestStatus
)


Expand All @@ -48,19 +49,24 @@ def type_schema(cls) -> Type[schema.TypedSchema]:
return AgentJUnitSchema

def _received_message(self, message: MessageBase) -> None:
# The Agent sends its own TestResultMessage and marks them as "AgentTestResultMessage"; for the
# test results sent by LISA itself, we change the suite name to "_Runbook_" in order to separate them
# from actual test results.
# The Agent sends its own TestResultMessages setting their type as "AgentTestResultMessage".
# Any other message types are sent by LISA.
if isinstance(message, TestResultMessage) and message.type != "AgentTestResultMessage":
if "Unexpected error in AgentTestSuite" in message.message:
# Ignore these errors, they are already reported as AgentTestResultMessages
return
# Change the suite name to "_Runbook_" for LISA messages in order to separate them
# from actual test results.
message.suite_full_name = "_Runbook_"
message.suite_name = message.suite_full_name
image = message.information.get('image')
if image is not None:
# NOTE: message.information['environment'] is similar to "[generated_2]" and can be correlated
# NOTE: The value of message.information['environment'] is similar to "[generated_2]" and can be correlated
# with the main LISA log to find the specific VM for the message.
message.full_name = f"{image} [{message.information['environment']}]"
message.name = message.full_name
# LISA silently skips tests on situations that should be errors (e.g. trying to create a test VM using an image that is not available).
# Mark these messages as failed so that the JUnit report shows them as errors.
if message.status == TestStatus.SKIPPED:
message.status = TestStatus.FAILED
super()._received_message(message)
1 change: 1 addition & 0 deletions tests_e2e/orchestrator/lib/agent_test_suite_combinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ def create_environment(c_env_name: str) -> Dict[str, Any]:
log.info("")
log.info("******** Waagent: Test Environments *****")
log.info("")
log.info("Will execute tests on %d environments:\n\n\t%s\n", len(environments), '\n\t'.join([env['c_env_name'] for env in environments]))
for env in environments:
log.info("Settings for %s:\n%s\n", env['c_env_name'], self._get_env_settings(env))
log.info("")
Expand Down
11 changes: 8 additions & 3 deletions tests_e2e/orchestrator/scripts/install-agent
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,21 @@ if service-status walinuxagent > /dev/null 2>&1;then
else
service_name="waagent"
fi
echo "Service name: $service_name"

#
# Output the initial version of the agent
#
python=$(get-agent-python)
waagent=$(get-agent-bin-path)
echo "Agent's path: $waagent"

echo "============================================================"
echo "Service Name: $service_name"
echo "Agent Path: $waagent"
echo "Agent Version:"
$python "$waagent" --version
printf "\n"
echo "Service Status:"
service-status $service_name
echo "============================================================"

#
# Install the package
Expand Down
11 changes: 10 additions & 1 deletion tests_e2e/test_suites/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ images:
urn: "Debian debian-11 11-backports-arm64 latest"
locations:
AzureUSGovernment: []
AzureChinaCloud: []
flatcar:
urn: "kinvolk flatcar-container-linux-free stable latest"
locations:
Expand All @@ -89,6 +90,7 @@ images:
urn: "kinvolk flatcar-container-linux-corevm stable latest"
locations:
AzureChinaCloud: []
AzureUSGovernment: []
vm_sizes:
- "Standard_D2pls_v5"
mariner_1:
Expand All @@ -100,6 +102,8 @@ images:
urn: "microsoftcblmariner cbl-mariner cbl-mariner-2-arm64 latest"
locations:
AzureCloud: ["eastus"]
AzureChinaCloud: []
AzureUSGovernment: []
vm_sizes:
- "Standard_D2pls_v5"
rocky_9:
Expand All @@ -125,8 +129,13 @@ images:
urn: "RedHat rhel-arm64 9_0-arm64 latest"
locations:
AzureChinaCloud: []
AzureUSGovernment: []
ubuntu_1604: "Canonical UbuntuServer 16.04-LTS latest"
ubuntu_1804: "Canonical UbuntuServer 18.04-LTS latest"
ubuntu_2004: "Canonical 0001-com-ubuntu-server-focal 20_04-lts latest"
ubuntu_2204: "Canonical 0001-com-ubuntu-server-jammy 22_04-lts latest"
ubuntu_2204_arm64: "Canonical 0001-com-ubuntu-server-jammy 22_04-lts-arm64 latest"
ubuntu_2204_arm64:
urn: "Canonical 0001-com-ubuntu-server-jammy 22_04-lts-arm64 latest"
locations:
AzureChinaCloud: []
AzureUSGovernment: []

0 comments on commit 3d713a2

Please sign in to comment.