InventoryManager change?

Adrian Brock abrock at cloudbees.com
Tue Oct 19 14:02:11 UTC 2010


Hi John,

On 19 October 2010 13:51, John Mazzitelli <mazz at redhat.com> wrote:

> This seems to make sense. However, I question blindly setting the status
> to COMMITTED. I'm thinking it might also be possible that the existing
> resource could be appropriately be in the NEW state - and in that case,
> setting it to COMMITTED here might be wrong.
>
>
Looking at the parent status might be more accurate?


> That's just a theory - I can't say for sure if, at this point in the
> code, the resource could be in any other state other than COMMITTED. We
> may need to put some kind of conditional around this, say something like:
>
> if (existingResource.getInventoryStatus() == InventoryStatus.DELETED) {
>    existingResource.setInventoryStatus(InventoryStatus.COMMITTED)
> }
>
> I'm assuming you stepped through this in a debugger - what state was the
> existingResource in at that point in this mergeResourceFromDiscovery
> method?
>


It was DELETED. Which is what causes the problem.
You remove a service then try to put it back, but it stays DELETED.


> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://fedorahosted.org/pipermail/rhq-devel/attachments/20101019/3589ca33/attachment.html 


More information about the rhq-devel mailing list