From e90a8a72631925d8db653c27d512bcf9d3f4546b Mon Sep 17 00:00:00 2001 From: Tiago Pires Date: Fri, 25 Oct 2024 17:10:45 -0300 Subject: [PATCH] Adding support for deb packages - Fix Adding new package python3-systemd, required by systemd services that uses python3. --- image/cinc/install_ubuntu_pkg.sh | 1 + image/ovn/Dockerfile | 12 ++++++++++-- install_ovn.sh | 6 ++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/image/cinc/install_ubuntu_pkg.sh b/image/cinc/install_ubuntu_pkg.sh index 65f241f..5228f35 100755 --- a/image/cinc/install_ubuntu_pkg.sh +++ b/image/cinc/install_ubuntu_pkg.sh @@ -41,6 +41,7 @@ apt install -yq --no-install-recommends \ python3-pip \ python3-psutil \ python3-six \ + python3-systemd \ resource-agents* \ tcpdump \ uuid diff --git a/image/ovn/Dockerfile b/image/ovn/Dockerfile index 6a2e2e2..22d913d 100644 --- a/image/ovn/Dockerfile +++ b/image/ovn/Dockerfile @@ -12,8 +12,8 @@ ARG USE_OVSDB_ETCD COPY $OVS_SRC_PATH /ovs COPY $OVN_SRC_PATH /ovn -COPY *.rpm / -COPY *.deb / +COPY README.md *.rpm / +COPY README.md *.deb / COPY install_ovn.sh /install_ovn.sh COPY install_utils_from_sources.sh /install_utils_from_sources.sh COPY install_ovsdb_etcd.sh /install_ovsdb_etcd.sh @@ -27,6 +27,14 @@ RUN /install_utils_from_sources.sh $INSTALL_UTILS_FROM_SOURCES RUN /install_ovsdb_etcd.sh RUN /install_etcd.sh +RUN if [ "$USE_OVN_DEBS" = "yes" ]; then \ + /usr/bin/systemctl disable ovn-central && \ + /usr/bin/systemctl disable ovn-ic-db && \ + /usr/bin/systemctl disable ovn-ic && \ + /usr/bin/systemctl disable openvswitch-switch && \ + /usr/bin/systemctl disable ovn-host ; \ + fi + VOLUME ["/var/log/openvswitch", \ "/var/lib/openvswitch", "/var/run/openvswitch", "/etc/openvswitch", \ "/var/log/ovn", "/var/lib/ovn", "/var/run/ovn", "/etc/ovn"] diff --git a/install_ovn.sh b/install_ovn.sh index 18ed26c..2ff527f 100755 --- a/install_ovn.sh +++ b/install_ovn.sh @@ -16,7 +16,8 @@ set -o xtrace set -o errexit use_ovn_rpm=$1 -extra_optimize=$2 +use_ovn_debs=$2 +extra_optimize=$3 # When system's python environment is marked as "Externally managed" # (PEP 668), this variable is needed to allow pip to install @@ -32,8 +33,9 @@ fi if [ "$use_ovn_rpm" = "yes" ]; then ls ovn*.rpm > /dev/null || exit 1 dnf install -y /*.rpm -elif [ "$user_ovn_debs" = "yes" ]; then +elif [ "$use_ovn_debs" = "yes" ]; then ls ovn*.deb > /dev/null || exit 1 + apt update apt install -y /*.deb else mkdir -p /root/ovsdb-etcd/schemas