Skip to content

Show pending value when rspconfig SET readback differs#32

Merged
viniciusferrao merged 1 commit into
masterfrom
fix/ipmi-rspconfig-set-readback
May 4, 2026
Merged

Show pending value when rspconfig SET readback differs#32
viniciusferrao merged 1 commit into
masterfrom
fix/ipmi-rspconfig-set-readback

Conversation

@viniciusferrao

@viniciusferrao viniciusferrao commented May 3, 2026

Copy link
Copy Markdown
Member

Summary

  • On Supermicro (and potentially other) BMCs, a GET immediately after SET returns the old value
  • rspconfig output was misleading: showed old value after setting new one
  • Also fixes backupgateway SET writing to wrong IPMI parameter (0x0C instead of 0x0E)

Changes:

  • Store canonical SET value after normalization, compare with GET readback
  • When they differ, annotate: BMC Gateway: 10.20.0.1 (requested 10.20.0.254, not yet reflected)
  • Consolidate ip/netmask/gateway/backupgateway display into one block
  • Fix backupgateway SET to write parameter 0x0E (was silently writing primary gateway 0x0C)
  • Readback comparison covers all four: ip, netmask, gateway, backupgateway
  • ip=dhcp is unaffected — separate code path, never stores a comparison value

Test plan

All tests on Supermicro IPMI BMC, with inband recovery:

# gateway SET (stale readback on SMC firmware)
$ rspconfig smcbmc gateway=10.20.0.254
smcbmc: BMC Gateway: 10.20.0.1 (requested 10.20.0.254, not yet reflected)
# inband confirms SET worked:
$ ipmitool lan print 1 | grep Gateway
Default Gateway IP      : 10.20.0.254

# ip SET (static, stale readback)
$ rspconfig smcbmc ip=10.20.0.52
smcbmc: BMC IP: 10.20.0.51 (requested 10.20.0.52, not yet reflected)
# inband confirms SET worked:
$ ipmitool lan print 1 | grep IP
IP Address Source       : Static Address
IP Address              : 10.20.0.52

# backupgateway SET (now writes to correct parameter 0x0E)
$ rspconfig smcbmc backupgateway=10.20.0.2
smcbmc: BMC Backup Gateway: 10.20.0.2
# inband confirms backup gateway changed, primary untouched:
$ ipmitool lan print 1 | grep -i gateway
Default Gateway IP      : 10.20.0.1
Backup Gateway IP       : 10.20.0.2

# plain reads unchanged
$ rspconfig smcbmc ip
smcbmc: BMC IP: 10.20.0.51
$ rspconfig smcbmc netmask
smcbmc: BMC Netmask: 255.255.255.0
$ rspconfig smcbmc gateway
smcbmc: BMC Gateway: 10.20.0.1
$ rspconfig smcbmc backupgateway
smcbmc: BMC Backup Gateway: 0.0.0.0

perlcritic: no new findings (all pre-existing in ipmi.pm)

Fixes xcat2#3445

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: de7d982462

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread xCAT-server/lib/xcat/plugins/ipmi.pm Outdated
@viniciusferrao viniciusferrao force-pushed the fix/ipmi-rspconfig-set-readback branch from 0ab8b78 to 5a125a4 Compare May 3, 2026 21:36
On some BMCs (notably Supermicro), a GET immediately after SET
returns the old value until the BMC applies the change. This made
rspconfig output misleading for network setting operations.

- Store the canonical SET value after normalization and compare
  with the GET readback for ip, netmask, gateway, and backupgateway.
  When they differ, annotate the output:
  "BMC Gateway: 10.20.0.1 (requested 10.20.0.254, not yet reflected)"
- Consolidate ip/netmask/gateway/backupgateway display into one block
- Fix backupgateway SET: was routed through the gateway branch
  writing parameter 0x0C instead of 0x0E. Now has its own branch
  writing the correct IPMI parameter.
- ip=dhcp is unaffected (separate code path, never stores a value)

Tested on Supermicro IPMI BMC (10.20.0.51).

Fixes xcat2#3445
@viniciusferrao viniciusferrao force-pushed the fix/ipmi-rspconfig-set-readback branch from 5a125a4 to d71c7f7 Compare May 4, 2026 00:01
@viniciusferrao viniciusferrao merged commit c791564 into master May 4, 2026
1 check passed
@viniciusferrao viniciusferrao deleted the fix/ipmi-rspconfig-set-readback branch May 7, 2026 03:20
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

Successfully merging this pull request may close these issues.

[SMC] rspconfig on supermicro servers does not display the new configuration values

1 participant