InventoryManager change?

John Mazzitelli mazz at redhat.com
Tue Oct 19 15:56:28 UTC 2010


I captured this thread in bugzilla:

https://bugzilla.redhat.com/show_bug.cgi?id=644409

On 10/19/2010 10:02 AM, Adrian Brock wrote:
> Hi John,
>
> On 19 October 2010 13:51, John Mazzitelli <mazz at redhat.com
> <mailto: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.


More information about the rhq-devel mailing list