The fallback mechanism in dvr ingress test was introduced
in [1] in order to allow the test to work properly on
environments where the host that is used as proxy host
does not have routing to neutron external network.
As appeared the ping check in this fallback mechanism
is working inconsistently on some environments in case
cirros image is used as default image.
This patch changes the problematic ping check to
check_connectivity function that does multiple retries
before raising an exception.
[1] https://review.opendev.org/c/x/whitebox-neutron-tempest-plugin/+/925475
Change-Id: I82a5095d31a7b9e96821a0985e1400814eda02b2
This patch replaces mentions of Tripleo in the plugin description
lines by openstack-k8s-operators.
Change-Id: Ic0fc4b619cbf0be5b3da5a94c6fec1e4daeac119
On podified environments we can't use local IP for establishing
TCP connection via virtual IP (VIP) since tempest is running on
a node that can be a gateway node and logic of the test will be
affected. Therefore a separate VM is spawned on the external
network and it is used as a proxy host for establishing TCP
connection to the FIP.
Also introduced a function ensure_external_network_is_shared()
and simplified some tests from other files that had the same
code.
Change-Id: I099ec34299debcd43b8ce485656e3ea6d7a95f51
The new test added checks that the time spent to restart the Neutron API
doesn't take more than one minute.
Closes-Bug: #OSPRH-2460
Change-Id: I467f6c2124b8e3d6eb76bea399fd9cc5bd553b5c
If a command returns an empty list, the "grep" command will exit with
error. In the ``OvnFdbAgingTest`` test case, we need to retrieve the
OVN SB FDB table to read the MAC address. The output is something like
this (one single register):
$ ovn-sbctl list FDB
_uuid : 7422a4fb-fb01-47b5-b408-1b59470f0e9d
dp_key : 1
mac : "fa:16:3e:69:a9:f9"
port_key : 7
timestamp : 1726246598759
It is possible to output the MAC address by adding the needed filters to
the command:
$ ovn-sbctl --format=list --bare --columns=mac list FDB
fa:16:3e:69:a9:f9
Related-Bug: #OSPRH-893
Change-Id: Iaca410d9943a39e76f86ec51b5292ed896f8088b
Before this patch, tests capturing dataplane traffic tried to start
captures on all podified nodes (those with 'is_controller' set to
True). However, dataplane traffic should only be captured on podified
nodes running an ovs pod.
Change-Id: I6c7f45166b623f5f2b8bdfa7892605ae1b4f152d
The method ``get_ml2_conf_file`` now uses the configuration option
"ml2_plugin_config" instead of the hardcoded default value
"/etc/neutron/plugins/ml2/ml2_conf.ini"
Change-Id: Ib749d3b35ebaf030375160ebdc63b2ec4f73b959
Accidental double restart may cause race condition of service not up in
time when listed by second restart call of reset_node_service.
Resolves: OSPCIX-467
Change-Id: I941673a3cbb6c755254029b8c7b9eb4a456c2d48
Due to OSPRH-9248, security group logging writes to journal,
changed in tests accordingly to '/var/log/messages'.
Log rotation test will be skipped on podified.
Change-Id: I4402e777c5262da154bf56351fd57625108c0381
This method checks if the Neutron API replies to a generic command
("agent list").
Related-Bug: #OSPRH-2460
Change-Id: I7982bb130e4a8ef7495e6243f656cc4095d35db8
Recently FQDNs were needed for traffic flow tests [1],
but it seems AZ tests are affected as well from this fix.
This change fixes API network agent listing
for 'OVN Controller Gateway agent' to match short hostnames to zones.
Short hostnames used since API may show a mix of short/full names.
[1] 926195: Use long names when getting router gateway | https://review.opendev.org/c/x/whitebox-neutron-tempest-plugin/+/926195
Change-Id: Iafeced62b4ebe50a20f976803fd8a0cdbfeb3330
Use 'unix' rather than 'punix' when running monitoring command
in ovsdbserver pod since 'punix' is a passive, a.k.a. listening
side of a connection.
Fix typo in ovnsb_db.sock path.
Change-Id: Id384e20ff0c786032fff18ca287ecd9bc32db06b
This allows metadata rate limiting tests to run fully,
yet they will be skipped until feature code will be inserted to RHOSO.
The ini filename/location from which configuration pulled and applied
changed in RHOSO, now used instead of 'oc patch' for edpm nodes.
Also service existence check fixed, pointed to strip method instead of
calling it, which mistakenly interpreted as true, so later code included
crc node as node to restart metadata service, results in failure of test.
In metadata rate limiting tests redundant code removed,
and made configuration setting restart service in minimal amounts.
Change-Id: I2b44e2dbf97f87b8fd9b5feee49a634300367218
In order to ensure traffic flow tests behave consistently
on different environments the functions that are retrieving
router gateway chassis should use full names.
Change-Id: Ic8097270271433e68ffee1b8685caf01097d9393
It was found that sometimes an unexpected output returned when
using 'oc rsh' on attempt to get ovsdb command string from db pod.
This was causing an AssertingError and a test failure.
Compared to 'oc rsh' the issue does not happen when using 'oc exec'
command.
Also running ps in the background using setsid helps to avoid
sporadic errors due to [1].
[1] https://github.com/kubevirt/kubevirt/issues/10240
Change-Id: I77530691613ca352ce5e5650b3a2450a7003f459
Method should return boolean according to check,
yet raises error upon expected non-zero exit status.
Change-Id: I328edfabbf0b7ff0df8eadaf3a151aa2ab9fcfe4
Before this patch, the test test_dns_name_after_ovn_controller_restart
used the value from VM's `OS-EXT-SRV-ATTR:host` to search for the
corresponding compute node within the inventory.
Due to recent changes, the compute name has changed in the inventory and
the proper value that needs to be searched corresponds with
`OS-EXT-SRV-ATTR:hypervisor_hostname` instead.
This patch fixes test_dns_name_after_ovn_controller_restart by using the
value from `OS-EXT-SRV-ATTR:hypervisor_hostname`.
Change-Id: I2e928c987c0446b6c8b8a93abcb58122d3173207
Due to recent changes in inventory creation, node names use FQDN and
this may cause issues when deciding whether a node is an OCP node or
not. Example: "compute-0.ocp.openstack.lab" is not an OCP node, but
"ocp" is part of its hostname.
With this patch, the issue with FQDNs is resolved by checking how the
hostname starts.
Change-Id: I75ad4316338effccb67614997909ee7d7ff17c65
With vlan tenant we have mac-mapping configured in ovs db
for compute nodes. These MAC values should be used when
filtering relevant traffic for east_west communication.
Also, introduced separate tunnel_interface config parameter
to define an appropriate value when capturing traffic on
a normal node and on ovs_pod.
Change-Id: Ibef4498604bd9fff7ab537ed276ce59e8a052cd6
In case proxy host on the environment for some reason
does not have routing to the external network
spawn a VM on external network to use it as a proxy
host for sending traffic to the VM under test.
Note: on podified environment we can not ping VM in
DVR test from a local ip since tempest is running on
one of the OCP cluster nodes and FIP-related traffic
will be captured on the gateway node (when only
compute nodes are expected) and thus affecting the
results.
Change-Id: I35def1d0d0e419cbcf552bc6148ed112567aa8f6
A new target_state parameter was introduced into
remote_service_action() function in order to make sure that
a service reached the expected state.
Change-Id: I6fe09ffa86c7cbc703db56a7b72d0cf90b42f9f4
Nodes interfaces discover was introduced in [1] where code
was extended to support tcpdump captures on different type of
nodes (including OCP cluster nodes).
Since then the code was modified to capture traffic on OCP nodes
differently comparing to normal nodes and there is no longer need
in interfaces discover for nodes since a config value can be used
instead.
[1] https://review.opendev.org/c/x/whitebox-neutron-tempest-plugin/+/913238
Change-Id: Ida23fa855a7986ba5c5f9ca49663644715783a24
The use of retry decorator is easy and tempting,
many test methods may find various issues, therefore raising exceptions,
this change forces specific failure to be targeted by retry decorator
in order to avoid dismissing other exceptions which require a fix.
This is done by an obligatory regex, which validates
the exception caught and dismissed has the intended assertion message.
There is optional exception type argument, in order to let other
unexpected exceptions to be raised and fail the test.
Change-Id: Ib9a17d8c6c8778adf546c610dd070c14aff45ecd
Upstream network isn't as stable in downstream test execution,
test quickly checks traffic over time periods for configured limits,
asserts that there is no traffic loss to verify rate limitation
correctly.
This oftens fails on upstream gates, therefore adding the retry
decorator up to 3 times to get stable measures for test, while not
failing check/gate patches.
Change-Id: I7ad1fd74df4460554beb6b0ea89abcf8153645cb
This fixes tests in the following test files [1].
Method 'validate_command' is commonly used for openstack/oc commands,
therefore default ssh client should be the proxy host
(localhost on devstack, controller on podified for now).
Another new argument 'local_shell' allows to easily override and
execute any command locally (without ssh connection).
[1]
test_provider_network.py
test_router_flavors.py
test_security_group_logging.py
Change-Id: I9138b1081870da4162eeb40ca055e3547f5c12b9