From nobody Sun Feb 8 14:22:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1564420348; cv=none; d=zoho.com; s=zohoarc; b=KVsb0eMVUmXUIexZCpOsHThVHuKJJvefJRdEfwntKJRISUWbah0xHf/V1SvXqQ42sftkUXGQp8Swkl3mxV9EyTVlPT30HzlKMn9JnnRSFzOG1PFjuBwGWYOnHCWsJMrNI3ytGLsWjjwb74d2eAz3aXYkSlNNRW7Fv7mfsn8b9fM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564420348; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=QoP4V5I1gKC4t2jYd/S8LMf4u+DCyxYkQUh9eA43Yzc=; b=UdnhpjBS8KXw7bhf7JGh0N5p4FABp/Uc9gv/8fkJIu+wfgA+SGQoByOHeDin+0ytzfg/OIXoGGbEsQnHEOfCsReZobLt8uGLkS2o7MTfONTcqFm/EzU2DkKAG4SuYM26sm+oR3CH9cT1QM37jPDLxa8nCf7g6iMSETJXb/lS7T4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1564420348268182.35195964318166; Mon, 29 Jul 2019 10:12:28 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E97F13CA10; Mon, 29 Jul 2019 17:12:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BA85C10002D3; Mon, 29 Jul 2019 17:12:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 76A751972F; Mon, 29 Jul 2019 17:12:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6THCDGL027850 for ; Mon, 29 Jul 2019 13:12:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 744AE5C239; Mon, 29 Jul 2019 17:12:13 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-51.ams2.redhat.com [10.36.112.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1AFCE5C22C; Mon, 29 Jul 2019 17:12:11 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Mon, 29 Jul 2019 18:11:06 +0100 Message-Id: <20190729171130.25484-25-berrange@redhat.com> In-Reply-To: <20190729171130.25484-1-berrange@redhat.com> References: <20190729171130.25484-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Andrea Bolognani Subject: [libvirt] [PATCH v3 24/48] storage: introduce virtstoraged daemon X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 29 Jul 2019 17:12:27 +0000 (UTC) The virtstoraged daemon will be responsible for providing the storage API driver functionality. The storage driver is still loaded by the main libvirtd daemon at this stage, so virtstoraged must not be running at the same time. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Christophe de Dinechin --- .gitignore | 4 ++ libvirt.spec.in | 8 ++++ src/storage/Makefile.inc.am | 61 +++++++++++++++++++++++++++++ src/storage/virtstoraged.service.in | 26 ++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 src/storage/virtstoraged.service.in diff --git a/.gitignore b/.gitignore index c361d87868..3b86183bee 100644 --- a/.gitignore +++ b/.gitignore @@ -175,6 +175,9 @@ /src/secret/test_virtsecretd.aug /src/secret/virtsecretd.aug /src/secret/virtsecretd.conf +/src/storage/test_virtstoraged.aug +/src/storage/virtstoraged.aug +/src/storage/virtstoraged.conf /src/util/virkeycodetable*.h /src/util/virkeynametable*.h /src/virt-aa-helper @@ -184,6 +187,7 @@ /src/virtnetworkd /src/virtproxyd /src/virtsecretd +/src/virtstoraged /src/virt-guest-shutdown.target /tests/*.log /tests/*.pid diff --git a/libvirt.spec.in b/libvirt.spec.in index b4fab26ea4..c34445090d 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1663,6 +1663,14 @@ exit 0 %files daemon-driver-storage =20 %files daemon-driver-storage-core +%config(noreplace) %{_sysconfdir}/libvirt/virtstoraged.conf +%{_datadir}/augeas/lenses/virtstoraged.aug +%{_datadir}/augeas/lenses/tests/test_virtstoraged.aug +%{_unitdir}/virtstoraged.service +%{_unitdir}/virtstoraged.socket +%{_unitdir}/virtstoraged-ro.socket +%{_unitdir}/virtstoraged-admin.socket +%attr(0755, root, root) %{_sbindir}/virtstoraged %attr(0755, root, root) %{_libexecdir}/libvirt_parthelper %{_libdir}/%{name}/connection-driver/libvirt_driver_storage.so %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_fs.so diff --git a/src/storage/Makefile.inc.am b/src/storage/Makefile.inc.am index 538709256d..767875785a 100644 --- a/src/storage/Makefile.inc.am +++ b/src/storage/Makefile.inc.am @@ -142,6 +142,67 @@ mod_LTLIBRARIES +=3D libvirt_driver_storage.la libvirt_driver_storage_la_LDFLAGS =3D $(AM_LDFLAGS_MOD_NOUNDEF) libvirt_driver_storage_impl_la_SOURCES +=3D $(STORAGE_DRIVER_SOURCES) =20 +sbin_PROGRAMS +=3D virtstoraged + +nodist_conf_DATA +=3D storage/virtstoraged.conf +augeas_DATA +=3D storage/virtstoraged.aug +augeastest_DATA +=3D storage/test_virtstoraged.aug +CLEANFILES +=3D storage/virtstoraged.aug + +virtstoraged_SOURCES =3D $(REMOTE_DAEMON_SOURCES) +virtstoraged_CFLAGS =3D \ + $(REMOTE_DAEMON_CFLAGS) \ + -DDAEMON_NAME=3D"\"virtstoraged\"" \ + -DMODULE_NAME=3D"\"storage\"" \ + $(NULL) +virtstoraged_LDFLAGS =3D $(REMOTE_DAEMON_LD_FLAGS) +virtstoraged_LDADD =3D $(REMOTE_DAEMON_LD_ADD) + +SYSTEMD_UNIT_FILES +=3D \ + virtstoraged.service \ + virtstoraged.socket \ + virtstoraged-ro.socket \ + virtstoraged-admin.socket \ + $(NULL) +SYSTEMD_UNIT_FILES_IN +=3D \ + storage/virtstoraged.service.in \ + $(NULL) + +VIRTSTORAGED_UNIT_VARS =3D \ + $(VIRTD_UNIT_VARS) \ + -e 's|[@]name[@]|Libvirt storage|g' \ + -e 's|[@]service[@]|virtstoraged|g' \ + -e 's|[@]sockprefix[@]|virtstoraged|g' \ + $(NULL) + +virtstoraged.service: storage/virtstoraged.service.in $(top_builddir)/conf= ig.status + $(AM_V_GEN)sed $(VIRTSTORAGED_UNIT_VARS) < $< > $@-t && mv $@-t $@ + +virtstorage%.socket: remote/libvirt%.socket.in $(top_builddir)/config.stat= us + $(AM_V_GEN)sed $(VIRTSTORAGED_UNIT_VARS) < $< > $@-t && mv $@-t $@ + +storage/virtstoraged.conf: remote/libvirtd.conf.in + $(AM_V_GEN)sed \ + -e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \ + -e 's/[@]DAEMON_NAME[@]/virtstoraged/' \ + < $^ > $@ + +storage/virtstoraged.aug: remote/libvirtd.aug.in + $(AM_V_GEN)$(SED) \ + -e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \ + -e 's/[@]DAEMON_NAME[@]/virtstoraged/' \ + -e 's/[@]DAEMON_NAME_UC[@]/Virtstoraged/' \ + $< > $@ + +storage/test_virtstoraged.aug: remote/test_libvirtd.aug.in \ + storage/virtstoraged.conf $(AUG_GENTEST) + $(AM_V_GEN)$(AUG_GENTEST) storage/virtstoraged.conf \ + $(srcdir)/remote/test_libvirtd.aug.in | \ + $(SED) -e '/[@]CUT_ENABLE_IP[@]/,/[@]END[@]/d' \ + -e 's/[@]DAEMON_NAME[@]/virtstoraged/' \ + -e 's/[@]DAEMON_NAME_UC[@]/Virtstoraged/' \ + > $@ || rm -f $@ + =20 libvirt_storage_backend_fs_la_SOURCES =3D $(STORAGE_DRIVER_FS_SOURCES) libvirt_storage_backend_fs_la_CFLAGS =3D \ diff --git a/src/storage/virtstoraged.service.in b/src/storage/virtstoraged= .service.in new file mode 100644 index 0000000000..9aa26764a9 --- /dev/null +++ b/src/storage/virtstoraged.service.in @@ -0,0 +1,26 @@ +[Unit] +Description=3DVirtualization storage daemon +Conflicts=3Dlibvirtd.service +Requires=3Dvirtstoraged.socket +Requires=3Dvirtstoraged-ro.socket +Requires=3Dvirtstoraged-admin.socket +After=3Dnetwork.target +After=3Ddbus.service +After=3Discsid.service +After=3Dapparmor.service +After=3Dlocal-fs.target +After=3Dremote-fs.target +Documentation=3Dman:libvirtd(8) +Documentation=3Dhttps://libvirt.org + +[Service] +Type=3Dnotify +ExecStart=3D@sbindir@/virtstoraged --timeout 120 +ExecReload=3D/bin/kill -HUP $MAINPID +Restart=3Don-failure + +[Install] +WantedBy=3Dmulti-user.target +Also=3Dvirtstoraged.socket +Also=3Dvirtstoraged-ro.socket +Also=3Dvirtstoraged-admin.socket --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list