Skip to content

Commit

Permalink
Merge pull request #689 from mrc0mmand/revert-kernel-pin
Browse files Browse the repository at this point in the history
Revert "agent: pin kernel to kernel-4.18.0-521.el8"
  • Loading branch information
mrc0mmand authored Dec 19, 2023
2 parents bb98bf5 + ff60905 commit 4114e12
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 31 deletions.
6 changes: 0 additions & 6 deletions agent/bootstrap-alt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ if alternatives --display nmap; then
alternatives --display nmap
fi

# Pin kernel to 4.18.0-521.el8
dnf install -y kernel-4.18.0-521.el8

# Fetch the upstream systemd repo
test -e systemd && rm -rf systemd
git clone "$REPO_URL" systemd
Expand Down Expand Up @@ -251,9 +248,6 @@ Name=eth0
Unmanaged=yes
EOF

# FIXME
grubby --set-default "/boot/vmlinuz-4.18.0-521.el8.ppc64le"

# Reboot the machine here to switch to the latest kernel if available
echo "-----------------------------"
echo "- REBOOT THE MACHINE BEFORE -"
Expand Down
16 changes: 5 additions & 11 deletions agent/bootstrap-rhel8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ if alternatives --display nmap; then
alternatives --display nmap
fi

# Pin kernel to 4.18.0-521.el8
dnf install -y kernel-4.18.0-521.el8

# Fetch the systemd repo
test -e systemd && rm -rf systemd
git clone "$REPO_URL" systemd
Expand Down Expand Up @@ -214,6 +211,7 @@ ninja -C build install
getent group systemd-resolve &>/dev/null || groupadd -r -g 193 systemd-resolve 2>&1
getent passwd systemd-resolve &>/dev/null || useradd -r -u 193 -l -g systemd-resolve -d / -s /sbin/nologin -c "systemd Resolver" systemd-resolve &>/dev/null

LATEST_KERNEL="$(rpm -q kernel --qf "%{EVR}.%{ARCH}\n" | sort -Vr | head -n1)"
# Configure the selected cgroup hierarchy for both the host machine and each
# integration test VM
if [[ "$CGROUP_HIERARCHY" == unified ]]; then
Expand All @@ -230,17 +228,15 @@ fi
# comments in `testsuite.sh` for the explanation
export INITRD="/var/tmp/ci-sanity-initramfs-$(uname -r).img"
cp -fv "/boot/initramfs-$(uname -r).img" "$INITRD"
# FIXME
dracut --kver 4.18.0-521.el8.x86_64 -o "multipath rngd" --filesystems ext4 --rebuild "$INITRD"
dracut --kver "$LATEST_KERNEL" -o "multipath rngd" --filesystems ext4 --rebuild "$INITRD"

centos_ensure_qemu_symlink

## Configure test environment
# Explicitly set paths to initramfs (see above) and kernel images
# (for QEMU tests)
# FIXME
export KERNEL_VER="4.18.0-521.el8.x86_64"
export KERNEL_BIN="/boot/vmlinuz-$KERNEL_VER"
export KERNEL_BIN="/boot/vmlinuz-$LATEST_KERNEL"
export KERNEL_VER="$LATEST_KERNEL"
# Enable kernel debug output for easier debugging when something goes south
export KERNEL_APPEND="debug systemd.log_level=debug rd.systemd.log_target=console $CGROUP_KERNEL_ARGS"
# Set timeout for QEMU tests to kill them in case they get stuck
Expand Down Expand Up @@ -275,9 +271,7 @@ fi
echo "Configuring $CGROUP_HIERARCHY cgroup hierarchy using '$CGROUP_KERNEL_ARGS'"

# Make sure the latest kernel is the one we're going to boot into
# FIXME
grubby --set-default "/boot/vmlinuz-4.18.0-521.el8.x86_64"
#grubby --set-default "/boot/vmlinuz-$(rpm -q kernel --qf "%{EVR}.%{ARCH}\n" | sort -Vr | head -n1)"
grubby --set-default "/boot/vmlinuz-$LATEST_KERNEL"
grubby --args="$CGROUP_KERNEL_ARGS" --update-kernel="$(grubby --default-kernel)"
# grub on RHEL 8 uses BLS
grep -r "systemd.unified_cgroup_hierarchy" /boot/loader/entries/
Expand Down
8 changes: 5 additions & 3 deletions agent/bootstrap-rhel9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ fi
# Install the compiled systemd
ninja -C build install

LATEST_KERNEL="$(rpm -q kernel --qf "%{EVR}.%{ARCH}\n" | sort -Vr | head -n1)"
# Configure the selected cgroup hierarchy for both the host machine and each
# integration test VM
if [[ "$CGROUP_HIERARCHY" == unified ]]; then
Expand All @@ -320,14 +321,15 @@ fi
# comments in `testsuite.sh` for the explanation
export INITRD="/var/tmp/ci-sanity-initramfs-$(uname -r).img"
cp -fv "/boot/initramfs-$(uname -r).img" "$INITRD"
dracut -o "multipath rngd" --filesystems ext4 --rebuild "$INITRD"
dracut --kver "$LATEST_KERNEL" -o "multipath rngd" --filesystems ext4 --rebuild "$INITRD"

centos_ensure_qemu_symlink

## Configure test environment
# Explicitly set paths to initramfs (see above) and kernel images
# (for QEMU tests)
export KERNEL_BIN="/boot/vmlinuz-$(uname -r)"
export KERNEL_BIN="/boot/vmlinuz-$LATEST_KERNEL"
export KERNEL_VER="$LATEST_KERNEL"
# Enable kernel debug output for easier debugging when something goes south
export KERNEL_APPEND="debug systemd.log_level=debug rd.systemd.log_target=console systemd.default_standard_output=journal+console ${CGROUP_KERNEL_ARGS[*]}"
# Set timeout for QEMU tests to kill them in case they get stuck
Expand Down Expand Up @@ -396,7 +398,7 @@ if grep -q "GRUB_ENABLE_BLSCFG=false" /etc/default/grub; then
grub2-mkconfig -o /boot/grub2/grub.cfg
fi

grubby --set-default "/boot/vmlinuz-$(rpm -q kernel --qf "%{EVR}.%{ARCH}\n" | sort -Vr | head -n1)"
grubby --set-default "/boot/vmlinuz-$LATEST_KERNEL"
grubby --args="${GRUBBY_ARGS[*]}" --update-kernel="$(grubby --default-kernel)"
# Check if the $GRUBBY_ARGS were applied correctly
for arg in "${GRUBBY_ARGS[@]}"; do
Expand Down
16 changes: 5 additions & 11 deletions agent/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,6 @@ fi
alternatives --set python /usr/bin/python3.8
alternatives --list

# Pin kernel to 4.18.0-521.el8
dnf install -y kernel-4.18.0-521.el8

# Fetch the upstream systemd repo
test -e systemd && rm -rf systemd
echo "Cloning repo: $REPO_URL"
Expand Down Expand Up @@ -222,6 +219,7 @@ coredumpctl_set_ts
# Install the compiled systemd
ninja -C "$BUILD_DIR" install

LATEST_KERNEL="$(rpm -q kernel --qf "%{EVR}.%{ARCH}\n" | sort -Vr | head -n1)"
# FIXME: drop once https://github.com/systemd/systemd/pull/27890 lands
DRACUT_OPTS=()
[[ -x /usr/lib/systemd/systemd-executor ]] && DRACUT_OPTS+=(--install /usr/lib/systemd/systemd-executor)
Expand All @@ -235,17 +233,15 @@ DRACUT_OPTS=()
# comments in `testsuite.sh` for the explanation
export INITRD="/var/tmp/ci-sanity-initramfs-$(uname -r).img"
cp -fv "/boot/initramfs-$(uname -r).img" "$INITRD"
# FIXME
dracut --kver 4.18.0-521.el8.x86_64 "${DRACUT_OPTS[@]}" -o "multipath rngd" --filesystems ext4 --rebuild "$INITRD"
dracut "${DRACUT_OPTS[@]}" --kver "$LATEST_KERNEL" -o "multipath rngd" --filesystems ext4 --rebuild "$INITRD"

centos_ensure_qemu_symlink

## Configure test environment
# Explicitly set paths to initramfs (see above) and kernel images
# (for QEMU tests)
# FIXME
export KERNEL_VER="4.18.0-521.el8.x86_64"
export KERNEL_BIN="/boot/vmlinuz-$KERNEL_VER"
export KERNEL_BIN="/boot/vmlinuz-$LATEST_KERNEL"
export KERNEL_VER="$LATEST_KERNEL"
# Enable kernel debug output for easier debugging when something goes south
export KERNEL_APPEND="debug systemd.log_level=debug rd.systemd.log_target=console systemd.default_standard_output=journal+console"
# Set timeout for QEMU tests to kill them in case they get stuck
Expand Down Expand Up @@ -308,9 +304,7 @@ GRUBBY_ARGS=(
"panic=3"
)
# Make sure the latest kernel is the one we're going to boot into
# FIXME
grubby --set-default "/boot/vmlinuz-4.18.0-521.el8.x86_64"
#grubby --set-default "/boot/vmlinuz-$(rpm -q kernel --qf "%{EVR}.%{ARCH}\n" | sort -Vr | head -n1)"
grubby --set-default "/boot/vmlinuz-$LATEST_KERNEL"
grubby --args="${GRUBBY_ARGS[*]}" --update-kernel="$(grubby --default-kernel)"
# Check if the $GRUBBY_ARGS were applied correctly
for arg in "${GRUBBY_ARGS[@]}"; do
Expand Down

0 comments on commit 4114e12

Please sign in to comment.