From idurkacz@inf.ed.ac.uk Fri Aug 23 16:50:06 2013 Received: from treacle.ucs.ed.ac.uk (treacle.ucs.ed.ac.uk [129.215.16.102]) by underdog.stansell.org (8.14.7/8.14.7) with ESMTP id r7NGnTeT012285 for ; Fri, 23 Aug 2013 16:50:06 GMT Received: from lmtp1.ucs.ed.ac.uk (lmtp1.ucs.ed.ac.uk [129.215.149.64]) by treacle.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id r7NGnJoV024580 for ; Fri, 23 Aug 2013 17:49:23 +0100 (BST) Received: from jive.inf.ed.ac.uk (jive.inf.ed.ac.uk [129.215.24.236]) by lmtp1.ucs.ed.ac.uk (8.13.8/8.13.7) with ESMTP id r7NGnF7g012806 for ; Fri, 23 Aug 2013 17:49:19 +0100 (BST) Message-ID: <5217928B.9080105@inf.ed.ac.uk> Date: Fri, 23 Aug 2013 17:49:15 +0100 From: Ian Durkacz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130807 Thunderbird/17.0.8 MIME-Version: 1.0 To: users@conserver.com Subject: Problem with SysRq commands, IPMI SOL, and conserver Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Edinburgh-Scanned: at treacle.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus X-Scanned-By: MIMEDefang 2.72 on 198.151.248.21 X-Scanned-By: MIMEDefang 2.60 on 129.215.16.102 X-Scanned-By: MIMEDefang 2.52 on 129.215.149.64 Content-Disposition: inline X-Spam-Score: -2.55 () BAYES_00,RP_MATCHES_RCVD X-BeenThere: users@conserver.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: Conserver Users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 16:50:07 -0000 Hello, We've been using conserver here for many years to target a variety of serial console types. For our servers equipped with IPMIv2.0 BMC's, we implement consoles by exec'ing 'ipmitool sol activate', (as many other sites will be doing of course.) That all works well, but we are having problems with SysRq commands not getting properly sent to the target machines. I am certain that this has worked for us in the past - but it seems broken now. Specifically: 1. If I use ipmitool *directly* to initiate a SOL serial console to such a machine, then I can reliably send a 'SysRq b' (for example) to that machine. 2. But, if I use conserver to manage a SOL serial console to the same machine (by configuring conserver to exec ipmitool), then an attempt to send a 'SysRq b' doesn't work. Instead, it results in output which suggests the the target machine has indeed received the 'SysRq' okay, but that it was then followed by some other character(s) which the SysRq handler wasn't expecting. The conserver break sequence we have defined in these cases is '\n\~\B'; the version of conserver in use is 8.1.18; and the version of ipmitool is 1.8.11. Has anybody else noticed this same problem? Alternatively, does anybody have a working conserver/ipmitool configuration in which SysRq commands do work? Thanks in advance for any suggestions. -- Ian Durkacz | idurkacz @ inf. ed. ac. uk School of Informatics, Univ of Edinburgh | Tel: +44 (0)131 650 5188 The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. From stew@cleepdar.com Fri Aug 23 17:39:52 2013 Received: from mail-qc0-f173.google.com (mail-qc0-f173.google.com [209.85.216.173]) by underdog.stansell.org (8.14.7/8.14.7) with ESMTP id r7NHdEkt016978 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 23 Aug 2013 17:39:50 GMT Received: by mail-qc0-f173.google.com with SMTP id z10so493415qcx.18 for ; Fri, 23 Aug 2013 10:39:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=5Czt6R6mJ107vHfq2A9T/3HzqUzvUISa0w5R8YG54Cc=; b=ZDJ+1+FXlsW8N2lEfS7A0yn492f7I722mHc81ujWzWfgexWYspQ+ZG3S7210St4Sqs l/NRwEBmgXTHAffjhVlkqW+JD0EeMLWscrOs1qbYAYwvN/Wuj49vDHXDQHwCTlmsv/eH VgyDH/yQn0jHH4HEUhKQGzqwRXPvsbr0T+rLIOl2fwpRnwVxPrTD6tAkJRETj2KaCggv ij0d4a8T1IcLoGp5ASmWekNKKG9Flk0/EJxoWi3H9WWJBnzAsx1u8OXnbSzFC9CPonuL M+qHKYr7zjhdXCns+uC29OgF0aEyNvHujWMg5DvSXXrm1YZBija1hpq5mpl68V4zJVhg RmYA== X-Gm-Message-State: ALoCoQm4sYrccKcLJL0EElxXdQuAAfH8+Mr7y7l+52/5X1IipDEPWHKskHSlHh96OmciPD+ruuV3 MIME-Version: 1.0 X-Received: by 10.229.194.2 with SMTP id dw2mr277431qcb.44.1377279553950; Fri, 23 Aug 2013 10:39:13 -0700 (PDT) Received: by 10.224.192.135 with HTTP; Fri, 23 Aug 2013 10:39:13 -0700 (PDT) In-Reply-To: <5217928B.9080105@inf.ed.ac.uk> References: <5217928B.9080105@inf.ed.ac.uk> Date: Fri, 23 Aug 2013 10:39:13 -0700 Message-ID: Subject: Re: Problem with SysRq commands, IPMI SOL, and conserver From: Stewart Smith To: Ian Durkacz Content-Type: multipart/alternative; boundary=001a11c28c9891e70304e4a0e2e8 X-Spam-Score: -1.499 () BAYES_00,HTML_MESSAGE X-Scanned-By: MIMEDefang 2.72 on 198.151.248.21 Cc: users@conserver.com X-BeenThere: users@conserver.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: Conserver Users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 17:39:53 -0000 --001a11c28c9891e70304e4a0e2e8 Content-Type: text/plain; charset=ISO-8859-1 I happen to use "ipmiconsole" from the freeipmi codebase -- instead of "ipmi sol activate". I do the same basic things but I change the escape character away from the default. I happen to use the ] character for escape. Here are relevant portions of my conserver.cf # send "] B" to an IPMI serial over lan device to generate breaks break 2 { string "\d]\dB"; } default ipmi { master conserver.domain.com; type exec; break 2; logfile /var/log/consoles/&; } console example-host { include ipmi; exec "/usr/bin/ipmic 172.16.0.181"; } The /usr/bin/ipmic script basically just contains: /usr/local/sbin/ipmiconsole -u $USER -p $PASS -h $IP -e ] Of course make sure your kernel has sysrq enabled too. # echo 1 > /proc/sys/kernel/sysrq -- Stew On Fri, Aug 23, 2013 at 9:49 AM, Ian Durkacz wrote: > Hello, > > We've been using conserver here for many years to target a variety of > serial console types. > > For our servers equipped with IPMIv2.0 BMC's, we implement consoles by > exec'ing 'ipmitool sol activate', (as many other sites will be doing of > course.) That all works well, but we are having problems with SysRq > commands not getting properly sent to the target machines. I am certain > that this has worked for us in the past - but it seems broken now. > > Specifically: > > 1. If I use ipmitool *directly* to initiate a SOL serial console to such a > machine, then I can reliably send a 'SysRq b' (for example) to that machine. > > 2. But, if I use conserver to manage a SOL serial console to the same > machine (by configuring conserver to exec ipmitool), then an attempt to > send a 'SysRq b' doesn't work. Instead, it results in output which suggests > the the target machine has indeed received the 'SysRq' okay, but that it > was then followed by some other character(s) which the SysRq handler wasn't > expecting. > > The conserver break sequence we have defined in these cases is '\n\~\B'; > the version of conserver in use is 8.1.18; and the version of ipmitool is > 1.8.11. > > Has anybody else noticed this same problem? Alternatively, does anybody > have a working conserver/ipmitool configuration in which SysRq commands do > work? > > Thanks in advance for any suggestions. > > -- > Ian Durkacz | idurkacz @ inf. ed. ac. uk > School of Informatics, Univ of Edinburgh | Tel: +44 (0)131 650 5188 > > The University of Edinburgh is a charitable body, registered in > Scotland, with registration number SC005336. > > ______________________________**_________________ > users mailing list > users@conserver.com > https://www.conserver.com/**mailman/listinfo/users > --001a11c28c9891e70304e4a0e2e8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I happen to use "ipmiconsole" from the freeipmi = codebase -- instead of "ipmi sol activate". =A0I do the same basi= c things but I change the escape character away from the default. =A0I happ= en to use the ] character for escape.

Here are relevant portions of my conserver.cf


=
# send "] B" to an IPMI serial over lan device to gener= ate breaks
break 2 { string "\d]\dB"; }

= default ipmi {
=A0 =A0 =A0 =A0 master conserver.domain.com;
=A0 =A0 =A0 =A0 type exec;
=A0 =A0 =A0 =A0 break 2;
=A0 =A0 =A0 =A0 logfile /var/log/co= nsoles/&;
}

console examp= le-host { include ipmi; exec "/usr/bin/ipmic 172.16.0.181"; }


The /usr/bin/ipmic script basically just cont= ains:

=A0 =A0 =A0 =A0 =A0 =A0/usr/local/sbin/= ipmiconsole -u $USER -p $PASS -h $IP -e ]




Of course make sure your = kernel has sysrq enabled too.
# echo 1 > /proc/sys/kernel= /sysrq


--
Stew





On Fri, Aug 23, 2013 at 9:49 AM, Ian Durkacz <<= a href=3D"mailto:idurkacz@inf.ed.ac.uk" target=3D"_blank">idurkacz@inf.ed.a= c.uk> wrote:
Hello,

We've been using conserver here for many years to target a variety of s= erial console types.

For our servers equipped with IPMIv2.0 BMC's, we implement consoles by = exec'ing 'ipmitool sol activate', (as many other sites will be = doing of course.) That all works well, but we are having problems with SysR= q commands not getting properly sent to the target machines. I am certain t= hat this has worked for us in the past - but it seems broken now.

