fog-google icon indicating copy to clipboard operation
fog-google copied to clipboard

TargetPool.get_health should return better output

Open Temikus opened this issue 7 years ago • 1 comments

Currently:

target_pool.get_health(server.name)
=> {"https://www.googleapis.com/compute/v1/projects/REDACTED/zones/us-central1-f/instances/fog-test-1-testtargetpools-test-get-health"=>
  [{:health_state=>"UNHEALTHY",
    :instance=>"https://www.googleapis.com/compute/v1/projects/REDACTED/zones/us-central1-f/instances/fog-test-1-testtargetpools-test-get-health"}]}

or without parameters

 target_pool.get_health()
=> {"https://www.googleapis.com/compute/v1/projects/REDACTED/zones/us-central1-f/instances/fog-test-1-testtargetpools-test-get-health"=>
  [{:health_state=>"UNHEALTHY",
    :instance=>"https://www.googleapis.com/compute/v1/projects/REDACTED/zones/us-central1-f/instances/fog-test-1-testtargetpools-test-get-health"}],
 "https://www.googleapis.com/compute/v1/projects/REDACTED/zones/us-central1-f/instances/fog-test-2-testtargetpools-test-get-health"=>[]}

Ideally this should just return state:

  • HEALTHY
  • UNHEALTHY
  • UNKNOWN , that's it.

Or, at the very least the target_pool.get_health(server.name) should not return the self link twice.

P.S. Notice the '=>[]' for the second instance. Apparently that means "No instance health info was found." That's new to me 😕

Temikus avatar Jul 17 '18 01:07 Temikus

This issue has been marked inactive and will be closed if no further activity occurs.

github-actions[bot] avatar Apr 18 '21 02:04 github-actions[bot]