From 7b9b7426342fdc8513b1d9865b99087fe61f8eeb Mon Sep 17 00:00:00 2001 From: narrieta Date: Wed, 24 May 2023 16:20:04 -0700 Subject: [PATCH] added messages --- azurelinuxagent/daemon/main.py | 5 ++--- .../tests/agent_not_provisioned/agent_not_provisioned.py | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/azurelinuxagent/daemon/main.py b/azurelinuxagent/daemon/main.py index 1eb58ec99b..d051af202b 100644 --- a/azurelinuxagent/daemon/main.py +++ b/azurelinuxagent/daemon/main.py @@ -105,9 +105,8 @@ def sleep_if_disabled(self): agent_disabled_file_path = conf.get_disable_agent_file_path() if os.path.exists(agent_disabled_file_path): import threading - logger.warn("Disabling the guest agent by sleeping forever; " - "to re-enable, remove {0} and restart" - .format(agent_disabled_file_path)) + logger.warn("Disabling the guest agent by sleeping forever; to re-enable, remove {0} and restart".format(agent_disabled_file_path)) + logger.warn("To enable VM extensions, also ensure that the VM's osProfile.allowExtensionOperations property is set to true.") self.running = False disable_event = threading.Event() disable_event.wait() diff --git a/tests_e2e/tests/agent_not_provisioned/agent_not_provisioned.py b/tests_e2e/tests/agent_not_provisioned/agent_not_provisioned.py index d731f711ee..45ff903c39 100755 --- a/tests_e2e/tests/agent_not_provisioned/agent_not_provisioned.py +++ b/tests_e2e/tests/agent_not_provisioned/agent_not_provisioned.py @@ -54,12 +54,14 @@ def run(self): # # Validate that the agent is not reporting status. # + log.info("Verifying that the Agent status is 'Not Ready' (i.e. it is not reporting status).") vm: VirtualMachineClient = VirtualMachineClient(self._context.vm) instance_view: VirtualMachineInstanceView = vm.get_instance_view() log.info("Instance view of VM Agent:\n%s", instance_view.vm_agent.serialize()) assert_that(instance_view.vm_agent.statuses).described_as("The VM agent should have exactly 1 status").is_length(1) assert_that(instance_view.vm_agent.statuses[0].code).described_as("The VM Agent should not be available").is_equal_to('ProvisioningState/Unavailable') assert_that(instance_view.vm_agent.statuses[0].display_status).described_as("The VM Agent should not ready").is_equal_to('Not Ready') + log.info("The Agent status is 'Not Ready'") # # Validate that extensions cannot be executed.