Specifically:

1. If I use ipmitool *directly* to initiate a SOL serial console to such a = machine, then I can reliably send a 'SysRq b' (for example) to that= machine.

2. But, if I use conserver to manage a SOL serial console to the same machi= ne (by configuring conserver to exec ipmitool), then an attempt to send a &= #39;SysRq b' doesn't work. Instead, it results in output which sugg= ests the the target machine has indeed received the 'SysRq' okay, b= ut that it was then followed by some other character(s) which the SysRq han= dler wasn't expecting.

The conserver break sequence we have defined in these cases is '\n\~\B&= #39;; the version of conserver in use is 8.1.18; and the version of ipmitoo= l is 1.8.11.

Has anybody else noticed this same problem? Alternatively, does anybody hav= e a working conserver/ipmitool configuration in which SysRq commands do wor= k?

Thanks in advance for any suggestions.

--
Ian Durkacz =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| id= urkacz @ inf. ed. ac. uk
School of Informatics, Univ of Edinburgh | Tel: +44 (0)131 6= 50 5188

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

_______________________________________________
users mailing list
users@conserver.co= m
https://www.conserver.com/mailman/listinfo/users

--001a11c28c9891e70304e4a0e2e8-- From schorr@telemetry-investments.com Sun Aug 25 15:48:27 2013 Received: from sv3.telemetry-investments.com (gw3a.telemetry-investments.com [38.76.0.51]) by underdog.stansell.org (8.14.7/8.14.7) with ESMTP id r7PFlphi012006 for ; Sun, 25 Aug 2013 15:48:27 GMT Received: from ti119.telemetry-investments.com (ti119 [192.168.53.119]) by sv3.telemetry-investments.com (Postfix) with ESMTP id 4BCDC1D19 for ; Sun, 25 Aug 2013 11:47:49 -0400 (EDT) Received: by ti119.telemetry-investments.com (Postfix, from userid 300) id E965D1D7A; Sun, 25 Aug 2013 11:47:49 -0400 (EDT) Date: Sun, 25 Aug 2013 11:47:49 -0400 From: "Andrew J. Schorr" To: users@conserver.com Subject: Re: Problem with SysRq commands, IPMI SOL, and conserver Message-ID: <20130825154749.GA31033@ti119.telemetry-investments.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.613 () BAYES_00,RP_MATCHES_RCVD X-Scanned-By: MIMEDefang 2.72 on 198.151.248.21 X-BeenThere: users@conserver.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: Conserver Users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2013 15:48:28 -0000 Thanks Stew. FYI, this seems to work for me with ipmitool: break 2 { string "\~\d\B"; } console samplehost { master conserver; type exec; break 2; execsubst C=cs; exec /usr/local/etc/ipmi_solsession.sh C; } where ipmi_solsession.sh is a script that runs this command: ipmitool -f /etc/ipmi.passwd -U -I lanplus -H $host sol activate In practice, I find that ipmitool console sessions seem to lose the connection after a while. I have found that usesolkeepalive is even worse than the default keepalive method. Consequently, I find that I miss error messages printed to the console. Has anybody else had this problem or know how to fix it? Is ipmiconsole more successful at keeping the session open? Regards, Andy From idurkacz@inf.ed.ac.uk Mon Aug 26 12:09:13 2013 Received: from nougat.ucs.ed.ac.uk (nougat.ucs.ed.ac.uk [129.215.13.205]) by underdog.stansell.org (8.14.7/8.14.7) with ESMTP id r7QC8aUc008936 for ; Mon, 26 Aug 2013 12:09:13 GMT Received: from lmtp1.ucs.ed.ac.uk (lmtp1.ucs.ed.ac.uk [129.215.149.64]) by nougat.ucs.ed.ac.uk (8.13.8/8.13.4) with ESMTP id r7QC8PqW017853 for ; Mon, 26 Aug 2013 13:08:29 +0100 (BST) Received: from jive.inf.ed.ac.uk (jive.inf.ed.ac.uk [129.215.24.236]) by lmtp1.ucs.ed.ac.uk (8.13.8/8.13.7) with ESMTP id r7QC8KxI011619 for ; Mon, 26 Aug 2013 13:08:24 +0100 (BST) Message-ID: <521B4534.2070405@inf.ed.ac.uk> Date: Mon, 26 Aug 2013 13:08:20 +0100 From: Ian Durkacz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130807 Thunderbird/17.0.8 MIME-Version: 1.0 To: users@conserver.com Subject: Re: Problem with SysRq commands, IPMI SOL, and conserver References: <20130825154749.GA31033@ti119.telemetry-investments.com> In-Reply-To: <20130825154749.GA31033@ti119.telemetry-investments.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Edinburgh-Scanned: at nougat.ucs.ed.ac.uk with MIMEDefang 2.60, Sophie, Sophos Anti-Virus, Clam AntiVirus X-Scanned-By: MIMEDefang 2.72 on 198.151.248.21 X-Scanned-By: MIMEDefang 2.60 on 129.215.13.205 X-Scanned-By: MIMEDefang 2.52 on 129.215.149.64 Content-Disposition: inline X-Spam-Score: -2.565 () BAYES_00,RP_MATCHES_RCVD X-BeenThere: users@conserver.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: Conserver Users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 12:09:13 -0000 Thanks for the replies and comments. On 25/08/13 16:47, Andrew J. Schorr wrote: > FYI, this seems to work for me with ipmitool: > > break 2 { > string "\~\d\B"; > } This turned out to be the key. Our break definition was "\n\~\B" (we include an initial newline, since man ipmitool says "Note that escapes are only recognized immediately after newline"), but changing it to "\n\~\d\B" fixes our problem. That is: a 250m ms delay between the '~' and the 'B' seems to be very necessary. Thanks very much for your help. -- Ian Durkacz | idurkacz @ inf. ed. ac. uk School of Informatics, Univ of Edinburgh | Tel: +44 (0)131 650 5188 The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.