#3055 number range depletion when multiple clones created from same master
Closed: fixed 2 months ago by ftweedal. Opened 4 months 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

3 months 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)

2 months ago

Login to comment on this ticket.

Metadata