Skip to content

Commit

Permalink
Adding support for deb packages - Fix
Browse files Browse the repository at this point in the history
Adding new package python3-systemd, required by systemd services that uses python3.
  • Loading branch information
Tiago Pires committed Oct 28, 2024
1 parent 53a8dc2 commit e90a8a7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions image/cinc/install_ubuntu_pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ apt install -yq --no-install-recommends \
python3-pip \
python3-psutil \
python3-six \
python3-systemd \
resource-agents* \
tcpdump \
uuid
Expand Down
12 changes: 10 additions & 2 deletions image/ovn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
6 changes: 4 additions & 2 deletions install_ovn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e90a8a7

Please sign in to comment.