Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 665806 Details for
Bug 887411
committing/ignoring/unignoring resource causes agent sync to purge all resources
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed fix for the problem
bz887411.patch (text/plain), 3.40 KB, created by
John Mazzitelli
on 2012-12-18 22:36:15 UTC
(
hide
)
Description:
proposed fix for the problem
Filename:
MIME Type:
Creator:
John Mazzitelli
Created:
2012-12-18 22:36:15 UTC
Size:
3.40 KB
patch
obsolete
>diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java >index 473b0d0..eaca661 100644 >--- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java >+++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/inventory/InventoryManager.java >@@ -1087,7 +1087,24 @@ public class InventoryManager extends AgentService implements ContainerService, > return true; > } > >+ /** >+ * Performs a sync so that resources passed in are reflected in the agent's inventory. >+ * This assumes the resource sync infos passed in represent the full inventory tree. >+ * >+ * @param syncInfo information on all resources in the entire inventory tree >+ */ > private void synchInventory(ResourceSyncInfo syncInfo) { >+ synchInventory(syncInfo, false); >+ } >+ >+ /** >+ * Performs a sync so that resources passed in are reflected in the agent's inventory. >+ * >+ * @param syncInfo the resources' sync data >+ * @param partialInventory if true, syncInfo represents only a partial inventory. >+ * if false, syncInfo represents the full inventory tree of all resources >+ */ >+ private void synchInventory(ResourceSyncInfo syncInfo, boolean partialInventory) { > log.info("Syncing local inventory with Server inventory..."); > long startTime = System.currentTimeMillis(); > Set<Resource> syncedResources = new LinkedHashSet<Resource>(); >@@ -1099,7 +1116,12 @@ public class InventoryManager extends AgentService implements ContainerService, > > // rhq-980 Adding agent-side logging to report any unexpected synch failure. > try { >- getAllUuids(syncInfo, allServerSideUuids); >+ // don't bother doing this if we are processing a partial inventory. >+ // allServerSideUuids is only ever used to purge obsolete resources, but we don't >+ // do that for partial inventories, so we don't need to prepare that collection for partials. >+ if (!partialInventory) { >+ getAllUuids(syncInfo, allServerSideUuids); >+ } > > log.debug("Processing Server sync info..."); > processSyncInfo(syncInfo, syncedResources, unknownResourceIds, modifiedResourceIds, deletedResourceIds, >@@ -1113,7 +1135,9 @@ public class InventoryManager extends AgentService implements ContainerService, > > mergeUnknownResources(unknownResourceIds); > mergeModifiedResources(modifiedResourceIds); >- purgeObsoleteResources(allServerSideUuids); >+ if (!partialInventory) { >+ purgeObsoleteResources(allServerSideUuids); >+ } > postProcessNewlyCommittedResources(newlyCommittedResources); > if (log.isDebugEnabled()) { > if (!deletedResourceIds.isEmpty()) { >@@ -2188,7 +2212,7 @@ public class InventoryManager extends AgentService implements ContainerService, > + "] and its descendants..."); > > // Get the latest resource data rooted at the given id. >- synchInventory(syncInfo); >+ synchInventory(syncInfo, true); // this method assumes we only get a single resource and its children (BZ 887411) > performServiceScan(syncInfo.getId()); // NOTE: This will block (the initial scan blocks). > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 887411
:
663870
| 665806