Skip to content

fix: remove eventlet#210

Open
viniciusferrao wants to merge 8 commits into
xcat2:masterfrom
VersatusHPC:remove-eventlet
Open

fix: remove eventlet#210
viniciusferrao wants to merge 8 commits into
xcat2:masterfrom
VersatusHPC:remove-eventlet

Conversation

@viniciusferrao
Copy link
Copy Markdown
Member

Hi @jjohnson42, this is my first contribution to Confluent. Taking a shot at #197 with the following changes:

  • Replaced eventlet.greenpool with concurrent.futures.ThreadPoolExecutor in misc/cfg-dhcp-redfish-bmcs-by-switch.py
  • Used as_completed() + future.result() for proper exception propagation on probe failures
  • Removed the eventlet.greenpool.GreenPool() instantiation from main
  • Removed dead eventlet socket compatibility code (.fd checks) from the IPMI session layer
  • Cleaned up stale eventlet references in comments

I installed Confluent in a VM and verified the IPMI paths this PR touches still work as expected, but I'd appreciate your eyes on anything I might have missed.

Closes #197

Replace eventlet.greenpool with concurrent.futures.ThreadPoolExecutor
in the BMC discovery script, using as_completed() for proper exception
propagation and main-thread result aggregation to avoid race conditions.

Remove dead eventlet socket compatibility code (.fd attribute checks)
from the IPMI session layer, and clean up stale eventlet references
in comments across the codebase.

Closes: xcat2#197
Drop python3-eventlet from the Ubuntu Noble build Dockerfile. Clean up
remaining greenthread/greenlet terminology in comments across aiohmi
IPMI modules, consoleserver, macmap, and the IPMI plugin. Remove a
commented-out GreenPool reference in macmap.
Drop NullLock rationale comment (referenced removed library),
consoleserver greenthread spawn comment, and update syncfiles
CalledProcessError workaround comment.
The repr() check existed because eventlet broke normal exception
catching. With eventlet removed, catch CalledProcessError directly.
Copy link
Copy Markdown
Member

@jjohnson42 jjohnson42 left a comment

Choose a reason for hiding this comment

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

Broadly speaking nothing should functionally change as the work for making it work was already done, but have a couple of things to check.

Comment thread confluent_server/confluent/debugger.py
Comment thread misc/cfg-dhcp-redfish-bmcs-by-switch.py Outdated
import os
import struct
import subprocess
import pyghmi.util.webclient as webclient
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd be content to leave this misc example behind, but if wanting to change it, would suggest reworking it to aiohmi.util.webclient instead

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Will take a look at this.

# if in eventlet, go for the true sendto, which is less glitchy
intsock = intsock.fd
intsock.sendto(b'\x01', (myself, iosockets[0].getsockname()[1]))
iosockets[0].sendto(b'\x01', (myself, iosockets[0].getsockname()[1]))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I can try, but wanted to know if this was explicitly tested with real stuff, or was the commentary LLM generated indicating a test?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That was tested on real hardware. I've used an AlmaLinux 10.1 VM on libvirt/KVM and connected to three different systems: an old Supermicro X10 server, Dell PowerEdge R7525, and IBM Power AC922. IPMI, iDRAC and OpenBMC, respectively.

I can do specific tests if you want.

@viniciusferrao
Copy link
Copy Markdown
Member Author

viniciusferrao commented May 7, 2026

@jjohnson42 I've changed the code as requested. Regarding the test matrix, I could test IPMI connections on those systems:

BMC aiohmi IPMI Redfish checkfish asyncio.gather
Supermicro X10DRW PASS — id=32, fw=3.89 UUID=00000000-0000-0000-0000-0CC47ADD7F8C PASS
Dell iDRAC 9 PASS — id=32, fw=7.20 No UUID in service root (Dell default) PASS
OpenBMC IBM AC922 PASS — id=0, fw=9.40 UUID=7da5fde0-37c8-444e-9711-711c168edf63 PASS
Lenovo XCC2 PASS — id=32, fw=2.81 UUID=5e2da083-6900-ee11-B91E-EA80880019D1 PASS

If there are more tests to do, I can try here. I only don't have more 'kind of' machines.

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.

Eventlet to async migration

2 participants