-
Notifications
You must be signed in to change notification settings - Fork 372
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
Conversation
azurelinuxagent/ga/exthandlers.py
Outdated
return | ||
if not isinstance(data, list): | ||
raise ExtensionStatusError(msg="The extension status must be an array: {0}".format(data), code=ExtensionStatusError.StatusFileMalformed) |
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.
Data would contain the complete content of the status file, wont that be too verbose if the extension status is huge (multiple substatuses, etc)?
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.
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.
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.
actually, the error message also goes to telemetry... let me check if we truncate or if a large message would drop the event
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.
yes, greater that 64512 we would drop the event. i'll truncate at 4K
If the status for one extension is not an array, the agent fails to report status for all extensions