Bug 536579 (RHQ-914)
Summary: | Agent deletion, either implicit or explicit | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Jay Shaughnessy <jshaughn> |
Component: | Core Server | Assignee: | John Mazzitelli <mazz> |
Status: | CLOSED NEXTRELEASE | QA Contact: | Corey Welton <cwelton> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 1.1 | Keywords: | Improvement |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://jira.rhq-project.org/browse/RHQ-914 | ||
Whiteboard: | |||
Fixed In Version: | 1.3 | Doc Type: | Enhancement |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: |
Any
|
|
Last Closed: | Type: | --- | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jay Shaughnessy
2008-10-01 15:53:00 UTC
SQL to clean out agents with no resources: delete from RHQ_FAILOVER_DETAILS where id in (select failoverli0_.id from RHQ_FAILOVER_DETAILS failoverli0_ inner join RHQ_FAILOVER_LIST failoverli1_ on failoverli0_.FAILOVER_LIST_ID=failoverli1_.ID where failoverli1_.AGENT_ID not in (select resource2_.AGENT_ID from RHQ_RESOURCE resource2_)) ; delete from RHQ_FAILOVER_LIST failoverli0_ where failoverli0_.AGENT_ID not in (select resource1_.AGENT_ID from RHQ_RESOURCE resource1_) ; delete from RHQ_AGENT a where a.id not in (select res.AGENT_ID from RHQ_RESOURCE res) This can be used to cleanup if you've got a lot of stranded agent records messing up HA. Can be run from /admin/test/sql.jsp Targeting fix due to support case the original code that did this can be seen by doing an svn diff on ResourceManagerBean, svn rev 597 and 639 - the change is to method "public List<Integer> deleteResource(Subject user, Integer resourceId)" Can we please fix this? We might also want a way to change an agent's name (RHQ_AGENT.name) in the case people want to/need to change the agent's internal name. this is needed in order to change the agent's internal name. If we fix this issue, then RHQ-1245 might not be needed. we must fix this in the next release. too many people are running into issues when they need to purge agents. agent is now purged from rhq_agent and the failover tables to test import an agent shutdown the agent delete the agent's platform select * from rhq_agent and make sure the agent row is deleted QA Verified, after platform is removed, running the sql listed above shows that agent is gone. This bug was previously known as http://jira.rhq-project.org/browse/RHQ-914 This bug relates to RHQ-1187 This bug incorporates RHQ-1245 |