Skip to content
2 changes: 1 addition & 1 deletion openshift/cmd/annotate/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/ovn-kubernetes/ovn-kubernetes/openshift/test/annotate"
"github.com/ovn-kubernetes/ovn-kubernetes/openshift/pkg/annotate"
)

func main() {
Expand Down
15 changes: 9 additions & 6 deletions openshift/cmd/ovn-kubernetes-tests-ext/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import (
"os"
"strings"

"github.com/ovn-kubernetes/ovn-kubernetes/openshift/test"
ocpdeploymentconfig "github.com/ovn-kubernetes/ovn-kubernetes/openshift/test/deploymentconfig"
"github.com/ovn-kubernetes/ovn-kubernetes/openshift/test/generated"
ocpinfraprovider "github.com/ovn-kubernetes/ovn-kubernetes/openshift/test/infraprovider"
ocptest "github.com/ovn-kubernetes/ovn-kubernetes/openshift/pkg"
ocpdeploymentconfig "github.com/ovn-kubernetes/ovn-kubernetes/openshift/pkg/deploymentconfig"
"github.com/ovn-kubernetes/ovn-kubernetes/openshift/pkg/generated"
ocpinfraprovider "github.com/ovn-kubernetes/ovn-kubernetes/openshift/pkg/infraprovider"

// import OpenShift-specific EVPN tests to register Ginkgo Describes
_ "github.com/ovn-kubernetes/ovn-kubernetes/openshift/test"

// import ovn-kubernetes tests
_ "github.com/ovn-kubernetes/ovn-kubernetes/test/e2e"
Expand Down Expand Up @@ -118,8 +121,8 @@ func main() {
}
})

informingTests := sets.New(test.InformingTests...)
blockingTests := sets.New(test.BlockingTests...)
informingTests := sets.New(ocptest.InformingTests...)
blockingTests := sets.New(ocptest.BlockingTests...)

