[ovn] Add openvswitch user with uid 42424

This is needed for running openvswitch as non root.

Depends-On: Ie00dd2657c616645ec237c0880bbc552b3805236
Change-Id: I79dac70d752bd0a7013740933c2cc4a4348850fa
This commit is contained in:
Vladimir Kozhukalov 2025-01-29 08:47:48 -06:00
parent c899f6b6c1
commit 5dd5a3802d
3 changed files with 15 additions and 3 deletions

@ -16,6 +16,7 @@ ARG TARGETPLATFORM
ADD --chmod=755 https://dl.k8s.io/release/v1.29.3/bin/${TARGETPLATFORM}/kubectl /usr/local/bin/kubectl
ARG OVN_SERIES=24.03
ARG OVN_VERSION=${OVN_SERIES}.1-44
RUN useradd -u 42424 openvswitch
RUN <<EOF sh -xe
dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \
centos-release-nfv-openvswitch.noarch
@ -25,14 +26,14 @@ dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \
openvswitch${OVS_SERIES}-test-${OVS_VERSION}.el9s \
python3-netifaces \
tcpdump
dnf -y clean all
dnf -y clean all
rm -rf /var/cache/dnf
EOF
RUN <<EOF sh -xe
dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \
firewalld-filesystem hostname ovn${OVN_SERIES}-${OVN_VERSION}.el9s procps-ng
dnf -y clean all
dnf -y clean all
rm -rf /var/cache/dnf
EOF
ARG OVN_COMPONENT
@ -40,7 +41,7 @@ RUN <<EOF sh -xe
dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs install \
ovn${OVN_SERIES}-central-${OVN_VERSION}.el9s \
ovn${OVN_SERIES}-host-${OVN_VERSION}.el9s
dnf -y clean all
dnf -y clean all
rm -rf /var/cache/dnf
EOF
COPY --from=ovn-kubernetes --link /src/dist/images/ovndb-raft-functions.sh /root/ovndb-raft-functions.sh

@ -14,6 +14,7 @@ FROM ${FROM} AS base
ARG TARGETPLATFORM=linux/amd64
ADD --chmod=755 https://dl.k8s.io/release/v1.29.3/bin/${TARGETPLATFORM}/kubectl /usr/local/bin/kubectl
ADD --chmod=755 https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini
RUN useradd -u 42424 openvswitch
RUN apt-get update && apt-get install -y \
ovn-host \
ovn-central \

@ -17,6 +17,7 @@
check:
jobs:
- openstack-helm-images-build-ovn
- openstack-helm-images-compute-kit-ovn-2024-1-ubuntu_jammy
gate:
jobs:
- openstack-helm-images-upload-ovn
@ -77,3 +78,12 @@
description: Promote a previously published ovn image to latest.
vars: *ovn_vars
files: *ovn_files
- job:
name: openstack-helm-images-compute-kit-ovn-2024-1-ubuntu_jammy
parent: openstack-helm-compute-kit-ovn-2024-1-ubuntu_jammy
voting: false
files: *ovn_files
dependencies:
- name: openstack-helm-images-build-ovn
soft: true