[chef] Re: Re: IPMI / Ohai


Chronological Thread 
  • From: Graham Christensen < >
  • To:
  • Subject: [chef] Re: Re: IPMI / Ohai
  • Date: Mon, 23 Sep 2013 10:08:19 -0500

Hrmm… Yes, that would work as well. Originally I was going to implement this as an Ohai plugin which wouldn't have the node.set available to it,but as an early-stage recipe may work just fine. Although, that would mean I couldn't use `ohai` in system scripts.

If IPMI is not present, it appears it runs in less than half a second, so re-running it repeatedly on a host without it would cause no harm.

-- 
Graham Christensen
Sent with Sparrow

On Monday, September 23, 2013 at 9:57 AM, Tim Green wrote:

Another idea would be to set it as a persistent node attribute (node.set), then you can use the attribute? helper method and adopt similar logic that you have below.  Now you can keep search and still avoid the overhead of calling dmidecode repeatedly.

On September 23, 2013 at 10:37:23 AM, Graham Christensen ( "> ) wrote:

Hello everyone,

I maintain a deployment of SuperMicro servers, and Dell servers, as well as a compliment of cloud machines. What I want to accomplish is as follows:

An ohai plugin to determine if IPMI is available. I can do this with dmidecode, which takes about 30 seconds:

sudo dmidecode --type 38
# dmidecode 2.11
SMBIOS 2.6 present.

Handle 0x2600, DMI type 38, 18 bytes
IPMI Device Information
Interface Type: KCS (Keyboard Control Style)
Specification Version: 2.0
I2C Slave Address: 0x10
NV Storage Device: Not Present
Base Address: 0x0000000000000CA8 (I/O)
Register Spacing: 32-bit Boundaries

And the failure mode, takes less than one second:
sudo dmidecode --type 38
# dmidecode 2.11
# No SMBIOS nor DMI entry point found, sorry.

Unfortunately it takes too long to run on a regular basis. (If anyone has sage wisdom on detecting IPMI in a quicker fashion, it would be appreciated.) Would it be a faux pas to touch a hint file after the first run which indicates it is present? The logic might look like this:

if hint?('has_ipmi')
  ipmi true
else if `dmidecode --type 38`.include? 'IPMI Device Information'
  ipmi true
  save_hint('has_ipmia')
else
  ipmi false
end

Any feedback would be much appreciated!


Thank you very much, 
Graham Christensen






Archive powered by MHonArc 2.6.16.

§