Project

General

Profile

Bug #7543

allow additional rubyipmi connection options to be passed through

Added by Jorick Astrego about 7 years ago. Updated over 6 years ago.

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

Description

Also no power/reboot button available

foreman_bmc_password_error.png View foreman_bmc_password_error.png 4.33 KB cropped screen shot of error Joshua Hoblitt, 11/26/2014 06:21 PM
Foreman bmc password error

Related issues

Related to Foreman - Bug #2749: Failed to fetch bmc information: undefined method `downcase' for nil:NilClassClosed2013-07-05
Related to Smart Proxy - Bug #10102: BMC query fails with 'undefined method downcase for nil:NilClassNew2015-04-09
Related to Foreman - Bug #10112: Allow user to define BMC driver / options per hardware modelNew2015-04-10
Related to Smart Proxy - Bug #10116: BMC is not able to use parameters passed in through bodyClosed2015-04-10

Associated revisions

Revision f4f52e0f (diff)
Added by Corey Osman over 6 years ago

Fixes #7543 - allow additional rubyipmi connection options to be passed
through

  • replaces some stubs with mock in other tests

History

#1 Updated by Joshua Hoblitt almost 7 years ago

I've encountered this error message as well with 1.6.3 and likely earlier releases. I'm not sure if this is the only way to get the error message but I've been able to reproduce it by both setting an incorrect password on the bmc interface and changing the password on the bmc via ipmi.

#2 Updated by Joshua Hoblitt almost 7 years ago

  • Is duplicate of Bug #2749: Failed to fetch bmc information: undefined method `downcase' for nil:NilClass added

#3 Updated by Joshua Hoblitt almost 7 years ago

  • Is duplicate of deleted (Bug #2749: Failed to fetch bmc information: undefined method `downcase' for nil:NilClass)

#4 Updated by Joshua Hoblitt almost 7 years ago

  • Related to Bug #2749: Failed to fetch bmc information: undefined method `downcase' for nil:NilClass added

#5 Updated by Jorick Astrego almost 7 years ago

I think it has to do with the privilege level (-L <privlvl>]). My co-worker has added the ipmi users as "OPERATOR" instead of the all mighty "ADMINISTRATOR" privilege. This is good as it is not very secure to use the admin user for these things. I tested with an admin account and it works fine.

-L <privlvl>
Force session privilege level. Can be CALLBACK, USER, OPERATOR, ADMINISTRATOR. Default is ADMINISTRATOR.

So I tried modifiying "/usr/lib/ruby/gems/1.8/gems/rubyipmi-0.7.0/lib/rubyipmi/ipmitool/connection.rb"

        # default to IPMI 2.0 communication, this means that older devices will not work
        # Those old servers should be recycled by now, as the 1.0, 1.5 spec came out in 2005ish and is 2013.
        @options["L"] = "Operator" 
        @options["I"] = "lanplus" 

But that doesn't help. Anything else I have to modify to make this work?

#6 Updated by Marek Hulán over 6 years ago

is this a duplicate of #2749 which is now closed?

#7 Updated by Corey Osman over 6 years ago

Rubyipmi 0.8.1 supports passing in the privilege type, but you would need to expose this to the UI or make it a setting in the smart-proxy bmc settings file. Additionally, if we know the exact error message from the impi provider we can actually have rubyipmi react to the error message and try a different privilege type. It might be worth while to add a test connection function to rubyipmi and even additionally pass back a supported list of commands given the privilege type. I suspect the privilege type will change from host to host depending on manufacture of system.

#8 Updated by Corey Osman over 6 years ago

  • Subject changed from "Failure: undefined method `downcase' for nil:NilClass" error on BMC tab of host to allow additional rubyipmi connection options to be passed through

Because of how the smart proxy current connection setup is established we are not allowing all the options to be passed through for additional configurations like privilege level. Allowing a arbitrary set of options allows anyone to pass additional connection settings to Rubyipmi.

#9 Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/273 added
  • Pull request deleted ()

#10 Updated by Corey Osman over 6 years ago

With this fix this now allows the user to pass an options hash in the request JSON body like

"{" 
"options": {"privilege": "OPERATOR"},
"bmc_provider": "freeipmi",
"}" 

#11 Updated by Dominic Cleal over 6 years ago

  • Project changed from Foreman to Smart Proxy
  • Category set to BMC
  • Assignee set to Corey Osman

#12 Updated by Corey Osman over 6 years ago

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

#13 Updated by Dominic Cleal over 6 years ago

  • Related to Bug #10102: BMC query fails with 'undefined method downcase for nil:NilClass added

#14 Updated by Dominic Cleal over 6 years ago

  • Related to Bug #10112: Allow user to define BMC driver / options per hardware model added

#15 Updated by Corey Osman over 6 years ago

While this ticket allowed parameters to pass through to foreman, there is another issue related to parameters not being gathered from the body of the request.

Bug #10116

#16 Updated by Dominic Cleal over 6 years ago

  • Related to Bug #10116: BMC is not able to use parameters passed in through body added

Also available in: Atom PDF