#3055 number range depletion when multiple clones created from same master
Closed: fixed 5 years ago Opened 5 years ago by ftweedal.

Clone of https://pagure.io/freeipa/issue/7654.

When multiple clones are created from a single master (which is also a clone)
the depletion of the master's number range(s) can occur, causing cloning failure.
There are two specific issues:

  1. If the master's current range has been depleted due a previous UpdateNumberRange request, Repository.getTheSerialNumber() returns null because the next serial number is out of the current range, but the next range has not been activated yet. A NullPointerException occurs.

  2. Similar to (1), but it is possible (though unlikely) that a next range has not even been assigned to the master.

Long term, a better solution would be that instead of the master delegating part of its own range to the new clone, it create a full range assignment for the new clone. This will require changes to the UpdateNumberRange protocol.

For now, we should at least address (1) to ensure that a range delegation that depletes a clone's current range does not cause a subsequent clone creation to fail.


Metadata Update from @ftweedal:
- Custom field component adjusted to None
- Custom field feature adjusted to None
- Custom field origin adjusted to None
- Custom field proposedmilestone adjusted to None
- Custom field proposedpriority adjusted to None
- Custom field reviewer adjusted to None
- Custom field type adjusted to None
- Custom field version adjusted to None

5 years ago

Fix pushed to master:

* 128628693d51adf753750f7ac1307ec246822db9 Add missing synchronisation for range management
* 44be5837503efa4b2b44718379ebaebcebd805ab UpdateNumberRange: improve logging, add commentary
* 925ef2637f01d5aff0306d9b70c8a6b916d8b74e checkRange: small refactor and add commentary
* 3b57d324ed9eea61b828aea4801ac7abe8139859 rename method getTheSerialNumber -> peekNextSerialNumber
* 8011d2d74ad40142b1762e514d3db58d69fb89b0 Repository: handle depleted range in initCache()
* b5ddac86a266bbb9dbd3cb70c70c9de0b2dcc0e7 getTheSerialNumber: only return null if next range not available

Metadata Update from @ftweedal:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

5 years ago

See also https://pagure.io/dogtagpki/issue/3106 (switch to standby range on startup if current range empty/depleted, instead of failing with error).

Metadata Update from @mharmsen:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1748766

4 years ago

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/3173

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Login to comment on this ticket.

Metadata