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

VLV index checks #151

Open
frasertweedale opened this issue Sep 16, 2020 · 7 comments
Open

VLV index checks #151

frasertweedale opened this issue Sep 16, 2020 · 7 comments

Comments

@frasertweedale
Copy link
Contributor

VLV indices are used by Dogtag instances to work out what the next available number is, in the various managed ranges (serials, request IDs, replica IDs, key IDs, etc). If the VLV index becomes incomplete or corrupt, Dogtag attempts to add objects that already exist and operations such as certificate requests fail.

We should add a healthcheck to check relevant VLV indices against the actual database contents and detect inconsistencies.

This is a prime candidate for auto-remediation, too. All that should be required is to create a reindex task.

@rcritten
Copy link
Collaborator

How does one know that the VLV index is incomplete or corrupt?

1 similar comment
@rcritten
Copy link
Collaborator

How does one know that the VLV index is incomplete or corrupt?

@frasertweedale
Copy link
Contributor Author

@rcritten I'll blog about it, and I shall write a script to automate checking it (it will be helpful for Support). But at a high level it goes like this:

  1. Decide an upper bound, e.g. the limit of the identifier range of interest. This is the target attribute value h.
  2. Perform a normal (no sort, no VLV) ldapsearch for all the objects of the relevant type
  3. Perform a VLV search for the target value h and n preceding values (n = 1 is probably fine)
  4. Ignore VLV results where the target attribute value > h.
  5. Take VLV result having target attribute of least value, l.
  6. Compare the results from the VLV search against the normal search. If there are any objects with target attribute value >= l and <= h, but which are not in the VLV result, then the VLV index is incomplete or corrupt.

@frasertweedale
Copy link
Contributor Author

frasertweedale commented Sep 17, 2020

@tscherf
Copy link
Contributor

tscherf commented Feb 9, 2021

@rcritten - Rob, should we clone the ticket into BZ? We have so many customers running into this issue that I'd really like to prioritize the development of this check.

@rcritten
Copy link
Collaborator

rcritten commented Feb 9, 2021

Sure, feel free.

@tscherf
Copy link
Contributor

tscherf commented Feb 9, 2021

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

No branches or pull requests

3 participants