
In an attempt to make the nodescan process as quick as possible, we start the connection in the provider statemachine thread before handing the remaining work off to the nodescan statemachine thread. However, if the nodescan worker is near the end of its request list when the provider adds the request, then it may end up performing the initial connection nearly simultaneously with the provider thread. They may both create a socket and attempt to register the FD. If the race results in them registering the same FD, the following exception occurs: Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/nodepool/driver/statemachine.py", line 253, in runStateMachine keys = self.nodescan_request.result() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/nodepool/driver/statemachine.py", line 1295, in result raise self.exception File "/usr/local/lib/python3.11/site-packages/nodepool/driver/statemachine.py", line 1147, in addRequest self._advance(request, False) File "/usr/local/lib/python3.11/site-packages/nodepool/driver/statemachine.py", line 1187, in _advance request.advance(socket_ready) File "/usr/local/lib/python3.11/site-packages/nodepool/driver/statemachine.py", line 1379, in advance self._connect() File "/usr/local/lib/python3.11/site-packages/nodepool/driver/statemachine.py", line 1340, in _connect self.worker.registerDescriptor(self.sock) File "/usr/local/lib/python3.11/site-packages/nodepool/driver/statemachine.py", line 1173, in registerDescriptor self.poll.register( FileExistsError: [Errno 17] File exists To address this, rather than attempting to coordinate work between these two threads, let's just let the nodescan worker handle it. To try to keep the process responsive, we'll wake the nodescan worker if it's sleeping. Change-Id: I5ceda68b856c09bf7606e62ac72ca5c5c76d2661
Nodepool
Nodepool is a system for managing test node resources. It supports launching single-use test nodes from cloud providers as well as managing access to pre-defined pre-existing nodes. Nodepool is part of a suite of tools that form a comprehensive test system, including Zuul.
The latest documentation for Nodepool is published at: https://zuul-ci.org/docs/nodepool/
The latest documentation for Zuul is published at: https://zuul-ci.org/docs/zuul/
Getting Help
There are two Zuul-related mailing lists:
- zuul-announce
-
A low-traffic announcement-only list to which every Zuul operator or power-user should subscribe.
- zuul-discuss
-
General discussion about Zuul, including questions about how to use it, and future development.
You will also find Zuul developers in the #zuul channel on Freenode IRC.
Contributing
To browse the latest code, see: https://opendev.org/zuul/nodepool To clone the latest code, use git clone https://opendev.org/zuul/nodepool
Bugs are handled at: https://storyboard.openstack.org/#!/project/zuul/nodepool
Code reviews are handled by gerrit at https://review.opendev.org
After creating a Gerrit account, use git review to submit patches. Example:
# Do your commits
$ git review
# Enter your username if prompted
Join #zuul on Freenode to discuss development or usage.
License
Nodepool is free software, licensed under the Apache License, version 2.0.
Python Version Support
Nodepool requires Python 3. It does not support Python 2.