From patchwork Wed Dec 11 14:35:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 1207698 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47XzxF1GQWz9sRm; Thu, 12 Dec 2019 01:35:29 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1if35K-0004Ml-15; Wed, 11 Dec 2019 14:35:26 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1if35I-0004MH-FQ for kernel-team@lists.ubuntu.com; Wed, 11 Dec 2019 14:35:24 +0000 Received: from mail-ua1-f71.google.com ([209.85.222.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1if35I-0003UU-4B for kernel-team@lists.ubuntu.com; Wed, 11 Dec 2019 14:35:24 +0000 Received: by mail-ua1-f71.google.com with SMTP id x9so6136533uaq.9 for ; Wed, 11 Dec 2019 06:35:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+uc9rAqdCv8EEvHbPNaW8F3RQkE+Qk0SjiM35MqXooc=; b=dSCMVIoTlW04/IS45URirEzXp0TItIWtxo+fCbGnzbI5Zbq5uJA+OQuZSqZuXR9ow+ GYabn8zR5YjZdcFOFQycf1X0ZzzMosqXmHT0pAtGkSPJHzEDp0lYPs/7aMfltEUxv9+h rkWVFQeSq7sBWPaxaMU8f7jnFswtLXaTFKrnQSkLdyCCnSDcaJMIyQcKJhFpZqnu1VJj lBpZmMaKGFPK+I6t97SS1gk/boSiSMs5oVbjPstvO2emslTGKHZ/a4TedqlUv8hH9L4S 4mGk66KMxwXz8NrbCST/+ooFZCZCUmhX064hewxSXfCEyhjO4gsmYdObxTxm88JbJ78x JVVA== X-Gm-Message-State: APjAAAUYXQcCehVrKBRxnn1yE1ZFnvbZjl37DA8lTLxgdHu3y0fZ1fn1 ZpOGZfX4hy6FFUR4TSpQLD4pOy5ccXdNu4TKGvpRvECvvjMG3IEcakwDQGbWt9TlvJuWjH/JeyH c3qL+nMcNBvy3ubTbhxyI2fb4vFVBQKc8l82AbVAx X-Received: by 2002:a1f:fe45:: with SMTP id l66mr3895463vki.9.1576074922784; Wed, 11 Dec 2019 06:35:22 -0800 (PST) X-Google-Smtp-Source: APXvYqyk2pZx8swGvgLPVsVqBrV+ncL4ZYDIHSPLO7a/WRQJFobSmXTHAP/m2aRiISZImCz1RNe2oQ== X-Received: by 2002:a1f:fe45:: with SMTP id l66mr3895435vki.9.1576074922373; Wed, 11 Dec 2019 06:35:22 -0800 (PST) Received: from localhost.localdomain ([2804:18:866:5858:f73a:f2c9:23f4:550b]) by smtp.gmail.com with ESMTPSA id g26sm1555103vkl.16.2019.12.11.06.35.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 06:35:21 -0800 (PST) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [{bionic, xenial}:linux PATCH 1/1] UBUNTU: [Packaging] bind hv_kvp_daemon startup to hv_kvp device Date: Wed, 11 Dec 2019 11:35:09 -0300 Message-Id: <20191211143509.9729-2-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191211143509.9729-1-marcelo.cerri@canonical.com> References: <20191211143509.9729-1-marcelo.cerri@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Seth Forshee BugLink: https://bugs.launchpad.net/bugs/1820063 The hv_kvp_daemon service requires the hv_kvp device and should be started when the device appears and stopped in it disappears. Solution is based off the one provided at https://bugzilla.redhat.com/show_bug.cgi?id=1195029#c22. Signed-off-by: Seth Forshee Signed-off-by: Marcelo Henrique Cerri Acked-by: Kleber Sacilotto de Souza Acked-by: Andy Whitcroft --- debian/linux-cloud-tools-common.hv-kvp-daemon.service | 3 ++- debian/linux-cloud-tools-common.hv-kvp-daemon.udev | 1 + debian/rules.d/3-binary-indep.mk | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 debian/linux-cloud-tools-common.hv-kvp-daemon.udev diff --git a/debian/linux-cloud-tools-common.hv-kvp-daemon.service b/debian/linux-cloud-tools-common.hv-kvp-daemon.service index 015c96f9fea7..571440344cb5 100644 --- a/debian/linux-cloud-tools-common.hv-kvp-daemon.service +++ b/debian/linux-cloud-tools-common.hv-kvp-daemon.service @@ -5,7 +5,8 @@ Description=Hyper-V KVP Protocol Daemon ConditionVirtualization=microsoft DefaultDependencies=no -After=systemd-remount-fs.service +BindsTo=sys-devices-virtual-misc-vmbus\x21hv_kvp.device +After=sys-devices-virtual-misc-vmbus\x21hv_kvp.device systemd-remount-fs.service Before=shutdown.target cloud-init-local.service walinuxagent.service Conflicts=shutdown.target RequiresMountsFor=/var/lib/hyperv diff --git a/debian/linux-cloud-tools-common.hv-kvp-daemon.udev b/debian/linux-cloud-tools-common.hv-kvp-daemon.udev new file mode 100644 index 000000000000..0c648f54d4c4 --- /dev/null +++ b/debian/linux-cloud-tools-common.hv-kvp-daemon.udev @@ -0,0 +1 @@ +SUBSYSTEM=="misc", KERNEL=="vmbus/hv_kvp", TAG+="systemd", ENV{SYSTEMD_WANTS}+="hv-kvp-daemon.service" diff --git a/debian/rules.d/3-binary-indep.mk b/debian/rules.d/3-binary-indep.mk index b27275685612..6c847da42bd4 100644 --- a/debian/rules.d/3-binary-indep.mk +++ b/debian/rules.d/3-binary-indep.mk @@ -190,6 +190,7 @@ ifeq ($(do_tools_hyperv),true) dh_installinit -p$(cloudpkg) -n --name hv-kvp-daemon dh_installinit -p$(cloudpkg) -n --name hv-vss-daemon dh_installinit -p$(cloudpkg) -n --name hv-fcopy-daemon + dh_installudev -p$(cloudpkg) -n --name hv-kvp-daemon dh_systemd_enable -p$(cloudpkg) dh_installinit -p$(cloudpkg) -o --name hv-kvp-daemon dh_installinit -p$(cloudpkg) -o --name hv-vss-daemon