Files
qt5/coin/provisioning/common/linux/limit-avahi-interfaces.sh
Toni Saario 9f1cba8637 Coin: Limit avahi-daemon interfaces
Avahi-daemon often hogs 100% of CPU on the VMs. This particularly
causes issue on 2 core(thread) VMs where tests compete for CPU
with avahi.

Limiting avahi to test service related interfaces eliminates the
abnormal CPU usage.

Avahi should be only needed for tests to see the docker test services.

Pick-to: 6.8 6.5 5.15
Task-number: QTQAINFRA-6697
Change-Id: I30d75f2118501cd69d98aeea8c62722a0fb238c5
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
2024-11-23 08:40:44 +02:00

12 lines
422 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (C) 2024 The Qt Company Ltd
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
set -ex
# Deny avahi access to the VM network.
# Avahi is only needed for local test services on the VM.
interface=$(ip -br a | grep 10.215 | awk '{print $1}')
sudo sed -i "s/#deny-interfaces=eth1/deny-interfaces=${interface}/g" /etc/avahi/avahi-daemon.conf