This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Add intelligent version detection for OVS 3.x+#10
Merged
greenpau merged 14 commits intogreenpau:mainfrom Dec 28, 2025
Merged
Conversation
- Query ovs-appctl for OVS version when missing from DB - Get db_version from schema instead of defaulting to 'unknown' - Read system_type and system_version from /etc/os-release - Only use 'unknown' as final fallback when queries fail - Add comprehensive tests for new functions
greenpau
approved these changes
Dec 23, 2025
…tAppClusteringInfo and to make tests pass
…tAppClusteringInfo
…atibility with newer vovs versions
Contributor
Author
|
@greenpau updated the linter and fixed lint errors/ignored the ones i was not sure if i would break something, also fixed a test that was failing when using newer version of ovs |
…fg and NbCfgTimestamp fields
Add version command support and enhance OvnChassis structure with NbCfg and NbCfgTimestamp fields
Owner
|
@lucadelmonte , thank you for contributing! 👍 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Motivation
In Open vSwitch 3.x+, the fields
ovs_version,db_version,system_type, andsystem_versionare no longer written to theOpen_vSwitchdatabase. The current code treats these missing fields as errors, logging warnings and reducing observability for OVS 3.x+ deployments.Problem
When these fields are missing from the database, the code currently fails to populate them, even though the information is readily available through other channels:
ovs-appctl version/etc/os-releaseThis creates unnecessary error logs and makes monitoring OVS versions across infrastructure more difficult.
Solution
This PR enhances version detection to intelligently gather information from multiple sources:
ovs-appctl versionusing existing socket control infrastructure/etc/os-releaseFalls back gracefully only when queries actually fail.
Implementation
Client.query()infrastructure for consistencygetVersionViaAppctl(),parseOvsVersion(),getSystemInfoFromOS()Results
Before (OVS 3.5.1): Error logs for missing fields
After (OVS 3.5.1): ovs_version: 3.5.1 db_version: 8.4.0 system_type: ubuntu system_version: 24.04
This improves observability for OVS 3.x+ while maintaining full backward compatibility.