openbmc / phosphor-net-ipmid

Network IPMI server
Apache License 2.0
9 stars 11 forks source link

zaius : IPMI out of band IPMI v2 / RMCP+ session dropped #5

Open gkeishin opened 5 years ago

gkeishin commented 5 years ago
ID="openbmc-phosphor"
NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
VERSION="2.7.0-dev"
VERSION_ID="2.7.0-dev-530-g1553ba8"
PRETTY_NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro) 2.7.0-dev"
BUILD_ID="2.7.0-dev"
OPENBMC_TARGET_MACHINE="zaius"
Get Auth Capabilities error
Error issuing Get Channel Authentication Capabilies request
Error: Unable to establish IPMI v2 / RMCP+ session: 1 != 0

So on Zaius there are two NW interfaces eth0 and eth1. looks like netipmid has refactored and there is a daemon per ethernet interface and there is only one per daemon started for eth0 "/usr/bin/netipmid -c eth0".

Since Zaius has two ethernet interfaces and the communication is with "eth1", and the IPMI network packets are not handled.

Is my assumption here correct ?

vmauery commented 5 years ago

As per the commit that changed this, you need to modify the phosphor-ipmi-net_%.bbappend to add extra interfaces.

commit 3313659bf25c9ad4d608282d088a1717977983e9 Author: Vernon Mauery vernon.mauery@linux.intel.com Date: Fri Mar 22 12:25:14 2019 -0700

Make phosphor-ipmi-net parameterized per iface

The end goal is to run one netipmid bridge per interface, so that
stopping that bridge will effectively shut down RMCP+ to that interface.

Including this package (phosphor-ipmi-net) in a yocto build will
automatically enable RMCP+ on the default interface (eth0). To change
the default interface enabled, set the value in a bbappend:

RMCPP_IFACE = "eth2"

If more than one network device for RMCP+ is needed, then a bbappend
should be added to enable netipmid on that device using syntax like
as follows:

phosphor-ipmi-net_%.bbappend:

ALT_RMCPP_IFACE = "eth1"
SYSTEMD_SERVICE_${PN} += " \
    ${PN}@${ALT_RMCPP_IFACE}.service \
    ${PN}@${ALT_RMCPP_IFACE}.socket \
    "
gkeishin commented 5 years ago
$ipmitool -I lanplus -C 3 -U root -P 0penBmc -H xx.xx.xx.xx chassis power status
Error: Unable to establish IPMI v2 / RMCP+ session

On BMC, started service for eth1:

root@zaius:~# /usr/bin/netipmid -c eth1

and it started working..


$ ipmitool -I lanplus -C 3 -U root -P 0penBmc -H xx.xx.xx.xx chassis power status
Chassis Power is on
-bash-4.2$
``
gkeishin commented 5 years ago

As per the commit that changed this, you need to modify the phosphor-ipmi-net_%.bbappend to add extra interfaces.

commit 3313659bf25c9ad4d608282d088a1717977983e9 Author: Vernon Mauery vernon.mauery@linux.intel.com Date: Fri Mar 22 12:25:14 2019 -0700

Make phosphor-ipmi-net parameterized per iface

The end goal is to run one netipmid bridge per interface, so that
stopping that bridge will effectively shut down RMCP+ to that interface.

Including this package (phosphor-ipmi-net) in a yocto build will
automatically enable RMCP+ on the default interface (eth0). To change
the default interface enabled, set the value in a bbappend:

RMCPP_IFACE = "eth2"

If more than one network device for RMCP+ is needed, then a bbappend
should be added to enable netipmid on that device using syntax like
as follows:

phosphor-ipmi-net_%.bbappend:

ALT_RMCPP_IFACE = "eth1"
SYSTEMD_SERVICE_${PN} += " \
    ${PN}@${ALT_RMCPP_IFACE}.service \
    ${PN}@${ALT_RMCPP_IFACE}.socket \
    "

ok ..Thanks @vmauery

vmauery commented 5 years ago

cat /usr/share/ipmi-providers/channel_config.json

{ "0" : { "name" : "IPMB", "is_valid" : true, "active_sessions" : 0, "channel_info" : { "medium_type" : "ipmb", "protocol_type" : "ipmb-1.0", "session_supported" : "session-less", "is_ipmi" : true } }, "1" : { "name" : "eth1", "is_valid" : true, "active_sessions" : 0, "channel_info" : { "medium_type" : "lan-802.3", "protocol_type" : "ipmb-1.0", "session_supported" : "multi-session", "is_ipmi" : true } }, "3" : { "name" : "eth0", "is_valid" : true, "active_sessions" : 0, "channel_info" : { "medium_type" : "lan-802.3", "protocol_type" : "ipmb-1.0", "session_supported" : "multi-session", "is_ipmi" : true } }, ...

This sets IPMI channel 3 to use eth0 and IPMI channel 1 to use eth1. When netipmid launches, it will register with the D-Bus well-known name of 'xyz.openbmc_project.Ipmi.Channel.' where name is the network interface, which should match the name in channel config so that ipmid can map the sender back to a channel.