Created attachment 666103 [details] 3EAP Description of problem: It is possible to inventory/import the same EAP standalone server twice for the same platform using import from inventory and import from discovery queue by using hostname from one place and IP from the other. Version-Release number of selected component (if applicable): JON 3.1.2 How reproducible: always Steps to Reproduce: 1. Start eap server in some port 2. Import platform from discovery queue (without eap server) 3. Import EAP server manually Actual results: The EAP server in discovery queue stays as new and it is possible to inventory the server "again" - which leads to having two servers. Expected results: EAP server in discovery queue is marked as accepted/inventoried and it is not possible to inventory the same server more than 1 time. Additional info: I have installed EAP on machine without hostname - hostname is localhost and EAP had IP 127.0.0.1 - imported manually EAP twice - with using 127.0.0.1 and localhost as hostname and then inventoried/imported EAP server from discovery queue. please get attached screenshot with having 2 and 3 same EAP server in JBoss Standalone Application Servers list.
Created attachment 666104 [details] 2EAP
This seems like a scenario in where the manually imported resource is getting a different key then the one in the discovery queue. The agent should reconcile the two resources but in this case, it doesn't appear to be the case.
This is still possible for any resource type that generates a different resource key when imported manually than when autodiscovered. AS7 Standalone servers, for example, will generate a key like this when auto-discovered: hostConfig: C:\app\jboss\jboss-eap-6.1\standalone\configuration\standalone-full- rhq.xml And like this when imported: hostPort: localhost:9990 It may be that the same key is not easy to generate in the different scenarios, I'm not sure. The question is whether this is a real-world issue or not. To a degree, manual import exists to add resource that *are not* able to be autodiscovered. So this may just be a manufactured issue and perhaps one we can leave documented here but not expend further effort on avoiding.
If work has to be done here it would be plugin code for relevant plugins. In this case the AS7 plugin could potentially add config path to the import parameters, used as an alternative to host:port. Or possible given host:port try and determine if this was a co-located install and convert host:port to config path. But the point is, import is really for when you can't autodiscover, and that means remote servers. I don't think work should be done here, I think we can close this as not a bug.
Re-targeting given feedback from triage team.
JBoss ON is coming to the end of its product life cycle. For more information regarding this transition, see https://access.redhat.com/articles/3827121. This bug report/request is being closed. If you feel this issue should not be closed or requires further review, please create a new bug report against the latest supported JBoss ON 3.3 version.