Fix kernel parameter setting 51/15051/2
authorFeng Pan <fpan@redhat.com>
Wed, 1 Jun 2016 19:02:35 +0000 (15:02 -0400)
committerFeng Pan <fpan@redhat.com>
Thu, 2 Jun 2016 21:10:29 +0000 (21:10 +0000)
We can use a single line command to change kernel parameters, it
is not necessary to have a script.

Change-Id: I8988464d9a84a223803c69e676483787de49b4ab
Signed-off-by: Feng Pan <fpan@redhat.com>
build/build_perf_image.sh
build/overcloud-full.sh
build/setkernelparam.sh [deleted file]

index 0a3e3d0..6ca9fbf 100644 (file)
@@ -32,7 +32,7 @@ fi
 
 if [ "$CATEGORY" == "kernel" ]; then
   LIBGUESTFS_BACKEND=direct virt-customize \
-    --run-command "bash -x /root/setkernelparam.sh $KEY $VALUE" \
+    --run-command "grubby --update-kernel=ALL --args=$KEY=$VALUE" \
     -a $IMAGE
 fi
 
index d0ee3f0..065201f 100755 (executable)
@@ -29,13 +29,5 @@ LIBGUESTFS_BACKEND=direct virt-customize \
     --run-command "echo 'nf_conntrack_proto_sctp' > /etc/modules-load.d/nf_conntrack_proto_sctp.conf" \
     -a overcloud-full_build.qcow2
 
-###################################
-#####  Add CPU pinning script #####
-###################################
-
-LIBGUESTFS_BACKEND=direct virt-customize \
-    --upload ../setkernelparam.sh:/root \
-    -a overcloud-full_build.qcow2
-
 mv -f overcloud-full_build.qcow2 overcloud-full.qcow2
 popd > /dev/null
diff --git a/build/setkernelparam.sh b/build/setkernelparam.sh
deleted file mode 100644 (file)
index b6986d6..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-##############################################################################
-# Copyright (c) 2016 Red Hat Inc.
-# Michael Chapman <michapma@redhat.com>
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-GRUBCONF='/boot/grub2/grub.conf'
-
-if [ "$1" == "" ]; then
-  echo "No kernel parameter name provided, not modifying grub.conf"
-  exit 1
-fi
-
-if [ "$2" == "" ]; then
-  echo "No kernel parameter value provided, not modifying grub.conf"
-  exit 1
-fi
-
-echo "Setting $1=$2 in $GRUBCONF"
-echo "GRUB_CMDLINE_LINUX=\"\$GRUB_CMDLINE_LINUX $1=$2\"" >> /etc/default/grub
-grub2-mkconfig > $GRUBCONF
-exit 0