Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to execute lan set 1 access on/off IPMI command #199

Open
ckstyle001 opened this issue Jan 18, 2024 · 0 comments
Open

Unable to execute lan set 1 access on/off IPMI command #199

ckstyle001 opened this issue Jan 18, 2024 · 0 comments

Comments

@ckstyle001
Copy link

I was woking with the openbmc-test-automation framework and have noticed that one of the tests fails. The test was executing lan set 1 access off IPMI command. I've checked it on the BMC side and have discovered that the behaviour is persistent:

# ipmitool lan set 1 access off
IPMI command failed: Unspecified error
Unable to Set Channel Access(non-volatile) for channel 1

The channel 1 is working and it is:

  "1" : {
    "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
    }
  },

The error comes from the setChannelAccessPersistData function
phosphor-host-ipmid/user_channel/channel_mgmt.cpp
From this part of code:

            if (0 != setDbusProperty(networkIntfServiceName, networkIntfObj,
                                     networkChConfigIntfName,
                                     privilegePropertyString, privStr))
            {
                log<level::DEBUG>(
                    "Network interface does not exist",
                    entry("INTERFACE=%s", channelData[chNum].chName.c_str()));
                return ccUnspecifiedError;
            }

Here are the constants:

// TODO: Get the service name dynamically..
static constexpr const char* networkIntfServiceName =
    "xyz.openbmc_project.Network";
static constexpr const char* networkIntfObjectBasePath =
    "/xyz/openbmc_project/network";
static constexpr const char* networkChConfigIntfName =
    "xyz.openbmc_project.Channel.ChannelAccess";
static constexpr const char* privilegePropertyString = "MaxPrivilege";
static constexpr const char* dBusPropertiesInterface =
    "org.freedesktop.DBus.Properties";
static constexpr const char* propertiesChangedSignal = "PropertiesChanged";

So the setDbusProperty call looks for xyz.openbmc_project.Channel.ChannelAccess interface, but it appears that there is no such interface on my machine:

# busctl tree xyz.openbmc_project.Network
└─/xyz
  └─/xyz/openbmc_project
    └─/xyz/openbmc_project/network
      ├─/xyz/openbmc_project/network/config
      │ └─/xyz/openbmc_project/network/config/dhcp
      └─/xyz/openbmc_project/network/eth0
        ├─/xyz/openbmc_project/network/eth0/ipv4
        │ └─/xyz/openbmc_project/network/eth0/ipv4/dae4712
        └─/xyz/openbmc_project/network/eth0/ipv6
          └─/xyz/openbmc_project/network/eth0/ipv6/749f2442


root@ak9032v2:~# busctl introspect xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0
NAME                                              TYPE      SIGNATURE RESULT/VALUE                             FLAGS
org.freedesktop.DBus.Introspectable               interface -         -                                        -
.Introspect                                       method    -         s                                        -
org.freedesktop.DBus.Peer                         interface -         -                                        -
.GetMachineId                                     method    -         s                                        -
.Ping                                             method    -         -                                        -
org.freedesktop.DBus.Properties                   interface -         -                                        -
.Get                                              method    ss        v                                        -
.GetAll                                           method    s         a{sv}                                    -
.Set                                              method    ssv       -                                        -
.PropertiesChanged                                signal    sa{sv}as  -                                        -
xyz.openbmc_project.Collection.DeleteAll          interface -         -                                        -
.DeleteAll                                        method    -         -                                        -
xyz.openbmc_project.Network.EthernetInterface     interface -         -                                        -
.AutoNeg                                          property  b         false                                    emits-change
.DHCPEnabled                                      property  s         "xyz.openbmc_project.Network.EthernetIn…" emits-change writable
.DefaultGateway                                   property  s         "100.100.100.200"                        emits-change writable
.DefaultGateway6                                  property  s         ""                                       emits-change writable
.DomainName                                       property  as        0                                        emits-change writable
.IPv6AcceptRA                                     property  b         true                                     emits-change writable
.InterfaceName                                    property  s         "eth0"                                   const
.LinkLocalAutoConf                                property  s         "xyz.openbmc_project.Network.EthernetIn…" emits-change writable
.LinkUp                                           property  b         true                                     emits-change
.MTU                                              property  u         1500                                     emits-change writable
.NICEnabled                                       property  b         true                                     emits-change writable
.NTPServers                                       property  as        3 "10.10.10.10" "20.20.20.20" "30.30.30…" emits-change writable
.Nameservers                                      property  as        1 "168.95.1.1"                           emits-change writable
.Speed                                            property  u         0                                        emits-change
.StaticNTPServers                                 property  as        0                                        emits-change writable
.StaticNameServers                                property  as        0                                        emits-change writable
xyz.openbmc_project.Network.IP.Create             interface -         -                                        -
.IP                                               method    ssys      o                                        -
xyz.openbmc_project.Network.MACAddress            interface -         -                                        -
.MACAddress                                       property  s         "46:2b:35:e8:46:39"                      emits-change writable
xyz.openbmc_project.Network.Neighbor.CreateStatic interface -         -                                        -
.Neighbor                                         method    ss        o                                        -

Question:

  1. Is this the ipmi bug?
  2. Does ipmi support ipmitool lan set 1 access on/off command?
  3. I try to implement the xyz.openbmc_project.Channel.ChannelAccess interface at xyz.openbmc_project.Network /xyz/openbmc_project/network/eth0, but when start phosphor-ipmi-host.service the ipmid will crashed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant