Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1975348

Summary: SNO with realtimekernel enabled through PAO becomes unstable after running control plane churn workload and rebooting
Product: OpenShift Container Platform Reporter: Artyom <alukiano>
Component: Performance Addon OperatorAssignee: Artyom <alukiano>
Status: CLOSED ERRATA QA Contact: Gowrishankar Rajaiyan <grajaiya>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.8CC: aos-bugs, bhu, browsell, dblack, fromani, grajaiya, juri.lelli, keyoung, mniranja, murali, rkhan, rolove, smalleni
Target Milestone: ---Keywords: TestBlocker
Target Release: 4.8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1967317 Environment:
Last Closed: 2021-09-29 17:40:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1967317    
Bug Blocks: 2020694    

Comment 1 Niranjan Mallapadi Raghavender 2021-07-06 09:30:34 UTC
Verifying this sanity Only. 
PAO Version: v4.8.0-45

Now the pao operator updates the low-latency-hooks.sh with below contents.

#!/usr/bin/env bash

mask="${1}"
[ -n "${mask}" ] || { logger "${0}: The rps-mask parameter is missing" ; exit 0; }

pid=$(jq '.pid' /dev/stdin 2>&1)
[[ $? -eq 0 && -n "${pid}" ]] || { logger "${0}: Failed to extract the pid: ${pid}"; exit 0; }

ns=$(ip netns identify "${pid}" 2>&1)
[[ $? -eq 0 && -n "${ns}" ]] || { logger "${0} Failed to identify the namespace: ${ns}"; exit 0; }

# Updates the container veth RPS mask on the node
netns_link_indexes=$(ip netns exec "${ns}" ip -j link | jq ".[] | select(.link_index != null) | .link_index")
for link_index in ${netns_link_indexes}; do
  container_veth=$(ip -j link | jq ".[] | select(.ifindex == ${link_index}) | .ifname" | tr -d '"')
  echo ${mask} > /sys/devices/virtual/net/${container_veth}/queues/rx-0/rps_cpus
done

+# Updates the RPS mask for the interface inside of the container network namespace
+mode=$(ip netns exec "${ns}" [ -w /sys ] && echo "rw" || echo "ro" 2>&1)
+[ $? -eq 0 ] || { logger "${0} Failed to determine if the /sys is writable: ${mode}"; exit 0; }

+if [ "${mode}" = "ro" ]; then
+    res=$(ip netns exec "${ns}" mount -o remount,rw /sys 2>&1)
+    [ $? -eq 0 ] || { logger "${0}: Failed to remount /sys as rw: ${res}"; exit 0; }
+fi

# /sys/class/net can't be used recursively to find the rps_cpus file, use /sys/devices instead
res=$(ip netns exec "${ns}" find /sys/devices -type f -name rps_cpus -exec sh -c "echo ${mask} | cat > {}" \; 2>&1)
[[ $? -eq 0 && -z "${res}" ]] || logger "${0}: Failed to apply the RPS mask: ${res}"

if [ "${mode}" = "ro" ]; then
    ip netns exec "${ns}" mount -o remount,ro /sys
    [ $? -eq 0 ] || exit 1 # Error out so the pod will not start with a writable /sys
fi


cat /etc/udev/rules.d/99-netdev-rps.rules

SUBSYSTEM=="net", ACTION=="add", ENV{DEVPATH}!="/devices/virtual/net/veth*", TAG+="systemd", ENV{SYSTEMD_WANTS}="update-rps@%k.service"

Comment 2 Murali Krishnasamy 2021-07-06 13:28:56 UTC
Yes, applying this change fixed the original issues. I could reboot successfully with 30 pods(max) after this for the given PAO config.

Comment 4 Sai Sindhur Malleni 2021-07-08 15:54:57 UTC
Are we good with considering this fixed if it only works with 30 pods?

Comment 6 Martin Sivák 2021-09-29 17:41:13 UTC
Released as part of RHEA-2021:2487-02 OpenShift Container Platform 4.8 low-latency extras update