Bug #6518
closedforeman sometimes picks the wrong bmc smart proxy
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.
Updated by Brian Witt over 10 years ago
I've submitted PR 1569
https://github.com/theforeman/foreman/pull/1569
Updated by Dominic Cleal over 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
Updated by Brian Witt over 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.
Updated by Brian Witt over 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.
Updated by The Foreman Bot over 10 years ago
- Pull request https://github.com/theforeman/foreman/pull/1608 added
Updated by Dominic Cleal over 10 years ago
- Translation missing: en.field_release set to 10
Updated by Daniel Lobato Garcia over 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 57a32e9828bd7cb1900024cc87c7386fd5582aca.