Class: Bosh::Director::ProblemHandlers::UnresponsiveAgent

Inherits:
Base
  • Object
show all
Defined in:
lib/bosh/director/problem_handlers/unresponsive_agent.rb

Constant Summary

Constants included from CloudcheckHelper

CloudcheckHelper::DEFAULT_AGENT_TIMEOUT

Instance Attribute Summary

Attributes inherited from Base

#data, #job

Instance Method Summary collapse

Methods inherited from Base

action, action_for, #apply_resolution, auto_resolution, #auto_resolution, #auto_resolve, #checkpoint, #cloud, create_by_type, create_from_model, get_auto_resolution, inherited, init_dsl_data, plan, plan_for, register_as, resolution, #resolution_plan, #resolutions

Methods included from CloudcheckHelper

#delete_vm, #delete_vm_from_cloud, #delete_vm_reference, #reboot_vm, #recreate_vm, #recreate_vm_skip_post_start

Constructor Details

#initialize(instance_id, data) ⇒ UnresponsiveAgent

Returns a new instance of UnresponsiveAgent.



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/bosh/director/problem_handlers/unresponsive_agent.rb', line 8

def initialize(instance_id, data)
  super
  @instance = Models::Instance.find(id: instance_id)

  unless @instance.vm_cid
    handler_error("VM '#{@instance.vm_cid}' is no longer in the database")
  end

  unless @instance.agent_id
    handler_error("VM '#{@instance.agent_id}' doesn't have an agent id")
  end
end

Instance Method Details

#descriptionObject



21
22
23
# File 'lib/bosh/director/problem_handlers/unresponsive_agent.rb', line 21

def description
  "#{@instance} (#{@instance.vm_cid}) is not responding"
end