summaryrefslogtreecommitdiffstats
path: root/rapidvm
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@intel.com>2021-02-25 18:34:11 +0100
committerLuc Provoost <luc.provoost@intel.com>2021-03-15 17:06:50 +0000
commitc8b5dd5aa379c9b8fd60a66be16351f62e5e5ebb (patch)
tree24bf27741728e7b9e2cc1b921ad523271f8f90f6 /rapidvm
parent296cfb0b4fd5fdc534a1c2f6104d83be21a4f62b (diff)
Fix the tuned optimizations
tuned-adm is now run through check_prox_system_setup.sh at the first system startup/reboot. This will result in the correct grub cmdline parameters. We are also coying the default rapid_rsa_key in the authorized_keys of the rapid user, which is now the default user to run the tests. Fixed also an issue in handle_mirror.c: using now ETYPE_IPv4. Changed deploycentostools.sh to reflect the changes done when building the image with disk-image-create. Change-Id: I5933d21faef9fe02b56c01d0b96e2c143cc5476d Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'rapidvm')
-rwxr-xr-xrapidvm/dib/elements/rapid/post-install.d/60-compile-prox1
-rwxr-xr-xrapidvm/dib/elements/rapid/post-install.d/70-os-cfg10
2 files changed, 6 insertions, 5 deletions
diff --git a/rapidvm/dib/elements/rapid/post-install.d/60-compile-prox b/rapidvm/dib/elements/rapid/post-install.d/60-compile-prox
index 2ae1c3cb..ebb87fd8 100755
--- a/rapidvm/dib/elements/rapid/post-install.d/60-compile-prox
+++ b/rapidvm/dib/elements/rapid/post-install.d/60-compile-prox
@@ -24,4 +24,5 @@ cp helper-scripts/rapid/check_prox_system_setup.sh ${BUILD_DIR}
cp helper-scripts/rapid/check-prox-system-setup.service ${BUILD_DIR}
cp helper-scripts/rapid/sharkproxlog.sh ${BUILD_DIR}
cp helper-scripts/rapid/deploycentostools.sh ${BUILD_DIR}
+cp helper-scripts/rapid/rapid_rsa_key.pub ${BUILD_DIR}
popd > /dev/null 2>&1
diff --git a/rapidvm/dib/elements/rapid/post-install.d/70-os-cfg b/rapidvm/dib/elements/rapid/post-install.d/70-os-cfg
index 64bbad5a..5171a32b 100755
--- a/rapidvm/dib/elements/rapid/post-install.d/70-os-cfg
+++ b/rapidvm/dib/elements/rapid/post-install.d/70-os-cfg
@@ -23,14 +23,10 @@ sh -c '(echo "vfio") > /etc/modules-load.d/vfio.conf'
sh -c '(echo "vfio-pci") > /etc/modules-load.d/vfio.conf'
# Enabling tuned with the realtime-virtual-guest profile
pushd ${BUILD_DIR} > /dev/null 2>&1
-#wget http://linuxsoft.cern.ch/cern/centos/7/rt/x86_64/Packages/tuned-profiles-realtime-2.8.0-5.el7_4.2.noarch.rpm
wget http://linuxsoft.cern.ch/cern/centos/7/rt/x86_64/Packages/tuned-profiles-realtime-2.9.0-1.el7_5.2.noarch.rpm
-#wget http://linuxsoft.cern.ch/cern/centos/7/rt/x86_64/Packages/tuned-profiles-nfv-guest-2.8.0-5.el7_4.2.noarch.rpm
wget http://linuxsoft.cern.ch/cern/centos/7/rt/x86_64/Packages/tuned-profiles-nfv-guest-2.9.0-1.el7_5.2.noarch.rpm
# Install with --nodeps. The latest CentOS cloud images come with a tuned version higher than 2.8. These 2 packages however
# do not depend on v2.8 and also work with tuned 2.9. Need to be careful in the future
-#rpm -ivh ${BUILD_DIR}/tuned-profiles-realtime-2.8.0-5.el7_4.2.noarch.rpm --nodeps
-#rpm -ivh ${BUILD_DIR}/tuned-profiles-nfv-guest-2.8.0-5.el7_4.2.noarch.rpm --nodeps
rpm -ivh ${BUILD_DIR}/tuned-profiles-realtime-2.9.0-1.el7_5.2.noarch.rpm --nodeps
rpm -ivh ${BUILD_DIR}/tuned-profiles-nfv-guest-2.9.0-1.el7_5.2.noarch.rpm --nodeps
# Although we do no know how many cores the VM will have when begin deployed for real testing, we already put a number for the
@@ -38,13 +34,17 @@ rpm -ivh ${BUILD_DIR}/tuned-profiles-nfv-guest-2.9.0-1.el7_5.2.noarch.rpm --node
# When the VM will be instantiated, the check_kernel_params service will check for the real number of cores available to this VM
# and update the realtime-virtual-guest-variables.conf accordingly.
echo "isolated_cores=1-3" | tee -a /etc/tuned/realtime-virtual-guest-variables.conf
-tuned-adm profile realtime-virtual-guest
+# The actual tuned-adm profile is now done in check_prox_system_setup.sh and is started through
+# the check-prox-system-setup.service. This will happen when the system is booting.
# Install the check_tuned_params service to make sure that the grub cmd line has the right cpus in isolcpu. The actual number of cpu's
# assigned to this VM depends on the flavor used. We don't know at this time what that will be.
chmod +x ${BUILD_DIR}/check_prox_system_setup.sh
mv ${BUILD_DIR}/check_prox_system_setup.sh /usr/local/libexec/
mv ${BUILD_DIR}/check-prox-system-setup.service /etc/systemd/system/
+# systemctl daemon-reload, will be skipped when building image with disk-image-builder. That is OK
systemctl daemon-reload
systemctl enable check-prox-system-setup.service
+# Add the default rapid key as an authorized key for the rapid user
+cat ${BUILD_DIR}/rapid_rsa_key.pub >> /home/rapid/.ssh/authorized_keys
popd > /dev/null 2>&1