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

azure: remove cloud-init.log reporting via KVP #4715

Merged
merged 6 commits into from
Jan 22, 2024

Conversation

cjp256
Copy link
Contributor

@cjp256 cjp256 commented Dec 21, 2023

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.

@holmanb
Copy link
Member

holmanb commented Jan 3, 2024

@cjp256 Looks like tests are failing.

@cjp256
Copy link
Contributor Author

cjp256 commented Jan 4, 2024

@cjp256 Looks like tests are failing.

Thanks! Should be fixed now.

Copy link

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.)

@github-actions github-actions bot added the stale-pr Pull request is stale; will be auto-closed soon label Jan 19, 2024
Comment on lines -285 to -303
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
)
Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

@blackboxsw blackboxsw left a 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

@blackboxsw blackboxsw removed the stale-pr Pull request is stale; will be auto-closed soon label Jan 20, 2024
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]>
Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @cjp256

@blackboxsw blackboxsw merged commit bc2e24e into canonical:main Jan 22, 2024
29 checks passed
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.

4 participants