Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package google-guest-configs for
openSUSE:Factory checked in at 2025-01-01 23:04:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/google-guest-configs (Old)
and /work/SRC/openSUSE:Factory/.google-guest-configs.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "google-guest-configs"
Wed Jan 1 23:04:57 2025 rev:27 rq:1233925 version:20241205.00
Changes:
--------
---
/work/SRC/openSUSE:Factory/google-guest-configs/google-guest-configs.changes
2024-12-03 20:49:08.515895104 +0100
+++
/work/SRC/openSUSE:Factory/.google-guest-configs.new.1881/google-guest-configs.changes
2025-01-01 23:05:00.997336191 +0100
@@ -1,0 +2,16 @@
+Thu Dec 12 14:55:24 UTC 2024 - John Paul Adrian Glaubitz
<[email protected]>
+
+- Update to version 20241205.00 (bsc#1234254, bsc#1234255)
+ * Update google_set_multiqueue to configure
+ vCPU ranges based on VM platform (#90)
+- from version 20241204.00
+ * Restore google_set_multiqueue changes for A3Ultra (#93)
+ * Depend on networkd-dispatcher in Ubuntu (#94)
+- Include components to set hostname and /etc/hosts entries (bsc#1234289,
bsc#1234293)
+ * Add sysconfig and sysconfig-network to BuildRequires
+ * Install google_set_hostname into %{_bindir}
+ * Install google_up.sh into %{_sysconfdir}/sysconfig/network/scripts/
+ * Add code to add and remove POST_UP_SCRIPT="compat:suse:google_up.sh"
+ to /etc/sysconfig/network/ifcfg-eth0 in %post and %postun sections
+
+-------------------------------------------------------------------
Old:
----
google-guest-configs-20241121.00.tar.gz
New:
----
google-guest-configs-20241205.00.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ google-guest-configs.spec ++++++
--- /var/tmp/diff_new_pack.oN9bV9/_old 2025-01-01 23:05:01.537358368 +0100
+++ /var/tmp/diff_new_pack.oN9bV9/_new 2025-01-01 23:05:01.537358368 +0100
@@ -23,13 +23,15 @@
%define _udevdir %(pkg-config --variable udev_dir udev)
%endif
Name: google-guest-configs
-Version: 20241121.00
+Version: 20241205.00
Release: 0
Summary: Google Cloud Guest Configs
License: Apache-2.0
Group: System/Daemons
URL: https://github.com/GoogleCloudPlatform/guest-configs
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
+BuildRequires: sysconfig
+BuildRequires: sysconfig-netconfig
BuildRequires: systemd-rpm-macros
%if 0%{?suse_version} && 0%{?suse_version} <= 1315
BuildRequires: pkg-config
@@ -52,6 +54,8 @@
cp -av src/etc/modprobe.d/* %{buildroot}%{_modprobedir}
mkdir -p %{buildroot}%{_sysconfdir}/rsyslog.d
cp -av src/etc/rsyslog.d/* %{buildroot}%{_sysconfdir}/rsyslog.d/
+mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/network/scripts
+cp -av src/etc/sysconfig/network/scripts/google_up.sh
%{buildroot}%{_sysconfdir}/sysconfig/network/scripts/
mkdir -p %{buildroot}%{_sysctldir}
cp -av src/etc/sysctl.d/* %{buildroot}%{_sysctldir}
mkdir -p %{buildroot}%{_udevrulesdir}
@@ -60,12 +64,19 @@
mkdir -p %{buildroot}%{_bindir}
cp -av src/usr/bin/* %{buildroot}%{_bindir}/
+%post
+grep 'POST_UP_SCRIPT="compat:suse:google_up.sh"'
%{_sysconfdir}/sysconfig/network/ifcfg-eth0 >/dev/null \
+ || echo 'POST_UP_SCRIPT="compat:suse:google_up.sh"' >>
%{_sysconfdir}/sysconfig/network/ifcfg-eth0
+
+%postun
+sed -i '/POST_UP_SCRIPT="compat:suse:google_up.sh"/d'
%{_sysconfdir}/sysconfig/network/ifcfg-eth0
+
%files
%defattr(0644,root,root,0755)
%doc README.md
%license LICENSE
%attr(0755,root,root) %{_bindir}/google_optimize_local_ssd
-%exclude %attr(0755,root,root) %{_bindir}/google_set_hostname
+%attr(0755,root,root) %{_bindir}/google_set_hostname
%attr(0755,root,root) %{_bindir}/google_set_multiqueue
%if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150300
%dir %{_modprobedir}
@@ -74,6 +85,7 @@
%dir %{_sysconfdir}/rsyslog.d
%{_modprobedir}/gce-blacklist.conf
%config %{_sysconfdir}/rsyslog.d/*
+%config %{_sysconfdir}/sysconfig/network/scripts/*
%{_sysctldir}/*
%attr(0755,root,root) %{_udevdir}/google_nvme_id
%{_udevrulesdir}/*
++++++ google-guest-configs-20241121.00.tar.gz ->
google-guest-configs-20241205.00.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/guest-configs-20241121.00/packaging/ubuntu/control
new/guest-configs-20241205.00/packaging/ubuntu/control
--- old/guest-configs-20241121.00/packaging/ubuntu/control 2024-11-21
18:36:26.000000000 +0100
+++ new/guest-configs-20241205.00/packaging/ubuntu/control 2024-12-05
00:55:00.000000000 +0100
@@ -16,6 +16,7 @@
google-guest-agent,
nvme-cli,
jq,
+ networkd-dispatcher,
${misc:Depends}
Provides: irqbalance
Recommends: rsyslog | system-log-daemon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/guest-configs-20241121.00/src/usr/bin/google_set_multiqueue
new/guest-configs-20241205.00/src/usr/bin/google_set_multiqueue
--- old/guest-configs-20241121.00/src/usr/bin/google_set_multiqueue
2024-11-21 18:36:26.000000000 +0100
+++ new/guest-configs-20241205.00/src/usr/bin/google_set_multiqueue
2024-12-05 00:55:00.000000000 +0100
@@ -16,6 +16,7 @@
# For a single-queue / no MSI-X virtionet device, sets the IRQ affinities to
# processor 0. For this virtionet configuration, distributing IRQs to all
# processors results in comparatively high cpu utilization and comparatively
+
# low network bandwidth.
#
# For a multi-queue / MSI-X virtionet device, sets the IRQ affinities to the
@@ -106,13 +107,78 @@
[[ "$machine_type" == *"a3-highgpu-8g"* \
|| "$machine_type" == *"a3-ultragpu-8g"* \
|| "$machine_type" == *"a3-megagpu-8g"* \
- || "$machine_type" == *"a3-edgegpu-8g"* ]] || return 1
+ || "$machine_type" == *"a3-edgegpu-8g"* \
+ || "$machine_type" == *"a3-ultragpu-"* ]] || return 1
+ return 0
+}
+
+
+# returns 0 (success) if the supplied nic is a Gvnic device.
+function is_gvnic() {
+ local -r nic_name="$1"
+ driver_type=$(ethtool -i $nic_name | grep driver)
+
+ [[ "$driver_type" == *"gve"*
+ || "$driver_type" == *"gvnic"* ]] || return 1
return 0
}
+# Returns the vCPU ranges on each of the numa nodes. The vCPU ranges will
+# be in the form of array of
+# [numa0_irq_start_1, numa0_irq_end_1, numa0_irq_start_2, numa0_irq_end_2,
+# numa1_irq_start_1, numa1_irq_end_1, numa1_irq_start_2, numa1_irq_end_2]
+# this will only return the vCPU ranges on NUMA0 and NUMA1 since accelerator
+# platforms of GEN3 and after only have 2 NUMA nodes.
+# The expected vCPU ranges on eahc platforms are:
+# A3/A3-mega:
+# numa0: [0, 51] [104, 155]
+# numa1: [52, 103] [156, 207]
+# A3-ultra:
+# numa0: [0, 55] [113, 168]
+# numa1: [56, 112] [169, 224]
+function get_vcpu_ranges_on_accelerator_platform {
+ declare -n arr_ref=$1
+
+ # Get vCPU ranges for NUMA 0
+ numa0_irq_range=($(cat /sys/devices/system/node/node0/cpulist))
+ numa0_irq_range0="${numa0_irq_range[0]%,*}"
+ numa0_irq_range1="${numa0_irq_range[0]#*,}"
+
+ numa0_irq_range0_start=$(echo "$numa0_irq_range0" | cut -d '-' -f 1)
+ # Avoid setting binding IRQ on vCPU 0 as it is a busy vCPU being heavily
+ # used by the system.
+ numa0_irq_range0_start=$((numa0_irq_range0_start + 1))
+
+ numa0_irq_range0_end=$(echo "$numa0_irq_range0" | cut -d '-' -f 2)
+ numa0_irq_range1_start=$(echo "$numa0_irq_range1" | cut -d '-' -f 1)
+ numa0_irq_range1_end=$(echo "$numa0_irq_range1" | cut -d '-' -f 2)
+
+ # Get vCPU ranges for NUMA 1
+ numa1_irq_range=($(cat /sys/devices/system/node/node1/cpulist))
+ numa1_irq_range0="${numa1_irq_range[0]%,*}"
+ numa1_irq_range1="${numa1_irq_range[0]#*,}"
+
+ numa1_irq_range0_start=$(echo "$numa1_irq_range0" | cut -d '-' -f 1)
+ numa1_irq_range0_end=$(echo "$numa1_irq_range0" | cut -d '-' -f 2)
+ numa1_irq_range1_start=$(echo "$numa1_irq_range1" | cut -d '-' -f 1)
+ numa1_irq_range1_end=$(echo "$numa1_irq_range1" | cut -d '-' -f 2)
+
+ arr_ref=(
+ "$numa0_irq_range0_start"
+ "$numa0_irq_range0_end"
+ "$numa0_irq_range1_start"
+ "$numa0_irq_range1_end"
+ "$numa1_irq_range0_start"
+ "$numa1_irq_range0_end"
+ "$numa1_irq_range1_start"
+ "$numa1_irq_range1_end")
+}
+
echo "Running $(basename $0)."
VIRTIO_NET_DEVS=/sys/bus/virtio/drivers/virtio_net/virtio*
+is_a3_platform
+IS_A3_PLATFORM=$?
# Loop through all the virtionet devices and enable multi-queue
if [ -x "$(command -v ethtool)" ]; then
@@ -125,7 +191,10 @@
continue
fi
num_max_channels=$(ethtool -l "$eth_dev" | grep -m 1 Combined | cut -f2)
- [ "${num_max_channels}" -eq "1" ] && continue
+ if [[ -n "${num_max_channels}" || "${num_max_channels}" -eq "1" ]]; then
+ echo "num_max_channels is n/a, skipping set channels for $eth_dev"
+ continue
+ fi
if is_decimal_int "$num_max_channels" && \
set_channels "$eth_dev" "$num_max_channels"; then
echo "Set channels for $eth_dev to $num_max_channels."
@@ -197,12 +266,21 @@
num_queues=0
for q in $XPS; do
+ interface=$(echo "$q" | grep -oP 'net/\K[^/]+')
+ if [[ $IS_A3_PLATFORM == 0 ]] && ! $(is_gvnic "$interface"); then
+ continue
+ fi
num_queues=$((num_queues + 1))
done
# If we have more CPUs than queues, then stripe CPUs across tx affinity
# as CPUNumber % queue_count.
for q in $XPS; do
+ interface=$(echo "$q" | grep -oP 'net/\K[^/]+')
+ if [[ $IS_A3_PLATFORM == 0 ]] && ! $(is_gvnic "$interface"); then
+ continue
+ fi
+
queue_re=".*tx-([0-9]+).*$"
if [[ "$q" =~ ${queue_re} ]]; then
queue_num=${BASH_REMATCH[1]}
@@ -229,7 +307,7 @@
printf "Queue %d XPS=%s for %s\n" $queue_num `cat $q` $q
done | sort -n -k2
-if ! is_a3_platform; then
+if [[ ! $IS_A3_PLATFORM == 0 ]]; then
exit
fi
@@ -252,9 +330,21 @@
# enp134s0
# enp140s0
-# IRQ binding for numa 0, CPUs [0, 51] and [104, 155] are for numa 0.
-numa0_irq_start=1
+irq_ranges=()
+get_vcpu_ranges_on_accelerator_platform irq_ranges
+echo "Binding vCPUs on NUMA0 [${irq_ranges[0]} ${irq_ranges[1]}],
[${irq_ranges[2]} ${irq_ranges[3]}]}"
+echo "Binding vCPUs on NUMA1 [${irq_ranges[4]} ${irq_ranges[5]}],
[${irq_ranges[6]} ${irq_ranges[7]}]}"
+
+numa0_irq_start=${irq_ranges[0]}
find /sys/class/net -type l | xargs -L 1 realpath | grep '/sys/devices/pci' |
sort | xargs -L 1 basename | while read nic_name; do
+ # For non-gvnic devices (e.g. mlx5), the IRQ bindings will be handled by the
device's driver.
+ if ! is_gvnic "$nic_name"; then
+ echo "$nic_name is not gvnic device, skipping set irq on this device"
+ continue
+ fi
+
+ echo "$nic_name is Gvnic device, continuing set IRQ on $nic_name ."
+
nic_numa_node=$(cat /sys/class/net/"$nic_name"/device/numa_node)
if [[ $nic_numa_node -ne 0 ]]; then
continue
@@ -264,8 +354,8 @@
bind_cores_begin=$numa0_irq_start
bind_cores_end=$((bind_cores_begin + nic_num_queues))
- if [[ $bind_cores_begin -lt 51 ]] && [[ $bind_cores_end -gt 51 ]]; then
- bind_cores_begin=104
+ if [[ $bind_cores_begin -lt ${irq_ranges[1]} ]] && [[ $bind_cores_end -gt
${irq_ranges[1]} ]]; then
+ bind_cores_begin=${irq_ranges[2]}
bind_cores_end=$((bind_cores_begin + nic_num_queues))
fi
@@ -274,9 +364,16 @@
numa0_irq_start=$bind_cores_end
done
-# IRQ binding for numa 1, CPUs [52, 103] and [156, 207] are for numa 1.
-numa1_irq_start=52
+numa1_irq_start=${irq_ranges[4]}
find /sys/class/net -type l | xargs -L 1 realpath | grep '/sys/devices/pci' |
sort | xargs -L 1 basename | while read nic_name; do
+ # For non-gvnic devices (e.g. mlx5), the IRQ bindings will be handled by the
device's driver.
+ if ! is_gvnic "$nic_name"; then
+ echo "$nic_name is not gvnic device, skipping set irq on this device"
+ continue
+ fi
+
+ echo "$nic_name is Gvnic device, continuing set IRQ on $nic_name ."
+
nic_numa_node=$(cat /sys/class/net/"$nic_name"/device/numa_node)
if [[ $nic_numa_node -ne 1 ]]; then
continue
@@ -286,8 +383,8 @@
bind_cores_begin=$numa1_irq_start
bind_cores_end=$((bind_cores_begin + nic_num_queues))
- if [[ $bind_cores_begin -lt 103 ]] && [[ $bind_cores_end -gt 103 ]]; then
- bind_cores_begin=156
+ if [[ $bind_cores_begin -lt ${irq_ranges[5]} ]] && [[ $bind_cores_end -gt
${irq_ranges[5]} ]]; then
+ bind_cores_begin=${irq_ranges[6]}
bind_cores_end=$((bind_cores_begin + nic_num_queues))
fi
@@ -295,3 +392,4 @@
numa1_irq_start=$bind_cores_end
done
+