vmwarereqtool is initializing the DB Pool

Description

Working with a customer, I figured out that the production environment was running out of connections while running vmwarereqtool.

The purpose of vmwareqtool is to use the VMWare protocol handler to generate the requisition from vCenter, which doesn't require access to the OpenNMS Database, use the DAOs or any other service/component managed by Spring.

I think that some initialization procedure is triggering the Spring Initialization, so the idea is avoid this in order to be able to run the tool without the need to increase max-connections on postgresql.conf

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Alejandro Galue February 11, 2014 at 11:30 AM

Fixed on revision 420b3faf25c1003a38a15c592708e01d485c4249 for 1.12

Alejandro Galue February 11, 2014 at 11:26 AM

The idea is to refactor org.opennms.netmgt.provision.service.vmware.VmwareRequisitionTool to parse vmware-config.xml and retrieve the credentials if the URL doesn't have them.

Alejandro Galue February 11, 2014 at 10:43 AM

Looking at the code of the method org.opennms.netmgt.provision.service.vmware.VmwareRequisitionUrlConnection.buildVMwareRequisition(), the only way to avoid initialize Spring is by forcing the username/password on the URL when calling the vmwarereqtool, otherwise, BeanUtils will be used to parse vmware-config.xml.

To be more specific, if the credentials are provided, VmwareViJavaAccess is not going to initialize VmwareConfigDao, otherwise, it is going to be initialized and that's requires Spring.

Fixed

Details

Assignee

Reporter

Labels

Fix versions

Affects versions

Priority

PagerDuty

Created February 7, 2014 at 8:38 AM
Updated January 27, 2017 at 4:20 PM
Resolved February 11, 2014 at 11:30 AM

Flag notifications