Bug 535064 (RHQ-179) - Resource version not updated after patch is applied
Summary: Resource version not updated after patch is applied
Keywords:
Status: CLOSED NEXTRELEASE
Alias: RHQ-179
Product: RHQ Project
Classification: Other
Component: Content
Version: 1.0
Hardware: All
OS: All
high
medium
Target Milestone: ---
: ---
Assignee: Jason Dobies
QA Contact:
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
: RHQ-175 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-03-24 20:56 UTC by Jessica Sant
Modified: 2009-11-11 17:20 UTC (History)
0 users

Fixed In Version: 1.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
r389, r9721, fedora8, postgres
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Jessica Sant 2008-03-24 20:56:00 UTC
For a JBoss patch, the resource version changes as a result of the package deployment. We need some way to trigger that update to the resource version.

Comment 1 Ian Springer 2008-03-25 00:33:43 UTC
r394 should fix this. However, I'm unable to test it, because I'm running Oracle, and http://jira.rhq-project.org/browse/RHQ-160 prevents me from being able to upload a new package. Jess, would you please test this out on your system and let me know if it does the trick.


Comment 2 Ian Springer 2008-03-25 01:27:47 UTC
r395 refactors the impl slightly.


Comment 3 Jason Dobies 2008-03-25 14:03:49 UTC
This smells kinda hacky. Why is there code specifically for updating resource versions in the content manager? 

Comment 4 Jason Dobies 2008-03-25 14:06:05 UTC
That code should also move to inside of the CreateContentRunner thread. As it stands now, if this scan for some reason throws an error, the entire package deployment will be marked as failed, which shouldn't be the case. This should be handled in the same way as the package discovery scan, if this resource discovery should even be done at all.

Comment 5 Ian Springer 2008-03-25 14:30:07 UTC
Yeah, CreateContentRunner looks like a better place for it. And I guess simply logging an error if an exception occurs during the scan makes sense, otherwise the system's going to be in a different state than what we're telling the user. Also, hopefully the resource scan throwing an exception will be very rare.

As for whether the resource discovery should be done at all, if we want the resource versions to be updated, that's what needs to be done.


Comment 6 Jason Dobies 2008-03-25 14:41:13 UTC
Ya, I see what you're saying about that discovery being necessary to get the resource versions updated. I'm just concerned it doesn't really make sense to hammer the agent with both a package and resource discovery for something that (arguably) only needs to be done for the JBoss patching use case. I'll give it some thought and move the call for it into the runner when I figure out what feels cleanest.

Comment 7 Charles Crouch 2008-03-25 14:42:09 UTC
Making this critical since its dupe, RHQ-175, was

Comment 8 Ian Springer 2008-03-25 14:49:37 UTC
Maybe add a updatesResourceVersion="true" flag to either the install-package request or the metadata for the package type, and then only do the resource scan if that flag is set.


Comment 9 Jason Dobies 2008-03-25 14:56:49 UTC
This also looks like it triggers a full discovery. Why didn't you scope the discovery to at least the resource type we know was affected?

Comment 10 Jason Dobies 2008-03-25 15:01:31 UTC
Changed the issue entirely. After the initial posting, all of the comments/bug fixes were related to resource version updates. The original purpose of this issue was related to package versions on the resource, which is an entirely different issue. I'll create a new JIRA for that.

Comment 11 Jason Dobies 2008-03-25 15:03:20 UTC
Original purpose of this JIRA captured in RHQ-185.

Comment 12 Ian Springer 2008-03-25 15:19:54 UTC
>> This also looks like it triggers a full discovery. Why didn't you scope the discovery to at least the resource type we know was affected?

Because if a CP is applied to an AS server, in addition to updating the server's version, it could theoretically also update the versions of child services - sort of similar to the cascading for package versions that RHQ-185 addresses.




Comment 13 Jason Dobies 2008-03-25 15:36:37 UTC
Ah, ok. So am I reading this wrong or will this discovery also scan resources that are outside of that resource's hierarchy? I might be making too much out of this, trying to scope the discovery to the minimal scale it needs to be, but I'm still just not all that comfortable with the idea of having so many pieces start to move following a package deployment.

Comment 14 Ian Springer 2008-03-25 15:46:57 UTC
No, you're reading it right - the scans are not limited to that resource's hierarchy (but they are limited to its category and below). Hierarchy-limited scans would certainly be more efficient, but it would require adding new methods to the InventoryManager that support that, which I didn't think was worth doing for 2.0.


Comment 15 Jason Dobies 2008-03-25 15:50:05 UTC
Ya, I agree that for now, it's not worth the investment to tweak the InventoryManager to have more flexible scanning.

Comment 16 Jason Dobies 2008-03-26 15:27:18 UTC
r414 - Moved discovery logic so it doesn't interfere with the actual deployment request.

For now, going to leave the resource discovery as part of the deploy workflow. Going forward, this may end up changing in some capacity, potentially such as the resource discovery being triggered by package metadata.

Comment 17 Red Hat Bugzilla 2009-11-10 20:46:54 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-179


Comment 18 David Lawrence 2009-11-11 17:20:53 UTC
*** Bug 535020 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.