From b195429d6b815e037efeaeb5e31d32f5a69c11e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Sat, 2 May 2026 23:07:54 -0300 Subject: [PATCH] Remove python3-eventlet from build deps and clean up stale references 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. --- build/arm/noble/Dockerfile | 2 +- confluent_server/aiohmi/ipmi/command.py | 3 +-- confluent_server/aiohmi/ipmi/console.py | 2 +- confluent_server/aiohmi/ipmi/private/session.py | 2 +- confluent_server/aiohmi/ipmi/private/simplesession.py | 2 +- confluent_server/confluent/consoleserver.py | 3 +-- confluent_server/confluent/networking/macmap.py | 1 - .../confluent/plugins/hardwaremanagement/ipmi.py | 10 +++------- 8 files changed, 9 insertions(+), 16 deletions(-) diff --git a/build/arm/noble/Dockerfile b/build/arm/noble/Dockerfile index e145de1f..37d60446 100644 --- a/build/arm/noble/Dockerfile +++ b/build/arm/noble/Dockerfile @@ -3,7 +3,7 @@ ADD stdeb.patch /tmp/ ADD buildapt.sh /bin/ ADD distributions.tmpl /bin/ RUN ["apt-get", "update"] -RUN ["apt-get", "install", "-y", "reprepro", "python3-stdeb", "gnupg-agent", "devscripts", "debhelper", "libsoap-lite-perl", "libdbi-perl", "quilt", "git", "python3-pyparsing", "python3-dnspython", "python3-eventlet", "python3-netifaces", "python3-paramiko", "dh-python", "libjson-perl", "ronn", "alien", "gcc", "make"] +RUN ["apt-get", "install", "-y", "reprepro", "python3-stdeb", "gnupg-agent", "devscripts", "debhelper", "libsoap-lite-perl", "libdbi-perl", "quilt", "git", "python3-pyparsing", "python3-dnspython", "python3-netifaces", "python3-paramiko", "dh-python", "libjson-perl", "ronn", "alien", "gcc", "make"] RUN ["mkdir", "-p", "/sources/git/"] RUN ["mkdir", "-p", "/debs/"] RUN ["mkdir", "-p", "/apt/"] diff --git a/confluent_server/aiohmi/ipmi/command.py b/confluent_server/aiohmi/ipmi/command.py index 32d6ab1d..94abca49 100644 --- a/confluent_server/aiohmi/ipmi/command.py +++ b/confluent_server/aiohmi/ipmi/command.py @@ -138,8 +138,7 @@ class Command(object): :param bmc: hostname or ip address of the BMC (default is local) :param userid: username to use to connect (default to no user) :param password: password to connect to the BMC (defaults to no password) - :param onlogon: function to run when logon completes in an asynchronous - fashion. This will result in a greenthread behavior. + :param onlogon: function to run when logon completes asynchronously. :param kg: Optional parameter to use if BMC has a particular Kg configured :param verifycallback: For OEM extensions that use HTTPS, this function will be used to evaluate the certificate. diff --git a/confluent_server/aiohmi/ipmi/console.py b/confluent_server/aiohmi/ipmi/console.py index 6479b938..294a84a9 100644 --- a/confluent_server/aiohmi/ipmi/console.py +++ b/confluent_server/aiohmi/ipmi/console.py @@ -421,7 +421,7 @@ class Console(object): If a caller is a simple little utility, provide a function to eternally run the event loop. More complicated usage would be expected to provide their own event loop behavior, though this could be used - within the greenthread implementation of caller's choice if desired. + within the async implementation of caller's choice if desired. """ # wait_for_rsp promises to return a false value when no sessions are # alive anymore diff --git a/confluent_server/aiohmi/ipmi/private/session.py b/confluent_server/aiohmi/ipmi/private/session.py index ce66361d..5ab6d704 100644 --- a/confluent_server/aiohmi/ipmi/private/session.py +++ b/confluent_server/aiohmi/ipmi/private/session.py @@ -847,7 +847,7 @@ class Session(object): # within a process. In this way, synchronous usage of the interface # plays well with asynchronous use. In fact, this produces the # behavior of only the constructor needing a callback. From then on, - # synchronous usage of the class acts in a greenthread style governed + # synchronous usage of the class acts in a coroutine style governed # by order of data on the network await self.awaitresponse(retry, netfn + 1, command) lastresponse = self.lastresponse diff --git a/confluent_server/aiohmi/ipmi/private/simplesession.py b/confluent_server/aiohmi/ipmi/private/simplesession.py index a4f01e95..9ac8d898 100644 --- a/confluent_server/aiohmi/ipmi/private/simplesession.py +++ b/confluent_server/aiohmi/ipmi/private/simplesession.py @@ -486,7 +486,7 @@ class Session(object): # within a process. In this way, synchronous usage of the interface # plays well with asynchronous use. In fact, this produces the # behavior of only the constructor needing a callback. From then on, - # synchronous usage of the class acts in a greenthread style governed + # synchronous usage of the class acts in a coroutine style governed # by order of data on the network self.awaitresponse(retry) lastresponse = self.lastresponse diff --git a/confluent_server/confluent/consoleserver.py b/confluent_server/confluent/consoleserver.py index e0e876e3..31f25452 100644 --- a/confluent_server/confluent/consoleserver.py +++ b/confluent_server/confluent/consoleserver.py @@ -462,8 +462,7 @@ class ConsoleHandler(object): self._attribwatcher = None async def get_console_output(self, data): - # Spawn as a greenthread, return control as soon as possible - # to the console object + # Return control as soon as possible to the console object await self._handle_console_output(data) async def attachsession(self, session): diff --git a/confluent_server/confluent/networking/macmap.py b/confluent_server/confluent/networking/macmap.py index aa578e48..54f00123 100644 --- a/confluent_server/confluent/networking/macmap.py +++ b/confluent_server/confluent/networking/macmap.py @@ -587,7 +587,6 @@ async def _full_updatemacmap(configmanager): if switch not in switches: del _macsbyswitch[switch] switchauth = get_switchcreds(configmanager, switches) - #pool = GreenPool(64) tsks = [] for sa in switchauth: tsks.append(_map_switch(sa)) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index 9776a500..8b9f9a68 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -98,13 +98,9 @@ def get_pci_text_from_ids(subdevice, subvendor, device, vendor): return vendorstr, devstr -# There is something not right with the RLocks used in pyghmi when -# greenthreads comes into play. It seems like sometimes on acquire, -# it calls _get_ident and it isn't the id(greenlet) and so -# a thread deadlocks itself due to identity crisis? -# However, since we are not really threaded, the operations being protected -# are not actually dangerously multiplexed... so we can replace with -# a null context manager for now +# Since we are single-threaded via asyncio, the operations being protected +# by RLocks are not actually dangerously multiplexed, so we can replace +# with a null context manager class NullLock(object): def donothing(self, *args, **kwargs):