addinig vmi network filter outages#1234
Conversation
6c313a1 to
fb521be
Compare
Review Summary by QodoAdd VMI network chaos scenario support with nsenter-based injection
WalkthroughsDescription• Add VMI (Virtual Machine Instance) network chaos scenario support • Implement get_vmi_targets() method for VMI target resolution • Create new VmiNetworkChaosModule for injecting network chaos into VMIs • Improve node interface recovery command execution reliability • Register VMI network chaos module in factory Diagramflowchart LR
A["NetworkChaosScenarioType"] -->|"Add VMI enum"| B["VMI = 3"]
C["AbstractNetworkChaosModule"] -->|"Add get_vmi_targets()"| D["VMI target resolution"]
E["VmiNetworkChaosModule"] -->|"New module"| F["Inject network chaos via nsenter"]
G["NetworkChaosFactory"] -->|"Register"| E
D -->|"Uses"| F
File Changes1. krkn/scenario_plugins/network_chaos_ng/models.py
|
Code Review by Qodo
1. label_selector lacks regex support
|
6645656 to
e9379ed
Compare
16881d1 to
28a230e
Compare
28a230e to
679bbab
Compare
| egress: true | ||
| protocols: | ||
| - tcp | ||
| - udp |
There was a problem hiding this comment.
Hello @paigerube14 since protocols and ports are not relevant for this scenario, may be they can be removed from the config.
There was a problem hiding this comment.
thanks for pointing this out, I changed the code to add the protocols and ports to better align with the pod/node network scenarios
There was a problem hiding this comment.
do you feel its needed or should we automatically just do all ports and tcp/udp with the way it was?
There was a problem hiding this comment.
PR #1234 and #1260 are currently designed to handle bridge mode networking only (detecting k6t-* bridges). For masquerade mode VMIs, the current workaround is to use generic pod network chaos
(pod_network_filter/pod_network_chaos) on the virt-launcher pod, which blocks all pod traffic including VM traffic.
However, a better design would be to make VMI network chaos mode-aware: automatically detect the VMI's networking mode (bridge, masquerade, SR-IOV, etc.) and apply the appropriate chaos technique. This would:
- Users don't need to understand VMI networking modes to choose the right scenario
- same configuration works across different VMI networking modes
There was a problem hiding this comment.
thanks for the background/advice here Yogi. Completely agree a user should be able to not know the backend of their networking and the scenario properly choose. Making updates on that
Signed-off-by: Paige Patton <[email protected]>
Type of change
Description
Adding ability to run network filter scenarios but for vmi
Related Tickets & Documents
If no related issue, please create one and start the converasation on wants of
Documentation
If checked, a documentation PR must be created and merged in the website repository.
Related Documentation PR (if applicable)
<-- Add the link to the corresponding documentation PR in the website repository -->
Checklist before requesting a review
[ ] Ensure the changes and proposed solution have been discussed in the relevant issue and have received acknowledgment from the community or maintainers. See contributing guidelines
See testing your changes and run on any Kubernetes or OpenShift cluster to validate your changes
Validated in prometheus

REQUIRED:
Description of combination of tests performed and output of run
OR