Mailing List Archive

Problem with SysRq commands, IPMI SOL, and conserver
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
Re: Problem with SysRq commands, IPMI SOL, and conserver [ In reply to ]
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 <idurkacz@inf.ed.ac.uk> 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<https://www.conserver.com/mailman/listinfo/users>
>
Re: Problem with SysRq commands, IPMI SOL, and conserver [ In reply to ]
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 <user> -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
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: Problem with SysRq commands, IPMI SOL, and conserver [ In reply to ]
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.

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