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

Example from README does not work #12

Open
kotchaosu opened this issue Feb 24, 2022 · 2 comments
Open

Example from README does not work #12

kotchaosu opened this issue Feb 24, 2022 · 2 comments

Comments

@kotchaosu
Copy link

Used versions:

ipmitool version 1.8.18-csv
ipmisim==0.10

Commands:

Screen A

$ ipmisim 3000
2022-02-24 16:00:46,854 - ipmisim - INFO - IPMI BMC initialized.
2022-02-24 16:00:46,854 - ipmisim - INFO - CloudStack IPMI Sim BMC initialized
2022-02-24 16:00:46,854 - ipmisim - INFO - Started IPMI Server on 0.0.0.0:3000

Screen B

$ ipmitool -I lanplus -H localhost -p 3000 -R1 -U admin -P password chassis power status -vvv
Testing wlp4s0 interface address: 2a02:a318:8246:8d00:7a41:6b11:ab91:dc4d scope=0
Successful connected on wlp4s0 interface with scope id 0

>> Sending IPMI command payload
>>    netfn   : 0x06
>>    command : 0x38
>>    data    : 0x8e 0x04 

BUILDING A v1.5 COMMAND
>> IPMI Request Session Header
>>   Authtype   : NONE
>>   Sequence   : 0x00000000
>>   Session ID : 0x00000000
>> IPMI Request Message Header
>>   Rs Addr    : 20
>>   NetFn      : 06
>>   Rs LUN     : 0
>>   Rq Addr    : 81
>>   Rq Seq     : 00
>>   Rq Lun     : 0
>>   Command    : 38

>> Sending IPMI command payload
>>    netfn   : 0x06
>>    command : 0x38
>>    data    : 0x0e 0x04 

BUILDING A v1.5 COMMAND
>> IPMI Request Session Header
>>   Authtype   : NONE
>>   Sequence   : 0x00000000
>>   Session ID : 0x00000000
>> IPMI Request Message Header
>>   Rs Addr    : 20
>>   NetFn      : 06
>>   Rs LUN     : 0
>>   Rq Addr    : 81
>>   Rq Seq     : 00
>>   Rq Lun     : 0
>>   Command    : 38
Get Auth Capabilities error
Error issuing Get Channel Authentication Capabilities request
Error: Unable to establish IPMI v2 / RMCP+ session

Similarly for opuser and user. Is there any initial step I'm missing?

@dlotterman
Copy link

Just posting this as a contextual trail marker in case anyone else finds themselves here.

It looks like upstream ipmitool decided to change the default IPMI session initiation behavior to auto-negotiate Ciphers, likely as part of moving away from this historic default of Cipher Suite 3 as part of the deprecation of SHA1.

That upstream of ipmitool appears to have landed as the default in RHEL8+ clones but not in Ubuntu 20.04 clones, so there is a split in observed default behavior. Compiling from upstream source highlights the new behavior everywhere.

The new auto-negotiotiation looks fairly difficult to mock. Upstream pyghmi should have had the fix introduced as part of the fallout from the above Redhat Bugzilla, but that effort will also have to be matched here in ipmisim.

In the short term, clients that can have flags modefied can add -C 3, as in ipmitool -I lanplus -H $HOST -U ADMIN -P PASSWORD -C3 chassis power status and the desired behavior should be observed.

@rohityadavcloud
Copy link
Member

Hi @dlotterman and @kotchaosu thanks for sharing. @dlotterman thanks for the feedback, our primary use of ipmisim is for testing a related IPMI support feature in Apache CloudStack so we don't have an urgency in fixing/addressing this (our tests run on el7), but I welcome if you've figured out a solution and want to raise a pull request.

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

3 participants