Skip to content

host_no_sdn_controller: do not fail, but reconfigure the host. - #680

Merged
semarie merged 1 commit into
masterfrom
srt/no-sdn-controller
Sep 4, 2026
Merged

host_no_sdn_controller: do not fail, but reconfigure the host.#680
semarie merged 1 commit into
masterfrom
srt/no-sdn-controller

Conversation

@semarie

@semarie semarie commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

when a 'no-sdn-controller' host is required (for test_vif_allowed_ip.py for example), do not fail if sdn-controller is active, but disable it for the test (and restore it after).

we get the sdn-controller configuration to reapply it after the test, and reconfigure the ovs bridges to accept both OpenFlow10 and OpenFlow11 versions. OpenFlow11 is usual used for sdn-controller (xapi-plugin) and OpenFlow10 for allowed-ip (see xen-api ocaml/xenopsd/scripts/setup-vif-rules).

@semarie semarie self-assigned this Aug 24, 2026
@semarie
semarie requested review from a team as code owners August 24, 2026 15:38
@semarie

semarie commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

The purpose of this PR is to be able to run both tests requiring sdn-controller (tests/network/test_traffic_rules.py) and the ones requiring not using it (tests/network/test_vif_allowed_ip.py).

Comment thread tests/network/conftest.py Outdated
@semarie
semarie force-pushed the srt/no-sdn-controller branch from 0bc1845 to 562cf57 Compare August 26, 2026 08:10
@semarie

semarie commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Last push:

  • re-introduce sdn-controller configuration using the dict getted before forgetting (instead of managing params one by one)
  • add/remove OpenFlow10 in protocols systematically as a previously configured sdn-controller could leave ovs datapath daemon running (using OpenFlow11) but without sdn-controller configured.

@semarie
semarie requested a review from glehmann August 26, 2026 08:14

@glehmann glehmann left a comment

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.

LGTM for the code structure, but I can't say the same for the network part, by lack of knowledge in that domain.

Comment thread tests/network/conftest.py Outdated
when a 'no-sdn-controller' host is required (for test_vif_allowed_ip.py for example),
do not fail if sdn-controller is active, but disable it for the test (and restore it after).

we get the sdn-controller configuration to reapply it after the test, and reconfigure the ovs bridges to accept
both OpenFlow10 and OpenFlow11 versions. OpenFlow11 is usual used for sdn-controller (xapi-plugin) and OpenFlow10
for allowed-ip (see xen-api ocaml/xenopsd/scripts/setup-vif-rules).

Signed-off-by: Sebastien Rodot <sebastien.rodot@vates.tech>
@semarie
semarie force-pushed the srt/no-sdn-controller branch from 562cf57 to a10e76e Compare August 27, 2026 11:23

@gthvn1 gthvn1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one minor comment otherwise LGTM.
But as @glehmann my knowledge about network is not that good so feel free to ping a real network guy if needed :)

Comment thread tests/network/conftest.py

# when using sdn-controller, we are usually using OpenFlow11 only
# but allow-id is using OpenFlow10 and it fails to sets rules if OpenFlow11 is enabled only.
host.ssh("set -o pipefail; ovs-vsctl list-br "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if ovs-vsctl raised all forgotten sdn will remain forgotten. Not sure if it is a real issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it shouldn't be a problem. the set -o pipefail was added due to @glehmann remark as "if it raises it means OVS is completely off, and we are already in bad shape"

@semarie
semarie merged commit dc9bf0d into master Sep 4, 2026
11 checks passed
@semarie
semarie deleted the srt/no-sdn-controller branch September 4, 2026 16:48
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.

3 participants