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

Ensure all NVT preference names are in the new format #744

Merged
merged 17 commits into from
Sep 23, 2019

Conversation

mattmundell
Copy link
Contributor

@mattmundell mattmundell commented Sep 8, 2019

This uses a hardcoded list of NVT preference names to ensure that all
NVT preferences that are in the form OID:TYPE:NAME are converted
to the form OID:ID:TYPE:NAME.

OID:TYPE:NAME was the result of migrate_205_to_206 from #394. Here
we introduce migrate_219_to_220.

The OID:ID:TYPE:NAME format was introduced in /pull/413.

Checklist:

@mattmundell mattmundell marked this pull request as ready for review September 8, 2019 11:48
Copy link
Member

@timopollmeier timopollmeier left a comment

Choose a reason for hiding this comment

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

In my test run there were several timeout entries in nvt_preferences that were not replaced by the migrator.

The migrator or maybe the part of manage_update_nvt_cache_osp that calls check_preference_names should rename preferences like [...]:entry:timeout to [...]:0:entry:timeout (inserting the id :0).
We already assume that the timeout has the id 0 elsewhere, so it should be okay.

I think updating the timeouts near the start of the migrator would be the best place to prevent warnings about unknown preference names.

@mattmundell
Copy link
Contributor Author

In my test run there were several timeout entries in nvt_preferences that were not replaced by the migrator.

The migrator or maybe the part of manage_update_nvt_cache_osp that calls check_preference_names should rename preferences like [...]:entry:timeout to [...]:0:entry:timeout (inserting the id :0).
We already assume that the timeout has the id 0 elsewhere, so it should be okay.

I think updating the timeouts near the start of the migrator would be the best place to prevent warnings about unknown preference names.

Should be solved by b594763.

@mattmundell
Copy link
Contributor Author

And with b594763 there should no longer be unknown preferences (both old or new format) in nvt_preferences after the first sync.

@mattmundell mattmundell requested review from timopollmeier and removed request for timopollmeier September 19, 2019 18:14
@timopollmeier timopollmeier merged commit 4a97076 into greenbone:master Sep 23, 2019
@mattmundell mattmundell deleted the nvt-prefs branch October 25, 2019 11:51
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.

2 participants