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

Verify that the extension status is an array #2010

Merged
merged 2 commits into from
Sep 16, 2020

Conversation

narrieta
Copy link
Member

If the status for one extension is not an array, the agent fails to report status for all extensions

return
if not isinstance(data, list):
raise ExtensionStatusError(msg="The extension status must be an array: {0}".format(data), code=ExtensionStatusError.StatusFileMalformed)
Copy link
Contributor

Choose a reason for hiding this comment

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

Data would contain the complete content of the status file, wont that be too verbose if the extension status is huge (multiple substatuses, etc)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I thought about truncating it, but I really want to capture the extension name if it is there. The verbosity wouldn't matter too much, I think. I can always truncate it to 1 or 2 K.

Copy link
Member Author

Choose a reason for hiding this comment

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

actually, the error message also goes to telemetry... let me check if we truncate or if a large message would drop the event

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, greater that 64512 we would drop the event. i'll truncate at 4K

azurelinuxagent/ga/exthandlers.py Show resolved Hide resolved
kevinclark19a
kevinclark19a previously approved these changes Sep 15, 2020
@narrieta narrieta merged commit 5d1f71f into Azure:develop Sep 16, 2020
@narrieta narrieta deleted the extension-status branch September 23, 2020 18:17
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