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

Change the way the PA checks for cloud-init existence and status #2061

Merged
merged 10 commits into from
Nov 6, 2020

Conversation

trstringer
Copy link
Contributor

Description

This PR changes the way that the provisioning agent in walinuxagent determines if cloud-init is already acting as the provisioning agent. This uses unit/service status to make this determination, instead of reading processes. This should be a more reliable implementation to make the correct determination. And it also reuses existing logic in walinuxagent for this discovery.

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.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and Travis.CI is passing.

Quality of Code and Contribution Guidelines

@narrieta
Copy link
Member

narrieta commented Nov 3, 2020

LGTM; running automation

@trstringer
Copy link
Contributor Author

@narrieta, I fixed the unit tests. The reason they were passing on our local machines is because we didn't have cloud-init installed on the test host. Therefore the call to azurelinux.pa.provision.cloudinitdetect.cloud_init_is_enabled came back False. But it seems like on the CI servers there probably was cloud-init installed and enabled, and it was causing the failure then. All I had to do was mock this function to return False.

Now that the tests are passing, this PR should be ready for re-review.

@narrieta
Copy link
Member

narrieta commented Nov 4, 2020

@trstringer thanks; running automation

@narrieta
Copy link
Member

narrieta commented Nov 4, 2020

automation ok

@anhvoms
Copy link
Collaborator

anhvoms commented Nov 5, 2020

LGTM

@trstringer
Copy link
Contributor Author

Thanks, all, for the reviews! @narrieta, let me know if there's anything else you need from me prior to merging.

@narrieta
Copy link
Member

narrieta commented Nov 5, 2020

@trstringer Just waiting for the Travis run to complete. Travis has been extremely slow these days. It seems like your run is still queued.

@pgombar pgombar merged commit 7be1b81 into Azure:develop Nov 6, 2020
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.

5 participants