Fix ovn-tester python version and issues uncovered in CI.#206
Merged
dceara merged 7 commits intoovn-org:mainfrom Jan 13, 2026
Merged
Fix ovn-tester python version and issues uncovered in CI.#206dceara merged 7 commits intoovn-org:mainfrom
dceara merged 7 commits intoovn-org:mainfrom
Conversation
Collaborator
Author
|
CC: @igsilya |
f5d09da to
d3caac7
Compare
The command only works through the leader and the first node might not
be the elected leader. In such cases we get:
ovs-appctl: /run/ovn/ovnsb_db.ctl: server returned an error
ovn_workload |INFO| Setting RAFT election timeout to 11000ms
ovn_sandbox |INFO| Logging command: ssh ovn-central-az0-1
"ovs-appctl -t /run/ovn/ovnnb_db.ctl cluster/change-election-timer OVN_Northbound 11000"
ovn_sandbox |INFO| Result:
['election timer must be changed through leader.', 'ovs-appctl: /run/ovn/ovnnb_db.ctl: server returned an error'], Exit status: 2
ovn_sandbox |INFO| ---
election timer must be changed through leader.
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
It's not really needed (and not available on newer Fedora). Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Otherwise other packages we need might fail to install. E.g., ovsdbapp requires Python >= 3.10: ERROR: Package 'ovsdbapp' requires a different Python: 3.9.25 not in '>=3.10' Error: building at STEP "RUN pip3 install -r /ovn-tester/requirements.txt": while running runtime: exit status 1 For RHEL we query the available packages and choose the most recent python3 version and the corresponding python3.x-pip package. For Fedora and Deb-based distros we use the python3 version pulled in by the python3-pip package. Suggested-by: Ilya Maximets <i.maximets@ovn.org> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
On single node deployments, e.g., in CI, we don't need an internal-iface. Signed-off-by: Dumitru Ceara <dceara@redhat.com>
d3caac7 to
f58f3a2
Compare
f58f3a2 to
6d529b6
Compare
0f29c2d to
e037da5
Compare
The Sandbox class uses an interactive shell to maintain a channel to
each of the containers (fake nodes) it needs to runs commands in. As
this is a real shell emulator the Sandbox implementation must also
handle (ignore mostly) the vt100 control/escape symbols.
The implementation uses special markers to determine where the beginning
of the command output starts and where it ends. However, the
implementation assumed that the first line of the output was always
separated from the previous (command) line by an universal newline
character (e.g., '\n'). Which meant it was enough to call splitlines()
on the output we got from the channel and then search for the start
marker as one of the split lines.
Some shell implementations however may occasionally use the String
Terminator character 'ESC \', i.e. '\x1b\\', to end the command
part of the output, _without_ adding an explicit newline.
This caused issues as ovn-heater failed to determine where the actual
output started in those cases and was failing with:
File "/ovn-tester/ovn_sandbox.py", line 92, in run
self.ensure_channel()
~~~~~~~~~~~~~~~~~~~^^
File "/ovn-tester/ovn_sandbox.py", line 80, in ensure_channel
self.run(cmd="echo Hello", stdout=stdout, raise_on_error=True)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/ovn-tester/ovn_sandbox.py", line 128, in run
start = out.index('++++start') + 1
~~~~~~~~~^^^^^^^^^^^^^
While the output itself did actually include the '++++start' marker,
e.g.:
'\x1b]3008;start=...user=;hostname=..;pid=...;cwd=/\x1b\\++++start'
In the output above '\x1b]' ('ESC ]') is the Operating System Command
control character and is terminated by '\x1b\\' ('ESC \') the String
Terminator control character.
In order to handle such cases we now explicitly handle String Terminator
as an additional delimiter on top of the universal newline characters
considered by Python's splitlines().
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
The Ubuntu runs were running out of memory (due to non-OVN components). We should probably investigate why those components are installed and remove them if possible. However, using 16GB of RAM for VMs in CI sounds like a good idea nevertheless. Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
e037da5 to
1abecd8
Compare
almusil
reviewed
Jan 13, 2026
almusil
approved these changes
Jan 13, 2026
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If we don't use the latest available Python version other packages we need might fail to install. E.g., ovsdbapp requires Python >= 3.10:
ERROR: Package 'ovsdbapp' requires a different Python: 3.9.25 not in '>=3.10'
Error: building at STEP "RUN pip3 install -r /ovn-tester/requirements.txt":
while running runtime: exit status 1
While testing this change a bunch of other issues were uncovered, mostly due to our CI failing to run after recent changes to various components. This PR also fixes those issues: