-
Notifications
You must be signed in to change notification settings - Fork 883
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: remove cloud-init.log reporting via KVP #4715
Conversation
f2df7dc
to
b419cfc
Compare
@cjp256 Looks like tests are failing. |
Thanks! Should be fixed now. |
Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close. If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging TheRealFalcon, and he will ensure that someone takes a look soon. (If the pull request is closed and you would like to continue working on it, please do tag TheRealFalcon to reopen it.) |
m_subp.assert_called_with(["dmesg"], capture=True, decode=False) | ||
|
||
for call_arg in publish_event.call_args_list: | ||
event = call_arg[0][0] | ||
self.assertNotEqual( | ||
event.event_type, azure.COMPRESSED_EVENT_TYPE | ||
) | ||
self.validate_compressed_kvps( | ||
reporter, | ||
2, | ||
[ | ||
log_content[-azure.MAX_LOG_TO_KVP_LENGTH :].encode(), | ||
extra_content.encode(), | ||
], | ||
) | ||
finally: | ||
instantiated_handler_registry.unregister_item( | ||
"telemetry", force=False | ||
) |
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.
It may be worth keeping unittest coverage of the dmesg functionality that is still retained.
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.
Good point, done! Moved the call to report_dmesg_to_kvp() up to the Azure data source to decouple it from the walinuxagent shim we'll eventually get rid of. report_compressed_event() is tested in the hyperv reporting handler. I didn't want to do it now, but in a future PR will consolidate these kvp bits into the kvp module.
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.
I think we need test coverage of the remaining report_dmesg_to_kvp
With the recent changes in failure reporting and diagnostics, the full log is unnecessary overhead. Rename push_log_to_kvp() => report_dmesg_to_kvp() now that it only captures the dmesg log. Signed-off-by: Chris Patterson <[email protected]>
Signed-off-by: Chris Patterson <[email protected]>
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.
LGTM! Thanks @cjp256
With the recent changes in failure reporting and diagnostics, the full log is unnecessary overhead.
Rename push_log_to_kvp() => report_dmesg_to_kvp() now that it only captures the dmesg log.