From nobody Sun Feb 8 12:37:31 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=1563897916; cv=none; d=zoho.com; s=zohoarc; b=haOfZiTvB+rusbpdstwaXgVJCLw/8bATvV2SvHxdWSPItQ8Ygovs/0i0SAk7rDjVG9uzGgPDXgvw5hn1/mhEC5EQDiC3O5c2iyFCfL+b/rKbk+p31GapsB5gIoa3ixs8YwpdffOacI+ZENpFe5fva7dMoudCsSXapGjXeOiXTDk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563897916; h=Content-Type:Content-Transfer-Encoding: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=JPVFBKe/A9FoQBk8HGSBfCmo1ORbA1Cy1RCTBI+DD3c=; b=nS7TiLrQ/f3yMAVuRsRTRFSiYjFPQ3k+UqQSygZI+9zRcb4BhKYlHcwbaDchJwrfVSAiIV8gQLzHJBB2BOhL5XfVYqWUATpOVca5oWAefLaSn2n1RVPyqxbbOVHf1diOtN9PvOcyMY7uzsA5XW/w1cIKXDmY7GRhUlWsRByV2ds= 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 1563897916766709.7777440176717; Tue, 23 Jul 2019 09:05:16 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8516530917EF; Tue, 23 Jul 2019 16:05:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C88419C78; Tue, 23 Jul 2019 16:05:15 +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 17C9918045D0; Tue, 23 Jul 2019 16:05:15 +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 x6NG5AYc025157 for ; Tue, 23 Jul 2019 12:05:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id B42AA5C234; Tue, 23 Jul 2019 16:05:10 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.112.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id D14F05F9CA; Tue, 23 Jul 2019 16:05:09 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Tue, 23 Jul 2019 17:03:01 +0100 Message-Id: <20190723160319.18153-24-berrange@redhat.com> In-Reply-To: <20190723160319.18153-1-berrange@redhat.com> References: <20190723160319.18153-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 Subject: [libvirt] [PATCH 23/41] 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.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 23 Jul 2019 16:05:16 +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. Signed-off-by: Daniel P. Berrang=C3=A9 --- .gitignore | 4 ++ libvirt.spec.in | 8 ++++ src/storage/Makefile.inc.am | 61 +++++++++++++++++++++++++++++ src/storage/virtstoraged.service.in | 24 ++++++++++++ 4 files changed, 97 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 25bd2a359d..dce428ede3 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..8083a6b8ac 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..687e3b930e --- /dev/null +++ b/src/storage/virtstoraged.service.in @@ -0,0 +1,24 @@ +[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=3Dapparmor.service +After=3Dlocal-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