-
Notifications
You must be signed in to change notification settings - Fork 153
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
Add --rebuild #998
Add --rebuild #998
Conversation
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.
The changes look okay so far, but I think rebuilding the NVTs should also rebuild the
result_nvts
table (maybe using the cleanup_result_nvts
function) while the update option could also run the cleanup.
Shouldn't we just use one command? I don't know why we should not clean up the db before requesting all nvts. I am really sure we always want to clear the db if the command is issues in GOS. |
I'm not sure why rebuilding result_nvts would be necessary. result_nvts associates IDs with all the NVT OIDs that occurr in results, to improve performance, regardless of whether the OIDs appear in the nvts table. And we already have cleanup_result_nvts, so the user could call that after --rebuild/update if they needed to. |
Done in a369c3a. |
Thanks a lot! |
This adds back the --rebuild option.
This option should not be required in normal operation, and is added only to force a rebuild when errors have resulted in mismatches between the gvmd and ospd-openvas NVTs.
--rebuild will remove all the gvmd NVTs, then add all NVTs from the scanner.
Note that this option is different from gvmd's automatic sync of NVTs, which will only consider NVTs that have been created/modified since the last sync.
Checklist: