vmpooler/spec/unit
mattkirby 070199e877 Eliminate duplicate VM object lookups where possible (#269)
* Minimize duplicate checking of VMs

This commit updates check_pool pending, running and ready methods to greatly reduce instances in which the VM object is retrieved. Without this change get_vm is run for each of these check_pool steps even though the VM is already validated as being in inventory being running the check. This is left for checking running VMs when the VM is no longer ready. Without this change there is an unnecessarily large volume of VM object checks.

* Make hostname mismatch checking optional

This commit makes hostname mismatch checking optional on a pool and global config level. The default behavior of checking this is preserved. When disabled _check_ready_vm will not run get_vm, which allows for ready VMs to be checked without retrieving an object from vsphere and waiting for a free provider connection. Without this change it is not possible to disable VM object retrieval in _check_vm_ready.

* Check if a hostname return is empty string

This commit checks whether a hostname returned is an empty string.
Without this change a VM that returns a hostname with a empty string
will report as having a hostname mismatch, which may happen before all
VM data is updated.

* Only check hostname for mismatch after time since ready has past

Configure hostname checking so it is not checked until a VM has been
ready for greater than one minute. Without this change hostname checking
will often fail because the configured value has not propogated to the
VM on some platforms before this check is run.
2018-07-13 12:06:44 -05:00
..
api (POOLER-113) Add support for multiple LDAP search bases 2018-06-25 21:37:22 -07:00
providers (MAINT) Fix test reference to find_vm 2018-07-09 14:57:07 -07:00
generic_connection_pool_spec.rb (POOLER-52) Add recovery to vSphere connections 2017-05-17 13:52:28 -07:00
pool_manager_spec.rb Eliminate duplicate VM object lookups where possible (#269) 2018-07-13 12:06:44 -05:00
vmpooler_spec.rb Allow user to specify a configuration file in VMPOOLER_CONFIG_FILE 2018-01-23 15:51:10 -08:00