Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oem-azure: add hyperv daemons #2309

Merged
merged 7 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/kernel-apply-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if ! check_remote_branch "linux-${VERSION_NEW}-${TARGET_BRANCH}"; then
exit 0
fi

# Dive into ebuild repo section of SDK
pushd "${SDK_OUTER_OVERLAY}"

# trim the 3rd part in the input semver, e.g. from 5.4.1 to 5.4
Expand All @@ -31,6 +32,12 @@ for pkg in sources modules kernel; do
popd
done

# Update hyperv daemons ebuild soft-link to reflect new kernel version
find -D exec app-emulation/hv-daemons/ -type l -exec rm '{}' \;
ln -s app-emulation/hv-daemons/hv-daemons-9999.ebuild \
app-emulation/hv-daemons/hv-daemons-${VERSION_NEW}.ebuild

# Leave ebuild repo section of SDK
popd
tormath1 marked this conversation as resolved.
Show resolved Hide resolved

function get_lwn_link() {
Expand Down Expand Up @@ -72,7 +79,8 @@ generate_update_changelog 'Linux' "${VERSION_NEW}" "${URL}" 'linux' "${OLD_VERSI

commit_changes sys-kernel/coreos-sources "${VERSION_OLD}" "${VERSION_NEW}" \
sys-kernel/coreos-modules \
sys-kernel/coreos-kernel
sys-kernel/coreos-kernel \
app-emulation/hv-daemons

cleanup_repo

Expand Down
1 change: 1 addition & 0 deletions changelog/changes/2024-09-12-azure-hv-daemons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Azure, HyperV: Added daemons `kvp`, `vss`, and `fcopy` for better HyperV hypervisor integration with Flatcar guests ([scripts#2309](https://github.com/flatcar/scripts/pull/2309)).
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Hyper-V FCOPY daemon
ConditionPathExists=/dev/vmbus/hv_fcopy

[Service]
ExecStart=/usr/bin/hv_fcopy_daemon --no-daemon

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Hyper-V KVP daemon
ConditionPathExists=/dev/vmbus/hv_kvp

[Service]
ExecStart=/usr/bin/hv_kvp_daemon --no-daemon

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Hyper-V VSS daemon
ConditionPathExists=/dev/vmbus/hv_vss

[Service]
ExecStart=/usr/bin/hv_vss_daemon --no-daemon

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2044-2016 The Flatcar Maintainers
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit coreos-kernel savedconfig systemd

DESCRIPTION="HyperV guest support daemons."
KEYWORDS="amd64 arm64"

if [[ "${PV}" == 9999 ]]; then
KEYWORDS="~amd64 ~arm64"
fi

src_compile() {
# Build hv_vss_daemon, hv_kvp_daemon, hv_fcopy_daemon
kmake tools/hv
}

src_install() {
dobin "${S}/build/tools/hv/hv_fcopy_daemon"
dobin "${S}/build/tools/hv/hv_kvp_daemon"
dobin "${S}/build/tools/hv/hv_vss_daemon"

systemd_dounit "${FILESDIR}/hv_fcopy_daemon.service"
systemd_dounit "${FILESDIR}/hv_kvp_daemon.service"
systemd_dounit "${FILESDIR}/hv_vss_daemon.service"

systemd_enable_service "multi-user.target" "hv_fcopy_daemon.service"
systemd_enable_service "multi-user.target" "hv_kvp_daemon.service"
systemd_enable_service "multi-user.target" "hv_vss_daemon.service"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
</pkgmetadata>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ IUSE=""
RDEPEND="
~app-emulation/wa-linux-agent-${PV}
net-misc/chrony
app-emulation/hv-daemons
"

# for coreos-base/common-oem-files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ IUSE=""
# no source directory
S="${WORKDIR}"

RDEPEND="
app-emulation/hv-daemons
"

src_prepare() {
default
sed -e "s\\@@OEM_VERSION_ID@@\\${PVR}\\g" \
Expand Down
Loading