Project

General

Profile

Actions

Bug #6518

closed

foreman sometimes picks the wrong bmc smart proxy

Added by Brian Witt almost 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
BMC
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

We have a setup with several smart proxies. Sometimes when loading a host page and clicking on the 'BMC' tab, we'll see
Failure: ERF12-1772 [ProxyAPI::ProxyException]: Unable to perform power BMC operation ([RestClient::BadRequest]: 400 Bad Request) for proxy <wrong smart proxy>

Somehow it's picking the wrong smart proxy, even though all the settings are correct. (subnet for the bmc interface is correct, ip address, mac is correct)

AND it seems to work 4/5 of the time, only picking the wrong one 1 out of 5.

Actions #2

Updated by Dominic Cleal almost 10 years ago

  • Category set to BMC
  • Status changed from New to Ready For Testing
  • Assignee set to Brian Witt
  • Target version set to 1.8.0
Actions #3

Updated by Brian Witt almost 10 years ago

I forgot to mention, that in those lines in app/models/nic/bmc.rb:28-29

SmartProxy.with_features("BMC").joins(:subnets).where(['dhcp_id = ? or tftp_id = ?', subnet_id, subnet_id]).first if subnet_id
proxy ||= SmartProxy.with_features("BMC").first

seems to always fail (i.e. it always picks the 'first' one), even when foreman picks the right proxy (or at least I see the status appear on the bmc tab). So I'm not sure what's going on there.

Actions #4

Updated by Brian Witt almost 10 years ago

The 'first' one is not reachable by foreman normally, so when it fails I see a connection error to that first smart proxy. The other times when it works I presume it's actually talking to the right smart proxy, even though the 'proxy' var in the code is set to the 'first' (unreachable) one.

Actions #5

Updated by The Foreman Bot almost 10 years ago

  • Pull request https://github.com/theforeman/foreman/pull/1608 added
Actions #6

Updated by Dominic Cleal almost 10 years ago

  • translation missing: en.field_release set to 10
Actions #7

Updated by Daniel Lobato Garcia almost 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF