Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] OVS DPDK cannot be initialized #4527

Open
gespinozat opened this issue Sep 16, 2024 · 1 comment
Open

[BUG] OVS DPDK cannot be initialized #4527

gespinozat opened this issue Sep 16, 2024 · 1 comment
Labels
bug Something isn't working chart Helm Chart

Comments

@gespinozat
Copy link

gespinozat commented Sep 16, 2024

Kube-OVN Version

v.1.12.22

Kubernetes Version

v1.29.5

Operation-system/Kernel Version

Ubuntu 22.04.4 LTS
5.15.0-25-generic

Description

I tried setting up the DPDK support, but both the install.sh script and the Helm chart use the image tag v1.12.22-dpdk, which is currently not available. I found v1.12.22-dpdk-x86 and tried it, but OVS cannot be initialized:

Steps To Reproduce

Execute the install.sh script:

wget https://raw.githubusercontent.com/kubeovn/kube-ovn/release-1.12/dist/images/install.sh
bash install.sh --with-hybrid-dpdk

Current Behavior

OVS cannot be initialized.

$ kubectl -n kube-system logs ovs-ovn-dpdk-lk6xd
...
ERROR: This system does not support "VPCLMULQDQ".
Please check that RTE_MACHINE is set correctly.
EAL: FATAL: unsupported cpu type.
2024-09-10T14:52:48Z|00011|dpdk|EMER|Unable to initialize DPDK: Operation not supported
ovs-vswitchd: Cannot init EAL (Operation not supported)
ovs-vswitchd: could not initiate process monitoring

  • Starting ovs-vswitchd
  • Exiting ovsdb-server (1360709)
  • ovn-controller is not running

Expected Behavior

OVS bridge initializes normally

@gespinozat gespinozat added the bug Something isn't working label Sep 16, 2024
Copy link

dosubot bot commented Sep 16, 2024

Hey there, @gespinozat! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this together!

I found a similar closed issue that might be relevant to your problem: kube-ovn-dpdk-base build not successful (dpdk 22.11.1 + ovs3.1). This issue was resolved by a pull request: feat: dpdk-22.11.1 support by kube-ovn [1].

To resolve the issue where OVS cannot be initialized due to unsupported CPU type when setting up DPDK support with Kube-OVN v1.12.22 on Ubuntu 22.04.4 LTS, you need to ensure that your CPU supports the required instruction sets, such as AVX-512. The Dockerfile provided includes a step to check for AVX-512 support:

# The support for AVX-512 depends on your build machine's CPU. judge it support the avx512 use the command 'cat /proc/cpuinfo | grep avx512'

Follow these steps:

  1. Check CPU Support: Verify if your CPU supports AVX-512 by running:

    cat /proc/cpuinfo | grep avx512
  2. Modify Dockerfile if Necessary: If your CPU does not support AVX-512, adjust the build flags in the Dockerfile to match your CPU's capabilities. For example, modify the CONFIGURE_OPTS to use different flags:

RUN cd /usr/src/ovs && \
    ./boot.sh && \
    ./configure --with-dpdk=shared && \
    rm -rf .git && \
    echo override_dh_shlibdeps: >> /usr/src/ovs/debian/rules && \
    echo "\tdh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info" >> /usr/src/ovs/debian/rules && \
    export DPDK_DIR=/usr/src/dpdk-stable-${DPDK_VERSION} && \
    CONFIGURE_OPTS='CFLAGS="-fPIC"' && \
    if [ "$ARCH" = "amd64" ]; then CONFIGURE_OPTS='CFLAGS="-O2 -g -msse4.2 -mpopcnt -fPIC"'; fi && \
    DATAPATH_CONFIGURE_OPTS='--prefix=/usr' EXTRA_CONFIGURE_OPTS=$CONFIGURE_OPTS make debian-deb
  1. Rebuild the Docker Image: After making the necessary changes, rebuild the Docker image to ensure that OVS and DPDK are compiled with the correct CPU flags.

Additionally, ensure you are using a supported DPDK version. According to the install.sh script, the supported DPDK version is 19.11. You can specify the DPDK version and other configurations when running the installation script:

./install.sh --with-dpdk=19.11 --dpdk-cpu=1000m --dpdk-memory=2Gi

By ensuring that the CPU flags used during the build process are compatible with your CPU and using a supported DPDK version, you should be able to resolve the initialization issue with OVS and DPDK [2][3].

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the chart Helm Chart label Sep 16, 2024
@gespinozat gespinozat changed the title [BUG] [BUG] OVS DPDK cannot be initialized Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chart Helm Chart
Projects
None yet
Development

No branches or pull requests

1 participant