Red Hat Bugzilla – Bug 1309407
[RFE] Add new API method to support processing updates to hypervisor-guest mappings using diffs only
Last modified: 2018-06-15 18:25:35 EDT
* What *
A new API method for Candlepin that allows submission of updates to host guest mappings in the form of "diffs". These diffs would include any changes in a particular report annotated with whether the data was added, removed, or changed. (Much like the sorts of diffs that git generates).
Presently there is no API method to do this.
* Why *
This allows us to send much smaller sets of changes from virt-who and should allow us to process the changes more quickly. Most importantly this will allow us to scale the virt-who processing bits independently of the rest of candlepin. (Add more worker threads processing diffs that are coming off the queue).
This also opens up the option of other tools providing us with this information (as the other tools can submit just their changes)
* How *
While it is entirely up to the person(s) who implement it I have a few suggestions (based on my discussions with bcourt and alikins).
The method should accept a diff and place the diff in a durable queue (ensuring that the diffs are applied in order). To support diffs coming from multiple virt-who instances about the same server, a timestamp from the server must be included and used to accept or reject the request.
As part of differentiating reports from multiple virt-who servers Candlepin will have to choose a primary server that is currently being listened to and if another server checks in, the reports will have to be ignored until some timeout occurs and then Candlepin will select a new primary to listen to.
When a new primary is selected Candlepin will respond to the first diff report from the new primary with a request for a full report. After a full report from the new primary has been processed differential updating will continue from the new primary.