Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752647AbbEFMuy (ORCPT ); Wed, 6 May 2015 08:50:54 -0400 Received: from mail-oi0-f50.google.com ([209.85.218.50]:35172 "EHLO mail-oi0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752301AbbEFMut (ORCPT ); Wed, 6 May 2015 08:50:49 -0400 Message-ID: <554A0E26.1030605@acm.org> Date: Wed, 06 May 2015 07:50:46 -0500 From: Corey Minyard Reply-To: minyard@acm.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Mandeep Sandhu , openipmi-developer@lists.sourceforge.net, linux-kernel Subject: Re: [Openipmi-developer] Shutdown behavior with IPMI enabled References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2435 Lines: 61 On 04/29/2015 12:39 PM, Mandeep Sandhu wrote: > Hi All, > > I'm facing an IPMI related problem. I don't know if this is the right > list to ask (as the problem is partially kernel related). If not, I'd > appreciate if you could direct me to the correct ML. Adding LKML, since this is a kernel related issue. > > I'm seeing a certain behaviour on my server, which has a BMC, when > running the "shutdown" command, wherein the machine restarts after I > do a shutdown from Linux. > > I noticed that I have the "ipmi_poweroff" module loaded on my setup. > So, when I invoke 'sudo shutdown now', the kernel shuts down the > machine and the ipmi_poweroff module ALSO sends an ipmi "chassis power > off" command to the BMC. > > I have access to the BMC firmware and I saw that the way BMC handles > "chassis power off" is by emulating a power button press for 6 > seconds. But since the host already shuts down in the meantime, the > button press ends up power up the system again! Well that's a very unusual interpretation of "power off". > > My question is, why does the host power off itself when the > ipmi_poweroff module is loaded? Shouldn't just one of them be > responsible for powering off the system? Well, theoretically, if the power off function completes, the system should be powered off and therefore nothing else should run. So there's no real provision for not calling the other power off functions. > If the host can shut itself down, it should not ask the BMC to do a > power off or vice-versa. I"m not sure I have a great solution. You can, of course, not use the ipmi_poweroff module. I'm not sure of the utility of it in a modern system. In the past, before reliable ACPI and such, some systems didn't have reliable power off function and IPMI was the only way to accomplish this in some cases. Which is why the function exists. Another option would be to spin in the ipmi power off function forever. I'm not sure I like that option, either. It might be best to remove, or at least disable normally, the config option in most systems. That way systems that really needed it could have it, but it wouldn't affect most people. -corey > > Thanks, > -mandeep -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/