From 9f82043cad7690a2578de493565ee80116185de3 Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Sun, 15 Oct 2023 18:01:15 -0400 Subject: [PATCH] Remove unsupported network-scripts package Replace network-scripts with NetworkManager and NetworkManager-initscripts-updown. Remove network-scripts-openvswitch. Enable NetworkManager for ifcfg-enp3s0f0s0 and ifcfg-enp3s0f1s0. Signed-off-by: Vladimir Sokolovsky --- oraclelinux/8/Dockerfile.build | 4 ++-- oraclelinux/8/Dockerfile.run | 6 +++--- oraclelinux/8/install.sh | 4 ++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/oraclelinux/8/Dockerfile.build b/oraclelinux/8/Dockerfile.build index ab65942..1fef014 100644 --- a/oraclelinux/8/Dockerfile.build +++ b/oraclelinux/8/Dockerfile.build @@ -19,7 +19,7 @@ RUN yum install -y \ libreswan yum-utils \ device-mapper-persistent-data lvm2 acpid perf popt-devel bc lm_sensors \ cryptsetup rasdaemon pciutils-devel watchdog kexec-tools jq python3-pip libnghttp2 wget \ - annobin kernel-rpm-macros iproute-tc network-scripts usbutils nfs-utils python3-six chkconfig \ + annobin kernel-rpm-macros iproute-tc NetworkManager NetworkManager-initscripts-updown usbutils nfs-utils python3-six chkconfig \ dosfstools e2fsprogs openssh-server RUN yum groupinstall -y "Development Tools" @@ -42,7 +42,7 @@ RUN yum install -y git gcc make flex bison rpm-build python3 openssl-devel elfut # enable ol8 Code Ready Builder for installing meson RUN yum-config-manager --set-enabled ol8_codeready_builder -RUN yum install -y vim meson sudo parted xfsprogs net-tools NetworkManager audit plymouth +RUN yum install -y vim meson sudo parted xfsprogs net-tools audit plymouth RUN yum install -y redhat-lsb-core diff --git a/oraclelinux/8/Dockerfile.run b/oraclelinux/8/Dockerfile.run index 429f1b4..aca0f27 100644 --- a/oraclelinux/8/Dockerfile.run +++ b/oraclelinux/8/Dockerfile.run @@ -45,7 +45,7 @@ RUN dnf install --disableexcludes=kubernetes -y \ lsof libreswan yum-utils device-mapper-persistent-data lvm2 acpid perf \ popt-devel bc lm_sensors cryptsetup rasdaemon pciutils-devel watchdog \ kexec-tools jq python3-pip libnghttp2 wget annobin kernel-rpm-macros \ - iproute-tc network-scripts usbutils nfs-utils python3-six chkconfig \ + iproute-tc NetworkManager NetworkManager-initscripts-updown usbutils nfs-utils python3-six chkconfig \ dosfstools e2fsprogs openssh-server ipmitool \ @BASE_URL@/doca/@DOCA_VERSION@/extras/addons/containerd.io-1.6.22-3.1.el8.aarch64.rpm \ @BASE_URL@/doca/@DOCA_VERSION@/extras/addons/cri-tools-1.25.0-0.aarch64.rpm \ @@ -60,7 +60,7 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle \n\ gpgcheck=1 \n\ enabled=1' > /etc/yum.repos.d/oracle-codeready-ol8.repo -RUN yum install -y vim sudo parted xfsprogs net-tools NetworkManager audit plymouth +RUN yum install -y vim sudo parted xfsprogs net-tools audit plymouth RUN yum install -y python3-prometheus_client libbsd libbsd-devel RUN yum install -y redhat-lsb-core @@ -78,7 +78,7 @@ enabled=1' > /etc/yum.repos.d/oracle-doca-ol8.repo RUN dnf install -y rdma-core rdma-core-devel libibverbs-utils.aarch64 mstflint infiniband-diags infiniband-diags-compat libibumad librdmacm-utils python3-pyverbs -RUN dnf install -y bf-release doca-cx-apps doca-cx-apps-devel doca-cx-libs doca-cx-libs-devel doca-cx-prime-runtime doca-cx-prime-sdk doca-cx-prime-tools doca-cx-samples meson mlnx-dpdk mlnx-dpdk-devel mlnx-tools mlxbf-bfscripts mlxbf-bootctl network-scripts-openvswitch openvswitch openvswitch-ipsec python3-openvswitch mlx-OpenIPMI mft mft-oem mlnx-fw-updater +RUN dnf install -y bf-release doca-cx-apps doca-cx-apps-devel doca-cx-libs doca-cx-libs-devel doca-cx-prime-runtime doca-cx-prime-sdk doca-cx-prime-tools doca-cx-samples meson mlnx-dpdk mlnx-dpdk-devel mlnx-tools mlxbf-bfscripts mlxbf-bootctl openvswitch openvswitch-ipsec python3-openvswitch mlx-OpenIPMI mft mft-oem mlnx-fw-updater RUN echo BlueField_OS_@BF_VERSION@_OL_@DISTRO_VERSION@-@BUILDVER@.@IMAGE_TYPE@@CUSTOM_VERSION@ > /etc/mlnx-release diff --git a/oraclelinux/8/install.sh b/oraclelinux/8/install.sh index 91e9185..6af93ad 100755 --- a/oraclelinux/8/install.sh +++ b/oraclelinux/8/install.sh @@ -439,6 +439,10 @@ interface "oob_net0" { } EOF +# Enable NetworkManager for ifcfg-enp3s0f0s0 and ifcfg-enp3s0f1s0 +sed -i 's@NM_CONTROLLED="no"@NM_CONTROLLED="yes"@' /mnt/etc/sysconfig/network-scripts/ifcfg-enp3s0f0s0 +sed -i 's@NM_CONTROLLED="no"@NM_CONTROLLED="yes"@' /mnt/etc/sysconfig/network-scripts/ifcfg-enp3s0f1s0 + # Customisations per PSID FLINT="" if [ -x /usr/bin/mstflint ]; then