Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packaging/rpm/microshift.spec
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ The microshift-selinux package provides the SELinux policy modules required by M

%package networking
Summary: Networking components for MicroShift
Requires: openvswitch3.1
Requires: openvswitch3.1 == 3.1.0-14.el9fdp
Requires: NetworkManager
Requires: NetworkManager-ovs
Requires: jq
Expand Down
4 changes: 2 additions & 2 deletions pkg/components/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ func startCNIPlugin(ctx context.Context, cfg *config.Config, kubeconfigPath stri

ovnConfig, err := ovn.NewOVNKubernetesConfigFromFileOrDefault(filepath.Dir(config.ConfigFile), cfg.MultiNode.Enabled)
if err != nil {
return err
return fmt.Errorf("failed to create OVN-K configuration from %q: %w", config.ConfigFile, err)
}

if err := ovnConfig.Validate(); err != nil {
return fmt.Errorf("failed to validate ovn-kubernetes configurations %v", err)
return fmt.Errorf("failed to validate ovn-kubernetes configuration: %w", err)
}

if err := assets.ApplyNamespaces(ctx, ns, kubeconfigPath); err != nil {
Expand Down
11 changes: 7 additions & 4 deletions pkg/config/ovn/ovn.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,30 @@ func (o *OVNKubernetesConfig) Validate() error {
// br-ex is required to run ovn-kubernetes
err := o.validateOVSBridge()
if err != nil {
return err
return fmt.Errorf("failed to validate OVS bridge: %w", err)
}
err = o.validateConfig()
if err != nil {
return err
return fmt.Errorf("failed to validate OVN-K configuration: %w", err)
}
return nil
}

// validateOVSBridge validates the existence of ovn-kubernetes br-ex bridge
func (o *OVNKubernetesConfig) validateOVSBridge() error {
_, err := net.InterfaceByName(OVNGatewayInterface)
return err
if err != nil {
return fmt.Errorf("failed to find OVN gateway interface %q: %w", OVNGatewayInterface, err)
}
return nil
}

// validateConfig validates the user defined configuration in /etc/microshift/ovn.yaml
func (o *OVNKubernetesConfig) validateConfig() error {
// validate MTU conf
iface, err := net.InterfaceByName(OVNGatewayInterface)
if err != nil {
return err
return fmt.Errorf("failed to find OVN gateway interface %q: %w", OVNGatewayInterface, err)
}

if iface.MTU < o.MTU {
Expand Down
7 changes: 7 additions & 0 deletions test/bin/ci_phase_iso_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ exec &> >(tee >(awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush() }' >"${

PULL_SECRET=${PULL_SECRET:-${HOME}/.pull-secret.json}

# Clean the dnf cache to avoid corruption
dnf clean all

# Show what other dnf commands have been run to try to debug why we
# sometimes see cache collisons.
dnf history --reverse

cd ~/microshift

# Get firewalld and repos in place. Use scripts to get the right repos
Expand Down
2 changes: 1 addition & 1 deletion test/suites/snapshot.robot
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Test Case Setup
[Documentation] Prepare the cluster-level APIs and a data-volume with some simple text
Oc Apply -f ${STORAGE_CLASS} -f ${SNAPSHOT_CLASS}
Oc Apply -k ${SOURCE_KUSTOMIZE} -n ${NAMESPACE}
Oc Wait For pod/${POD_NAME_STATIC} condition\=Ready
Oc Wait For pod/${POD_NAME_STATIC} condition\=Ready timeout=60s
Write To Volume ${POD_NAME_STATIC} ${TEST_DATA}
Oc Delete pod ${POD_NAME_STATIC} -n ${NAMESPACE}
Oc Wait For pod/${POD_NAME_STATIC} delete
Expand Down