mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
(POOLER-89) Identify when config issue is present
This commit adds vmpooler inspection of configuration issues to host selection. Specifically, configIssue is checked, which should allow an issue like quickstats not being reported to be identified even when the alarm will not trigger. Without this change a host will continue to be used if quickstats are not reported when alarms are not triggered because of this condition, which results in a single host being the target for all deploys and migrations, overloading the host and causing its VMs to have degraded performance.
This commit is contained in:
parent
03e8933d2b
commit
2f5e43284d
3 changed files with 16 additions and 1 deletions
|
|
@ -83,7 +83,9 @@ MockHostSystem = Struct.new(
|
|||
# From HostSystem
|
||||
:capability, :config, :configManager, :datastore, :datastoreBrowser, :hardware, :network, :runtime, :summary, :systemResources, :vm,
|
||||
# From ManagedEntity
|
||||
:overallStatus, :name, :parent
|
||||
:overallStatus, :name, :parent,
|
||||
# From ManagedObject
|
||||
:configIssue
|
||||
)
|
||||
|
||||
MockPropertyCollector = Struct.new(
|
||||
|
|
@ -507,6 +509,7 @@ def mock_RbVmomi_VIM_HostSystem(options = {})
|
|||
options[:overall_cpu_usage] = 1 if options[:overall_cpu_usage].nil?
|
||||
options[:overall_memory_usage] = 1 if options[:overall_memory_usage].nil?
|
||||
options[:name] = 'HOST' + rand(65536).to_s if options[:name].nil?
|
||||
options[:config_issue] = [] if options[:config_issue].nil?
|
||||
|
||||
mock = MockHostSystem.new()
|
||||
mock.name = options[:name]
|
||||
|
|
@ -527,6 +530,7 @@ def mock_RbVmomi_VIM_HostSystem(options = {})
|
|||
|
||||
mock.runtime.inMaintenanceMode = options[:maintenance_mode]
|
||||
mock.overallStatus = options[:overall_status]
|
||||
mock.configIssue = options[:config_issue]
|
||||
|
||||
mock.summary.hardware.memorySize = options[:memory_size]
|
||||
mock.hardware.memorySize = options[:memory_size]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue