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

Log collector scenario should not pick up runs before service restart #3228

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

maddieford
Copy link
Contributor

Description

The log collector scenario does a service restart to update config flags. In some cases, a log collector run starts but does not complete before the service restart. The test is picking up the incomplete run.

This PR updates the scenario to rename the log before restarting the service so that the test only picks up log collector runs afte the service restart.
 
Issue #


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made

Quality of Code and Contribution Guidelines

* test

* test

* Rename agent log:
log.info("Renaming agent log file and modifying log collector conf flags")
setup_script = ("agent-service stop && mv /var/log/waagent.log /var/log/waagent.$(date --iso-8601=seconds).log && "
"update-waagent-conf Logs.Collect=y Debug.EnableCgroupV2ResourceLimiting=y Debug.LogCollectorInitialDelay=60")
self._run_remote_test(ssh_client, f"sh -c '{setup_script}'", use_sudo=True)
Copy link
Member

Choose a reason for hiding this comment

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

should be run_command, rather than run_remote_test

@maddieford maddieford merged commit 2e93b78 into Azure:develop Sep 23, 2024
11 checks passed
@maddieford maddieford deleted the lc_e2e_fix branch September 23, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants