Skip to content

Add content update to init process #421

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

Merged
merged 7 commits into from
May 20, 2025

Conversation

AlexRuiz7
Copy link
Member

@AlexRuiz7 AlexRuiz7 commented May 15, 2025

Description

This PR adds the content update mechanism to the content manager start up process.

Also improves logging and fixes some small issues.

Caution

Several bugs were found when the Content Updater was added to the initialization process. Some of them have been addressed in this PR, while other will be addressed on dedicated issues. Therefore, don't expect this PR to complete the update process successfully. Just check for the lifecycle of the plugin (the update process starts when the offsets are different). See #429.

Issues Resolved

Closes #420

@AlexRuiz7 AlexRuiz7 self-assigned this May 15, 2025
@AlexRuiz7 AlexRuiz7 linked an issue May 19, 2025 that may be closed by this pull request
@AlexRuiz7 AlexRuiz7 marked this pull request as ready for review May 19, 2025 16:27
@AlexRuiz7 AlexRuiz7 requested a review from a team as a code owner May 19, 2025 16:27
Copy link
Member

@QU3B1M QU3B1M left a comment

Choose a reason for hiding this comment

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

LGTM!

The referenced error is being raised, but everything else is working correctly

[2025-05-20T10:41:38,565][INFO ][c.w.c.u.SnapshotManager  ] [indexer-1] Consumer already initialized (offset 1950913 != 0). Skipping...
[2025-05-20T10:41:38,582][INFO ][c.w.c.i.ContextIndex     ] [indexer-1] Fetched consumer from the [wazuh-context] index: ConsumerInfo{context='vd_1.0.0', name='vd_4.8.0>
[2025-05-20T10:41:38,583][INFO ][c.w.c.u.ContentUpdater   ] [indexer-1] Updating [wazuh-cve]
[2025-05-20T10:41:38,817][INFO ][c.w.c.c.CTIClient        ] [indexer-1] Operation succeeded: status code 200
[2025-05-20T10:41:38,863][INFO ][c.w.c.i.ContentIndex     ] [indexer-1] Patching [wazuh-cve] from offset [1950914] to [1951913]
[2025-05-20T10:41:38,888][ERROR][c.w.c.i.ContentIndex     ] [indexer-1] Failed to patch [CVE-2022-49011] due to StrictDynamicMappingException[mapping set to strict, dynamic introduction of [context] within [_doc] is not allowed]
[2025-05-20T10:41:38,888][ERROR][c.w.c.u.ContentUpdater   ] [indexer-1] Updated finally failed on offset [1950913]

@AlexRuiz7 AlexRuiz7 merged commit 2cefdcb into 6.0.0 May 20, 2025
12 checks passed
@AlexRuiz7 AlexRuiz7 deleted the 420-add-content-update-to-init-process branch May 20, 2025 11:24
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.

Add content update to the initialization process
2 participants