-
Notifications
You must be signed in to change notification settings - Fork 837
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
[Azure] DataSourceAzure: send failure signal on Azure datasource failure #594
[Azure] DataSourceAzure: send failure signal on Azure datasource failure #594
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update! One minor comment on the code itself, and I've also reviewed the tests: no major comments, just some minor requests (and a few nits; feel free to ignore those).
This reverts commit 93ac9a6. This is due to lack of Python 3.4 typing module. Cloud-init still supports Python 3.4 as of this commit.
Co-authored-by: Daniel Watkins <daniel@daniel-watkins.co.uk>
Co-authored-by: Daniel Watkins <daniel@daniel-watkins.co.uk>
Thanks @OddBloke for the comments and NITs. I've addressed all of them in the series of commits above. To make it easier for you to review, for each of your comments above, I've linked the relevant commit that addresses the issue. I've also built a deb with the latest changes and performed Azure deployment tests, which conform to the expected behavior (no regressions on successful deployments + report failure on intentionally buggy deployments). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all your work here, Johnson, this looks good to me now. 👍
Proposed Commit Message
DataSourceAzure: send failure signal on Azure datasource failure
On systems where the Azure datasource
is a viable platform for crawling metadata,
cloud-init occasionally encounters fatal
irrecoverable errors during the crawling
of the Azure datasource.
When this happens, cloud-init crashes,
and Azure VM provisioning would fail.
However, instead of failing immediately,
the user will continue seeing provisioning
for a long time until it times out with
"OS Provisioning Timed Out" message.
In these situations, cloud-init should
report failure to the Azure datasource
endpoint indicating provisioning failure.
The user will immediately see provisioning
terminate, giving them a much better
failure experience instead of pointlessly
waiting for OS provisioning timeout.
Additional Context
Additional context in the proposed commit message.
Test Steps
Test: No regression for pre-existing report ready workflow
Test: Report failure to Azure upon Azure crawl metadata fatal exception
crawl_metadata
and add araise Exception
before the return statement. Tthis ensures a fatalcrawl_metadata
implementation, which mimics a fatal irrecoverable error during cloud-init's crawling of Azure metadata.OSProvisioningInternalError
. It should look like the following:Checklist: