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

DPDK MANA CentOS 7 changes #3373

Open
wants to merge 9 commits into
base: mcgov/dpdk-mana-merge
Choose a base branch
from
Prev Previous commit
Next Next commit
dpdtestpmd: fix mirrorlist on centos7
Signed-off-by: Pavel Boldin <pboldin@cloudlinux.com>
  • Loading branch information
paboldin committed Aug 10, 2024
commit b981aee642a598c3ade809f840fd94f7ddd91427
11 changes: 11 additions & 0 deletions microsoft/testsuites/dpdk/dpdktestpmd.py
Original file line number Diff line number Diff line change
@@ -596,6 +596,13 @@ def _set_backport_repo_args(self) -> None:
else:
self._backport_repo_args = []

def _fix_mirrorlist_to_vault(self, node) -> None:
node.execute("""sed -i '
s/^mirrorlist=/#mirrorlist=/;
s/^#[ ]*baseurl=/baseurl=/;
/^baseurl=/ s/mirror/vault/;
' /etc/yum.repos.d/CentOS-*.repo""", shell=True, sudo=True)

def _install(self) -> bool:
self._testpmd_output_after_reenable = ""
self._testpmd_output_before_rescind = ""
@@ -615,7 +622,11 @@ def _install(self) -> bool:
)

if isinstance(node.os, Redhat) and node.os.information.version < "8.0.0":
self._fix_mirrorlist_to_vault(node)
node.os.install_packages(["centos-release-scl"])

# Fix CentOS-SCL's paths to mirrorlist
self._fix_mirrorlist_to_vault(node)
devtoolset_version = 8
devtoolset_pkg = f"devtoolset-{devtoolset_version}"
node.os.install_packages([devtoolset_pkg])