specs.Walk(func(spec *extensiontests.ExtensionTestSpec) {
for _, label := range getTestExtensionLabels() {
Expand Down
2 changes: 1 addition & 1 deletion openshift/cmd/ovn-kubernetes-tests-ext/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"strings"

ocphacke2e "github.com/ovn-kubernetes/ovn-kubernetes/openshift/test"
ocphacke2e "github.com/ovn-kubernetes/ovn-kubernetes/openshift/pkg"

"github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
Expand Down
7 changes: 6 additions & 1 deletion openshift/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ require (
github.com/openshift/api v0.0.0-20260311143357-f6ee4c095675
github.com/openshift/client-go v0.0.0-20260306160707-3935d929fc7d
github.com/ovn-kubernetes/ovn-kubernetes/go-controller v1.0.0
// Placeholder pseudo-version; the real module path is wired via replace ../test/e2e below.
github.com/ovn-kubernetes/ovn-kubernetes/test/e2e v0.0.0-00010101000000-000000000000
github.com/spf13/cobra v1.10.0
k8s.io/api v0.35.1
k8s.io/apimachinery v0.35.1
k8s.io/client-go v0.35.1
k8s.io/component-base v0.35.1
k8s.io/kubernetes v1.35.1
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2
)

require (
Expand Down Expand Up @@ -207,7 +209,6 @@ require (
k8s.io/kubelet v0.35.1 // indirect
k8s.io/mount-utils v0.34.1 // indirect
k8s.io/pod-security-admission v0.35.1 // indirect
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect
kubevirt.io/api v1.4.0 // indirect
kubevirt.io/containerized-data-importer-api v1.57.0-alpha1 // indirect
kubevirt.io/controller-lifecycle-operator-sdk/api v0.0.0-20220329064328-f3cc58c6ed90 // indirect
Expand All @@ -221,6 +222,10 @@ require (
sigs.k8s.io/yaml v1.6.0 // indirect
)

// k8s.io/* versions in the require block above are nominal constraints. The
// replace directives below point k8s.io/api, k8s.io/apimachinery,
// k8s.io/client-go, k8s.io/component-base, and the other listed staging modules
// at openshift/kubernetes forks — those pins are authoritative for OpenShift builds.
replace (
github.com/coreos/go-iptables => github.com/trozet/go-iptables v0.0.0-20240328221912-077e672b3808
github.com/docker/docker => github.com/docker/docker v26.1.5+incompatible
Expand Down
2 changes: 1 addition & 1 deletion openshift/hack/update-tests-annotation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ ${HERE}/check-go-mod-consistency.sh
# Update e2e test annotations that indicate openshift compatibility
pushd "$ROOT"
trap popd EXIT
go generate -mod=vendor "$ROOT/test/e2e_test.go"
go generate -mod=vendor "$ROOT/pkg/e2e_test.go"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ package annotate

import (
// ensure all the ginkgo tests are loaded
_ "github.com/ovn-kubernetes/ovn-kubernetes/openshift/test"
_ "github.com/ovn-kubernetes/ovn-kubernetes/test/e2e"
)

var (
// LabelToLabelMaps label -> label (ginkgo label)
// E2E tests are written with the support of ginkgo. ginkgo tests may contain Labels.
LabelToLabelMaps = map[string][]string{
// Map the Ginkgo Serial decorator to [Serial] so the annotate tool can assign
// the test to openshift/conformance/serial instead of openshift/conformance/parallel.
"[Serial]": {"Serial"},
"[Disabled:Unimplemented]": {
`[Feature:Service]`,
`[Feature:NetworkPolicy]`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ func (m openshift) FRRK8sNamespace() string {
return "openshift-frr-k8s"
}

func (m openshift) FRRK8sDaemonSetName() string {
return "frr-k8s"
}

func (m openshift) ExternalBridgeName() string {
return "br-ex"
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ var AppendedAnnotations = map[string]string{

"BGP: Pod to external server when CUDN network is advertised Route Advertisements layer3": "[Disabled:Unimplemented]",

"BGP: When default podNetwork is advertised when a client ovnk pod is created can connect to an external server and another cluster node after toggling default network advertisement off and back on": "[Disabled:Unimplemented]",
"BGP: When default podNetwork is advertised when a client ovnk pod is created can connect to an external server and another cluster node after toggling default network advertisement off and back on": "[Disabled:Unimplemented][Serial]",

"BGP: When default podNetwork is advertised when a client ovnk pod is created tests are run towards the external agnhost echo server": "[Disabled:Unimplemented]",

Expand Down Expand Up @@ -833,6 +833,14 @@ var AppendedAnnotations = map[string]string{

"Creating a static pod on a node Should successfully create then remove a static pod": "[Disabled:Unimplemented]",

"EVPN: disruptive actions with L3 IP-VRF, L2 MAC-VRF, and L2 MAC-VRF+IP-VRF recovers after node restart": "[Serial][Suite:openshift/conformance/serial]",

"EVPN: disruptive actions with L3 IP-VRF, L2 MAC-VRF, and L2 MAC-VRF+IP-VRF recovers after OVN-K restart": "[Serial][Suite:openshift/conformance/serial]",

"EVPN: disruptive actions with L3 IP-VRF, L2 MAC-VRF, and L2 MAC-VRF+IP-VRF recovers after FRR-K8s restart": "[Serial][Suite:openshift/conformance/serial]",

"EVPN: disruptive actions with L3 IP-VRF, L2 MAC-VRF, and L2 MAC-VRF+IP-VRF recovers after spine restart": "[Serial][Suite:openshift/conformance/serial]",

"EVPN: VTEP API validations api-server should accept valid VTEP CRs Valid VTEP configurations": "[Suite:openshift/conformance/parallel]",

"EVPN: VTEP API validations api-server should accept valid VTEP updates Valid VTEP update configurations": "[Suite:openshift/conformance/parallel]",
Expand Down Expand Up @@ -1567,7 +1575,7 @@ var AppendedAnnotations = map[string]string{

"Node IP and MAC address migration when when MAC address changes when a nodeport service is configured Ensures flows are updated when MAC address changes": "[Disabled:Unimplemented]",

"Node Shutdown and Startup should maintain cluster health after node shutdown and startup": "[Disabled:Unimplemented]",
"Node Shutdown and Startup should maintain cluster health after node shutdown and startup": "[Disabled:Unimplemented][Serial]",

"OVS CPU affinity pinning can be enabled on specific nodes by creating enable_dynamic_cpu_affinity file": "[Disabled:Unimplemented]",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,25 @@ func (o *OpenshiftInfraProvider) StartNode(nodeName string) error {
panic("not implemented")
}

// RebootNode restarts the OpenShift node via `oc debug node/<name> -- chroot /host systemctl reboot`.
// The node will go NotReady while rebooting and come back Ready automatically —
// no separate StartNode call is needed.
//
// Fail fast if the node cannot be reached (bad name, auth, or oc debug). The
// actual reboot is fire-and-forget: the session may be killed before clean exit,
// so non-zero exit from systemctl reboot is logged but not returned.
func (o *OpenshiftInfraProvider) RebootNode(nodeName string) error {
if _, err := o.ExecK8NodeCommand(nodeName, []string{"true"}); err != nil {
return fmt.Errorf("failed to validate access to node %q before reboot: %w", nodeName, err)
}
go func() {
if _, err := o.ExecK8NodeCommand(nodeName, []string{"systemctl", "reboot"}); err != nil {
framework.Logf("reboot command for node %q returned: %v", nodeName, err)
}
}()
return nil
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}

func (o *OpenshiftInfraProvider) GetDefaultTimeoutContext() *framework.TimeoutContext {
timeouts := framework.NewTimeoutContext()
timeouts.PodStart = 10 * time.Minute
Expand Down
File renamed without changes.
7 changes: 6 additions & 1 deletion openshift/test/tests.go → openshift/pkg/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ var InformingTests = []string{
"[Feature:NetworkSegmentation][ovn-kubernetes-ote][sig-network] Network Segmentation UserDefinedNetwork CRD Controller for primary UDN without required namespace label should not be able to update the namespace and remove the UDN label [Suite:openshift/conformance/parallel]",
"[Feature:NetworkSegmentation][ovn-kubernetes-ote][sig-network] Network Segmentation when primary network exist, ClusterUserDefinedNetwork status should report not-ready [Suite:openshift/conformance/parallel]",
"[Feature:NetworkSegmentation][ovn-kubernetes-ote][sig-network] Network Segmentation when primary network exist, UserDefinedNetwork status should report not-ready [Suite:openshift/conformance/parallel]",
// EVPN tests
// EVPN disruptive tests - one test per disruptive action
"[Feature:EVPN][FeatureGate:EVPN][Serial][ovn-kubernetes-ote][sig-network] EVPN: disruptive actions with L3 IP-VRF, L2 MAC-VRF, and L2 MAC-VRF+IP-VRF recovers after node restart [Serial][Suite:openshift/conformance/serial]",
"[Feature:EVPN][FeatureGate:EVPN][Serial][ovn-kubernetes-ote][sig-network] EVPN: disruptive actions with L3 IP-VRF, L2 MAC-VRF, and L2 MAC-VRF+IP-VRF recovers after OVN-K restart [Serial][Suite:openshift/conformance/serial]",
"[Feature:EVPN][FeatureGate:EVPN][Serial][ovn-kubernetes-ote][sig-network] EVPN: disruptive actions with L3 IP-VRF, L2 MAC-VRF, and L2 MAC-VRF+IP-VRF recovers after FRR-K8s restart [Serial][Suite:openshift/conformance/serial]",
"[Feature:EVPN][FeatureGate:EVPN][Serial][ovn-kubernetes-ote][sig-network] EVPN: disruptive actions with L3 IP-VRF, L2 MAC-VRF, and L2 MAC-VRF+IP-VRF recovers after spine restart [Serial][Suite:openshift/conformance/serial]",
// EVPN non-disruptive tests
"[Feature:EVPN][Feature:RouteAdvertisements][FeatureGate:EVPN][ovn-kubernetes-ote][sig-network] BGP: For BGP configured networks When the tested network is of type Layer 2 CUDN EVPN MAC-VRF and IP-VRF When a pod runs on the tested network Can reach KAPI service [Suite:openshift/conformance/parallel]",
"[Feature:EVPN][Feature:RouteAdvertisements][FeatureGate:EVPN][ovn-kubernetes-ote][sig-network] BGP: For BGP configured networks When the tested network is of type Layer 2 CUDN EVPN MAC-VRF and IP-VRF When a pod runs on the tested network It can be reached by an external server on the same network When the network is IPv4 [Suite:openshift/conformance/parallel]",
"[Feature:EVPN][Feature:RouteAdvertisements][FeatureGate:EVPN][ovn-kubernetes-ote][sig-network] BGP: For BGP configured networks When the tested network is of type Layer 2 CUDN EVPN MAC-VRF and IP-VRF When a pod runs on the tested network It can be reached by an external server on the same network When the network is IPv6 [Suite:openshift/conformance/parallel]",
Expand Down
Loading