From nobody Fri May 17 06:43:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1661179744; cv=none; d=zohomail.com; s=zohoarc; b=XH5SIoqIx1r0EmKPt9Tn1H31HSTCU1/CES3jzqvY45CbKHSmG8LSRy4DIQftQH823VvWclj+Ar237VBw01w8WtvdWD3HSlFvkluBaMqHp9Z5riKhnI8rgwQvyEk85EDDC9skeGYDsUccMfANkjoAk9UkBPRs8qWScIdvlagmFec= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661179744; 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; bh=B1rF5VZss7o3preWiTXmLJJ8ACHA/GnMi70viIbp7vE=; b=aosUzz4E++Q3fp+9xt/zDqzzcHzH2kjL+R+rFdKQMWZerPPwcTLxZtN4LmZjRRr2h13JM133wjM33k7IX0j8jnljNQspwOTrouy0wkTDz33nxLIfmw60i6mOHMshEWt4eWSm3i9vtqUdasjHS6tciSVsE11hRWWnqdEZqDenxjU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1661179744264559.836988652675; Mon, 22 Aug 2022 07:49:04 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-564-AHDeBTLBM-qDdGHFHR_9TQ-1; Mon, 22 Aug 2022 10:48:23 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 963981815CFB; Mon, 22 Aug 2022 14:48:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0A5C40D2830; Mon, 22 Aug 2022 14:48:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 949771946A52; Mon, 22 Aug 2022 14:48:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3D72D1946A47 for ; Mon, 22 Aug 2022 14:48:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 10868403348; Mon, 22 Aug 2022 14:48:20 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6A3CE492C3B for ; Mon, 22 Aug 2022 14:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661179743; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=B1rF5VZss7o3preWiTXmLJJ8ACHA/GnMi70viIbp7vE=; b=NAAuQ4HHZvbkbqvmLovVjOVA4LRLj8YdvaKkCvVSyw5DUP8m0ztfRYQHg0rhRSKALjsCLg KLIM6fuM0TfZ2ECL+Ncg4FBMp02MEftekzK7y2nmqNNYcjLpK1ShAj5mSY1wXodBOirtrX 7Qi5O0dV1je8vibU1ZFUDtAGNMZSZN8= X-MC-Unique: AHDeBTLBM-qDdGHFHR_9TQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/5] spec: Drop libvirt-daemon-driver-storage-sheepdog package Date: Mon, 22 Aug 2022 16:48:12 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1661179746281100003 Content-Type: text/plain; charset="utf-8" Upstream will be dropping the sheepdog storage backend, so we need to stop building the package and obsolete it. Signed-off-by: Peter Krempa Reviewed-by: Claudio Fontana Reviewed-by: J=C3=A1n Tomko --- docs/kbase/rpm-deployment.rst | 6 +++++- libvirt.spec.in | 38 ++--------------------------------- 2 files changed, 7 insertions(+), 37 deletions(-) diff --git a/docs/kbase/rpm-deployment.rst b/docs/kbase/rpm-deployment.rst index 7b3bbfefe8..6415a9bc53 100644 --- a/docs/kbase/rpm-deployment.rst +++ b/docs/kbase/rpm-deployment.rst @@ -1,3 +1,5 @@ +.. role:: removed + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RPM Deployment Guidance =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -176,7 +178,9 @@ RPM packages * libvirt-daemon-driver-storage-sheepdog The dynamically loadable driver providing an implementation of the Sheep= Dog - network storage pool type, for the storage pool management APIs. + network storage pool type, for the storage pool management APIs. This + sub-package was :removed:`removed in libvirt-8.7` as the sheepdog backend + driver was dropped from upstream. * libvirt-daemon-driver-storage-zfs diff --git a/libvirt.spec.in b/libvirt.spec.in index fe386bfef2..4066d5509b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -61,11 +61,6 @@ # Then the secondary host drivers, which run inside libvirtd %define with_storage_rbd 0%{!?_without_storage_rbd:1} -%if 0%{?fedora} - %define with_storage_sheepdog 0%{!?_without_storage_sheepdog:1} -%else - %define with_storage_sheepdog 0 -%endif %define with_storage_gluster 0%{!?_without_storage_gluster:1} %if 0%{?rhel} @@ -339,9 +334,6 @@ BuildRequires: librbd-devel BuildRequires: glusterfs-api-devel >=3D 3.4.1 BuildRequires: glusterfs-devel >=3D 3.4.1 %endif -%if %{with_storage_sheepdog} -BuildRequires: sheepdog -%endif %if %{with_numactl} # For QEMU/LXC numa info BuildRequires: numactl-devel @@ -584,6 +576,7 @@ Requires: /usr/bin/qemu-img %if !%{with_storage_rbd} Obsoletes: libvirt-daemon-driver-storage-rbd < %{version}-%{release} %endif +Obsoletes: libvirt-daemon-driver-storage-sheepdog %description daemon-driver-storage-core The storage driver plugin for the libvirtd daemon, providing @@ -687,19 +680,6 @@ volumes using the ceph protocol. %endif -%if %{with_storage_sheepdog} -%package daemon-driver-storage-sheepdog -Summary: Storage driver plugin for sheepdog -Requires: libvirt-daemon-driver-storage-core =3D %{version}-%{release} -Requires: libvirt-libs =3D %{version}-%{release} -Requires: sheepdog - -%description daemon-driver-storage-sheepdog -The storage driver backend adding implementation of the storage APIs for -sheepdog volumes using. -%endif - - %if %{with_storage_zfs} %package daemon-driver-storage-zfs Summary: Storage driver plugin for ZFS @@ -732,9 +712,6 @@ Requires: libvirt-daemon-driver-storage-gluster =3D %{v= ersion}-%{release} %if %{with_storage_rbd} Requires: libvirt-daemon-driver-storage-rbd =3D %{version}-%{release} %endif -%if %{with_storage_sheepdog} -Requires: libvirt-daemon-driver-storage-sheepdog =3D %{version}-%{release} -%endif %if %{with_storage_zfs} Requires: libvirt-daemon-driver-storage-zfs =3D %{version}-%{release} %endif @@ -1074,12 +1051,6 @@ exit 1 %define arg_storage_rbd -Dstorage_rbd=3Ddisabled %endif -%if %{with_storage_sheepdog} - %define arg_storage_sheepdog -Dstorage_sheepdog=3Denabled -%else - %define arg_storage_sheepdog -Dstorage_sheepdog=3Ddisabled -%endif - %if %{with_storage_gluster} %define arg_storage_gluster -Dstorage_gluster=3Denabled -Dglusterfs=3D= enabled %else @@ -1199,7 +1170,7 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{_= specdir}/%{name}.spec) -Dstorage_disk=3Denabled \ -Dstorage_mpath=3Denabled \ %{?arg_storage_rbd} \ - %{?arg_storage_sheepdog} \ + -Dstorage_sheepdog=3Ddisabled \ %{?arg_storage_gluster} \ %{?arg_storage_zfs} \ -Dstorage_vstorage=3Ddisabled \ @@ -2027,11 +1998,6 @@ exit 0 %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_rbd.so %endif -%if %{with_storage_sheepdog} -%files daemon-driver-storage-sheepdog -%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so -%endif - %if %{with_storage_zfs} %files daemon-driver-storage-zfs %{_libdir}/%{name}/storage-backend/libvirt_storage_backend_zfs.so --=20 2.37.1 From nobody Fri May 17 06:43:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1661179710; cv=none; d=zohomail.com; s=zohoarc; b=Sur5lcVSdsAlZFn7uJw4ol1tQnDlB+sqETAgSbbvX9xysKc84Pigb7ZTxVM75ypzcMtEh7ii6eUH+jbTrnw/aaH2+NRJpUNnabEHUJM3GEKnxSwB0CqpGNHhoRD4wTVxL1X/4t7Zh4m6m2Xskhv3ReOO/nx6miedqv9Y/Oxkdzc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661179710; 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; bh=Uxs8CDe15L03mpPfJo7f5yXo99zJ6pwDeFYA7zA1KWE=; b=lcCg3jG7KpHU+E1eQJGSCTScUGP3M7aZP2VkwI8Wg3qoK1BM+vxCZzQbSqRb3cSrnw6lWmASw1nlbmPszd/wO/GWZPvX4J7M80jdwpto35jEanZVtx1RgwV1lstbzjkxFTmeHcLCHZifvcDza0mHwwAbOh+QiTwAPeKTNoM7GGw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1661179710813788.2162196945419; Mon, 22 Aug 2022 07:48:30 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-83-r9Zktw9INbCkc8SyCMHKDg-1; Mon, 22 Aug 2022 10:48:25 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 69246185A79C; Mon, 22 Aug 2022 14:48:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55A45141511A; Mon, 22 Aug 2022 14:48:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 463191946A58; Mon, 22 Aug 2022 14:48:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 59AA01946A70 for ; Mon, 22 Aug 2022 14:48:21 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4CBF3492C3B; Mon, 22 Aug 2022 14:48:21 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9827640334B for ; Mon, 22 Aug 2022 14:48:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661179709; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Uxs8CDe15L03mpPfJo7f5yXo99zJ6pwDeFYA7zA1KWE=; b=MUklwGnyM06xblVVQ5X3Vxny1GvGI5bAEWhH3F9+3qYicEj1LW5+MbE8DtMwx4M9U5czQe tsHYwxTs/4H+u1t96a+tEqsW/wyAZtp7QU5VrQwR/TvrURstXbGNkmUMLLCTyhGiTxwkgg Taf+bLvgsVb9Alvbp8qaTxuvUwAwVWs= X-MC-Unique: r9Zktw9INbCkc8SyCMHKDg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/5] tests: Remove storage pool/vol tests for sheepdog Date: Mon, 22 Aug 2022 16:48:13 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1661179712767100002 Content-Type: text/plain; charset="utf-8" The support for the sheepdog storage backend will be dropped in the upcoming patches. Remove all the relevant tests. Signed-off-by: Peter Krempa Reviewed-by: Claudio Fontana Reviewed-by: J=C3=A1n Tomko --- tests/meson.build | 6 - tests/storagebackendsheepdogtest.c | 205 ------------------ tests/storagepoolxml2argvtest.c | 1 - tests/storagepoolxml2xmlin/pool-sheepdog.xml | 8 - tests/storagepoolxml2xmlout/pool-sheepdog.xml | 11 - tests/storagepoolxml2xmltest.c | 1 - tests/storagevolxml2xmlin/vol-sheepdog.xml | 10 - tests/storagevolxml2xmlout/vol-sheepdog.xml | 8 - tests/storagevolxml2xmltest.c | 1 - 9 files changed, 251 deletions(-) delete mode 100644 tests/storagebackendsheepdogtest.c delete mode 100644 tests/storagepoolxml2xmlin/pool-sheepdog.xml delete mode 100644 tests/storagepoolxml2xmlout/pool-sheepdog.xml delete mode 100644 tests/storagevolxml2xmlin/vol-sheepdog.xml delete mode 100644 tests/storagevolxml2xmlout/vol-sheepdog.xml diff --git a/tests/meson.build b/tests/meson.build index d6b1bb2bf0..2556b71444 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -509,12 +509,6 @@ if conf.has('WITH_STORAGE_FS') ] endif -if conf.has('WITH_STORAGE_SHEEPDOG') - tests +=3D [ - { 'name': 'storagebackendsheepdogtest', 'link_with': [ storage_driver_= impl_lib, storage_backend_sheepdog_priv_lib ] }, - ] -endif - if conf.has('WITH_VBOX') tests +=3D [ { 'name': 'vboxsnapshotxmltest', 'link_with': [ vbox_driver_impl ] }, diff --git a/tests/storagebackendsheepdogtest.c b/tests/storagebackendsheep= dogtest.c deleted file mode 100644 index 8f27e40d46..0000000000 --- a/tests/storagebackendsheepdogtest.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * storagebackendsheepdogtest.c: storage backend for Sheepdog handling - * - * Copyright (C) 2014 Red Hat, Inc. - * Copyright (C) 2012 Sebastian Wiedenroth - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . - */ - -#include - -#include - -#include - -#include "internal.h" -#include "testutils.h" -#define LIBVIRT_STORAGE_BACKEND_SHEEPDOG_PRIV_H_ALLOW -#include "storage/storage_backend_sheepdog_priv.h" - -#define VIR_FROM_THIS VIR_FROM_NONE - -typedef struct { - const char *output; - int expected_return; - uint64_t expected_capacity; - uint64_t expected_allocation; -} collie_test; - -struct testNodeInfoParserData { - collie_test data; - const char *poolxml; -}; - -struct testVDIListParserData { - collie_test data; - const char *poolxml; - const char *volxml; -}; - - -static int -test_node_info_parser(const void *opaque) -{ - const struct testNodeInfoParserData *data =3D opaque; - collie_test test =3D data->data; - g_autofree char *output =3D NULL; - g_autoptr(virStoragePoolDef) pool =3D NULL; - - if (!(pool =3D virStoragePoolDefParseFile(data->poolxml))) - return -1; - - output =3D g_strdup(test.output); - - if (virStorageBackendSheepdogParseNodeInfo(pool, output) !=3D - test.expected_return) - return -1; - - if (test.expected_return) - return 0; - - if (pool->capacity =3D=3D test.expected_capacity && - pool->allocation =3D=3D test.expected_allocation) - return 0; - - return -1; -} - -static int -test_vdi_list_parser(const void *opaque) -{ - const struct testVDIListParserData *data =3D opaque; - collie_test test =3D data->data; - g_autofree char *output =3D NULL; - g_autoptr(virStoragePoolDef) pool =3D NULL; - g_autoptr(virStorageVolDef) vol =3D NULL; - - if (!(pool =3D virStoragePoolDefParseFile(data->poolxml))) - return -1; - - if (!(vol =3D virStorageVolDefParseFile(pool, data->volxml, 0))) - return -1; - - output =3D g_strdup(test.output); - - if (virStorageBackendSheepdogParseVdiList(vol, output) !=3D - test.expected_return) - return -1; - - if (test.expected_return) - return 0; - - if (vol->target.capacity =3D=3D test.expected_capacity && - vol->target.allocation =3D=3D test.expected_allocation) - return 0; - - return -1; -} - - -static int -mymain(void) -{ - int ret =3D 0; - g_autofree char *poolxml =3D NULL; - g_autofree char *volxml =3D NULL; - - collie_test node_info_tests[] =3D { - {"", -1, 0, 0}, - {"Total 15245667872 117571104 0% 20972341\n", 0, 15245667872, 1175= 71104}, - {"To", -1, 0, 0}, - {"asdf\nasdf", -1, 0, 0}, - {"Total ", -1, 0, 0}, - {"Total 1", -1, 0, 0}, - {"Total 1\n", -1, 0, 0}, - {"Total 1 ", -1, 0, 0}, - {"Total 1 2", -1, 0, 0}, - {"Total 1 2 ", -1, 0, 0}, - {"Total 1 2\n", 0, 1, 2}, - {"Total 1 2 \n", 0, 1, 2}, - {"Total a 2 \n", -1, 0, 0}, - {"Total 1 b \n", -1, 0, 0}, - {"Total a b \n", -1, 0, 0}, - {"stuff\nTotal 1 2 \n", 0, 1, 2}, - {"0 1 2 3\nTotal 1 2 \n", 0, 1, 2}, - {NULL, 0, 0, 0} - }; - - collie_test vdi_list_tests[] =3D { - {"", -1, 0, 0}, - {"=3D test 3 10 20 0 1336557216 7c2b27\n", 0, 10, 20}, - {"=3D test\\ with\\ spaces 3 10 20 0 1336557216 7c2b27\n", 0, 10, = 20}, - {"=3D backslashattheend\\\\ 3 10 20 0 1336557216 7c2b27\n", 0, 10,= 20}, - {"s test 1 10 20 0 1336556634 7c2b25\n=3D test 3 50 60 0 133655721= 6 7c2b27\n", 0, 50, 60}, - {"=3D", -1, 0, 0}, - {"=3D test", -1, 0, 0}, - {"=3D test ", -1, 0, 0}, - {"=3D test 1", -1, 0, 0}, - {"=3D test 1 ", -1, 0, 0}, - {"=3D test 1 2", -1, 0, 0}, - {"=3D test 1 2 ", -1, 0, 0}, - {"=3D test 1 2 3", -1, 0, 0}, - {NULL, 0, 0, 0} - }; - - collie_test *test =3D node_info_tests; - - poolxml =3D g_strdup_printf("%s/storagepoolxml2xmlin/pool-sheepdog.xml= ", - abs_srcdir); - - volxml =3D g_strdup_printf("%s/storagevolxml2xmlin/vol-sheepdog.xml", - abs_srcdir); - -#define DO_TEST_NODE(collie) \ - do { \ - struct testNodeInfoParserData data =3D { \ - .data =3D collie, \ - .poolxml =3D poolxml, \ - }; \ - if (virTestRun("node_info_parser", test_node_info_parser, \ - &data) < 0) \ - ret =3D -1; \ - } while (0) - - while (test->output !=3D NULL) { - DO_TEST_NODE(*test); - ++test; - } - - -#define DO_TEST_VDI(collie) \ - do { \ - struct testVDIListParserData data =3D { \ - .data =3D collie, \ - .poolxml =3D poolxml, \ - .volxml =3D volxml, \ - }; \ - if (virTestRun("vdi_list_parser", test_vdi_list_parser, \ - &data) < 0) \ - ret =3D -1; \ - } while (0) - - test =3D vdi_list_tests; - - while (test->output !=3D NULL) { - DO_TEST_VDI(*test); - ++test; - } - - return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; -} - -VIR_TEST_MAIN(mymain) diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtes= t.c index 487481b7ee..04ff45f98d 100644 --- a/tests/storagepoolxml2argvtest.c +++ b/tests/storagepoolxml2argvtest.c @@ -175,7 +175,6 @@ mymain(void) DO_TEST_FAIL("pool-mpath"); DO_TEST_FAIL("pool-iscsi-multiiqn"); DO_TEST_FAIL("pool-iscsi-vendor-product"); - DO_TEST_FAIL("pool-sheepdog"); DO_TEST_FAIL("pool-gluster"); DO_TEST_FAIL("pool-gluster-sub"); DO_TEST_FAIL("pool-scsi-type-scsi-host-stable"); diff --git a/tests/storagepoolxml2xmlin/pool-sheepdog.xml b/tests/storagepo= olxml2xmlin/pool-sheepdog.xml deleted file mode 100644 index 49b6baf014..0000000000 --- a/tests/storagepoolxml2xmlin/pool-sheepdog.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - sheepdog - - - 65fcba04-5b13-bd93-cff3-52ce48e11ad7 - sheepdog - diff --git a/tests/storagepoolxml2xmlout/pool-sheepdog.xml b/tests/storagep= oolxml2xmlout/pool-sheepdog.xml deleted file mode 100644 index 000c068677..0000000000 --- a/tests/storagepoolxml2xmlout/pool-sheepdog.xml +++ /dev/null @@ -1,11 +0,0 @@ - - sheepdog - 65fcba04-5b13-bd93-cff3-52ce48e11ad7 - 0 - 0 - 0 - - - sheepdog - - diff --git a/tests/storagepoolxml2xmltest.c b/tests/storagepoolxml2xmltest.c index 2bad858033..76d6f54b33 100644 --- a/tests/storagepoolxml2xmltest.c +++ b/tests/storagepoolxml2xmltest.c @@ -86,7 +86,6 @@ mymain(void) DO_TEST("pool-mpath"); DO_TEST("pool-iscsi-multiiqn"); DO_TEST("pool-iscsi-vendor-product"); - DO_TEST("pool-sheepdog"); DO_TEST("pool-gluster"); DO_TEST("pool-gluster-sub"); DO_TEST("pool-scsi-type-scsi-host-stable"); diff --git a/tests/storagevolxml2xmlin/vol-sheepdog.xml b/tests/storagevolx= ml2xmlin/vol-sheepdog.xml deleted file mode 100644 index d6e920bb81..0000000000 --- a/tests/storagevolxml2xmlin/vol-sheepdog.xml +++ /dev/null @@ -1,10 +0,0 @@ - - test2 - - - 1024 - 0 - - sheepdog:test2 - - diff --git a/tests/storagevolxml2xmlout/vol-sheepdog.xml b/tests/storagevol= xml2xmlout/vol-sheepdog.xml deleted file mode 100644 index 47fb8eb418..0000000000 --- a/tests/storagevolxml2xmlout/vol-sheepdog.xml +++ /dev/null @@ -1,8 +0,0 @@ - - test2 - 1024 - 0 - - sheepdog:test2 - - diff --git a/tests/storagevolxml2xmltest.c b/tests/storagevolxml2xmltest.c index 5d06821cd0..161cb7c6bc 100644 --- a/tests/storagevolxml2xmltest.c +++ b/tests/storagevolxml2xmltest.c @@ -92,7 +92,6 @@ mymain(void) DO_TEST("pool-disk", "vol-partition"); DO_TEST("pool-logical", "vol-logical"); DO_TEST("pool-logical", "vol-logical-backing"); - DO_TEST("pool-sheepdog", "vol-sheepdog"); DO_TEST("pool-gluster", "vol-gluster-dir"); DO_TEST("pool-gluster", "vol-gluster-dir-neg-uid"); DO_TEST_FULL("pool-dir", "vol-qcow2-nocapacity", --=20 2.37.1 From nobody Fri May 17 06:43:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1661179743; cv=none; d=zohomail.com; s=zohoarc; b=CkaBh5hY88nHoqJjPGL1kSAaXaU/0TIbp5h6WS3YEWH4amLLGpc203tGNZUXZR8HvDHA0St8icV7Du1QA7SIm7jP6tLZS8wLtcGX4Y2lziBgtayY/Fe093Um31xGR6iFqrldm4JvVgaCaZ2q2/7AU2cMdgbDmZNGp0hoBqblE5I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661179743; 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; bh=Fk+r60dzYs6ux7hteeyDgk7hmoEjK7zFqvI2rSV9Ny4=; b=YDfu4wlruh1xEGGCRFcrCi52fmEY/+zdhdj8hs0NTBqBeSM9oqsYd1x1zSsXNxZuyMcbH5L6T1UQvtSFGFTflQXZrlUQaR/9U/wBxzJRCWIwAJaPfP2v3OgNV1N7JT0DwNNqk+D5kMZaifuBQkPDnIQfjlrZ9VDO/nTQxxq64tE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1661179743194282.15694016261796; Mon, 22 Aug 2022 07:49:03 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-662-G9e1oi66N0OyBCuPgVKaUg-1; Mon, 22 Aug 2022 10:48:28 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 17F3D80390C; Mon, 22 Aug 2022 14:48:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 050FE909FE; Mon, 22 Aug 2022 14:48:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DD0B51946A52; Mon, 22 Aug 2022 14:48:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CB22E1946A5D for ; Mon, 22 Aug 2022 14:48:22 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9DAEA492C3B; Mon, 22 Aug 2022 14:48:22 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id E79E7403348 for ; Mon, 22 Aug 2022 14:48:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661179742; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Fk+r60dzYs6ux7hteeyDgk7hmoEjK7zFqvI2rSV9Ny4=; b=OeXF6fxJKpLwjam65pMEM4BG4PWSjEQmPT2vjCaXKXrztfzoUBuKaeHNagYmMYNG3Oxzyu v9abg2O8ezf/o0dbUhDeY5jyTPGFronc+4JNhVgJfYUP8LBDvAMowygzXLdHpuHseJ2wNL yRsNrbS6QUB6JYT+dycv8kbXEgA5+P0= X-MC-Unique: G9e1oi66N0OyBCuPgVKaUg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/5] Remove support for building the sheepdog storage driver backend Date: Mon, 22 Aug 2022 16:48:14 +0200 Message-Id: <5eb913182635c6c55dce41ea13d5cf7ec5b73403.1661179167.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1661179744210100001 Content-Type: text/plain; charset="utf-8" The sheepdog project is unmaintained, with last commit in 2018 and numerous unanswered issues reported. Remove the libvirt storage driver support for it to follow the removal of the client support in qemu. Signed-off-by: Peter Krempa Reviewed-by: Claudio Fontana Reviewed-by: J=C3=A1n Tomko --- docs/formatstorage.rst | 6 ++++-- docs/storage.rst | 3 ++- meson.build | 9 +-------- meson_options.txt | 2 +- src/storage/meson.build | 25 ------------------------- src/storage/storage_backend.c | 6 ------ tools/virsh.c | 3 --- 7 files changed, 8 insertions(+), 46 deletions(-) diff --git a/docs/formatstorage.rst b/docs/formatstorage.rst index a8149e450c..97671efacf 100644 --- a/docs/formatstorage.rst +++ b/docs/formatstorage.rst @@ -1,4 +1,5 @@ .. role:: since +.. role:: removed =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Storage pool and volume XML format @@ -17,8 +18,9 @@ volume size, or placement. The top level tag for a storage pool document is 'pool'. It has a single attribute ``type``, which is one of ``dir``, ``fs``, ``netfs``, ``disk``, ``iscsi``, ``logical``, ``scsi`` (all :since:`since 0.4.1` ), ``mpath`` ( -:since:`since 0.7.1` ), ``rbd`` ( :since:`since 0.9.13` ), ``sheepdog`` ( -:since:`since 0.10.0` ), ``gluster`` ( :since:`since 1.2.0` ), ``zfs`` ( +:since:`since 0.7.1` ), ``rbd`` ( :since:`since 0.9.13` ), +``sheepdog`` (:since:`since 0.10.0`, :removed:`removed in 8.7.0` ), +``gluster`` ( :since:`since 1.2.0` ), ``zfs`` ( :since:`since 1.2.8` ), ``vstorage`` ( :since:`since 3.1.0` ), or ``iscsi-direct`` ( :since:`since 4.7.0` ). This corresponds to the storage backend drivers listed further along in this document. diff --git a/docs/storage.rst b/docs/storage.rst index 9d5b193e31..af4db256c0 100644 --- a/docs/storage.rst +++ b/docs/storage.rst @@ -1,4 +1,5 @@ .. role:: since +.. role:: removed =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Storage Management @@ -575,7 +576,7 @@ Sheepdog pool This provides a pool based on a Sheepdog Cluster. Sheepdog is a distributed storage system for QEMU/KVM. It provides highly available block level stor= age volumes that can be attached to QEMU/KVM virtual machines. The cluster must -already be formatted. :since:`Since 0.9.13` +already be formatted. :since:`Introduced in 0.9.13` :removed:`removed in 8= .7.0.` Example Sheepdog pool input ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/meson.build b/meson.build index 0b3187ad88..abfae91ee9 100644 --- a/meson.build +++ b/meson.build @@ -1917,13 +1917,7 @@ if conf.has('WITH_LIBVIRTD') endif if not get_option('storage_sheepdog').disabled() - sheepdogcli_prog =3D find_program('dog', required: get_option('storage= _sheepdog'), dirs: libvirt_sbin_path) - - if sheepdogcli_prog.found() - use_storage =3D true - conf.set('WITH_STORAGE_SHEEPDOG', 1) - conf.set_quoted('SHEEPDOGCLI', sheepdogcli_prog.path()) - endif + error('The sheepdog storage backend is no longer supported') endif if not get_option('storage_vstorage').disabled() @@ -2251,7 +2245,6 @@ storagedriver_summary =3D { 'mpath': conf.has('WITH_STORAGE_MPATH'), 'Disk': conf.has('WITH_STORAGE_DISK'), 'RBD': conf.has('WITH_STORAGE_RBD'), - 'Sheepdog': conf.has('WITH_STORAGE_SHEEPDOG'), 'Gluster': conf.has('WITH_STORAGE_GLUSTER'), 'ZFS': conf.has('WITH_STORAGE_ZFS'), 'Virtuozzo storage': conf.has('WITH_STORAGE_VSTORAGE'), diff --git a/meson_options.txt b/meson_options.txt index 5b43cdbd6b..00b6df8254 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -88,7 +88,7 @@ option('storage_lvm', type: 'feature', value: 'auto', des= cription: 'LVM backend option('storage_mpath', type: 'feature', value: 'auto', description: 'mpat= h backend for the storage driver') option('storage_rbd', type: 'feature', value: 'auto', description: 'RADOS = Block Device backend for the storage driver') option('storage_scsi', type: 'feature', value: 'auto', description: 'SCSI = backend for the storage driver') -option('storage_sheepdog', type: 'feature', value: 'auto', description: 'S= heepdog backend for the storage driver') +option('storage_sheepdog', type: 'feature', value: 'disabled', description= : 'option flag preserved for compatibility') option('storage_vstorage', type: 'feature', value: 'auto', description: 'V= irtuozzo storage backend for the storage driver') option('storage_zfs', type: 'feature', value: 'auto', description: 'ZFS ba= ckend for the storage driver') diff --git a/src/storage/meson.build b/src/storage/meson.build index 26e7ff1a1a..a8b173db96 100644 --- a/src/storage/meson.build +++ b/src/storage/meson.build @@ -51,10 +51,6 @@ storage_backend_scsi_sources =3D [ 'storage_backend_scsi.c', ] -storage_backend_sheepdog_sources =3D [ - 'storage_backend_sheepdog.c', -] - storage_backend_vstorage_sources =3D [ 'storage_backend_vstorage.c', ] @@ -239,27 +235,6 @@ if conf.has('WITH_STORAGE_SCSI') } endif -if conf.has('WITH_STORAGE_SHEEPDOG') - storage_backend_sheepdog_priv_lib =3D static_library( - 'virt_storage_backend_sheepdog_priv', - storage_backend_sheepdog_sources, - dependencies: [ - src_dep, - ], - include_directories: [ - conf_inc_dir, - ], - ) - - virt_modules +=3D { - 'name': 'virt_storage_backend_sheepdog', - 'link_whole': [ - storage_backend_sheepdog_priv_lib, - ], - 'install_dir': storage_backend_install_dir, - } -endif - if conf.has('WITH_STORAGE_VSTORAGE') virt_modules +=3D { 'name': 'virt_storage_backend_vstorage', diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c index 3e7a5ae67d..d6e02a47a8 100644 --- a/src/storage/storage_backend.c +++ b/src/storage/storage_backend.c @@ -55,9 +55,6 @@ #if WITH_STORAGE_RBD # include "storage_backend_rbd.h" #endif -#if WITH_STORAGE_SHEEPDOG -# include "storage_backend_sheepdog.h" -#endif #if WITH_STORAGE_GLUSTER # include "storage_backend_gluster.h" #endif @@ -129,9 +126,6 @@ virStorageBackendDriversRegister(bool allbackends G_GNU= C_UNUSED) #if WITH_STORAGE_RBD VIR_STORAGE_BACKEND_REGISTER(virStorageBackendRBDRegister, "rbd"); #endif -#if WITH_STORAGE_SHEEPDOG - VIR_STORAGE_BACKEND_REGISTER(virStorageBackendSheepdogRegister, "sheep= dog"); -#endif #if WITH_STORAGE_GLUSTER VIR_STORAGE_BACKEND_REGISTER(virStorageBackendGlusterRegister, "gluste= r"); #endif diff --git a/tools/virsh.c b/tools/virsh.c index 4a4ceef4ec..b37d2ce12f 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -579,9 +579,6 @@ virshShowVersion(vshControl *ctl G_GNUC_UNUSED) #ifdef WITH_STORAGE_RBD vshPrint(ctl, " RBD"); #endif -#ifdef WITH_STORAGE_SHEEPDOG - vshPrint(ctl, " Sheepdog"); -#endif #ifdef WITH_STORAGE_GLUSTER vshPrint(ctl, " Gluster"); #endif --=20 2.37.1 From nobody Fri May 17 06:43:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1661179710; cv=none; d=zohomail.com; s=zohoarc; b=mEW8UkQkqGStBT+HF+v9R9F3gg2tDHaA/UU4w0jlRqczghCj8regdCL6tV5cr7xbokDsUeu4DttIxFsOuwQB49dbixYj87MUeUGQgl7hDPO7m7PEng9KGZvW3Rtglh9Sk5kAPJ8tlAQ9nL0g/wCCrp3FgOplZ7I1C9adLMASW5I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661179710; 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; bh=GAKEOwEZ9tpEIDGnpteSsLKcFNFYBNEE3ehGBRHyaN8=; b=AtnTrC/Of5HnwDY8JIoZUr595voACrPf9Bj7+Gi7RiZh8D/VFCEnTPUzCmy4sf5GdFjpCEtOm87ELsO4NA/D5bUWYK9i/tEEdOL2rXIWaFEraGGcpev4fuW6tGQGTUQ6qILRvwlwi9JD400elXgXvLRXuHaSM9rMrVT77TLggSI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1661179710930756.7595481325488; Mon, 22 Aug 2022 07:48:30 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-151-Mowb47ACOsmkLpjMpMjqQg-1; Mon, 22 Aug 2022 10:48:28 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8E6AE1C0BDFA; Mon, 22 Aug 2022 14:48:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 78136945D2; Mon, 22 Aug 2022 14:48:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 37D6E1946A67; Mon, 22 Aug 2022 14:48:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B34E11946A47 for ; Mon, 22 Aug 2022 14:48:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A773040315A; Mon, 22 Aug 2022 14:48:23 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0EDF1492C3B for ; Mon, 22 Aug 2022 14:48:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661179710; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=GAKEOwEZ9tpEIDGnpteSsLKcFNFYBNEE3ehGBRHyaN8=; b=F5MidEF1WNq/m/Y+Ka7cZIdqLKhne0Ub8QJRsvTji2mRgPI4PaNsYRhPhzGUwbXAybZDD/ bfLhNuas0YovVviJrdaDfRvKQcVDAUkrOUO7Zu83NA8QwgWD5qM/UAaL5Im/7Rz+CpGZOb ZscoH8JaVx4mbEmLFHwfrtusamHfAtw= X-MC-Unique: Mowb47ACOsmkLpjMpMjqQg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/5] build: Drop the 'storage_sheepdog' build option completely Date: Mon, 22 Aug 2022 16:48:15 +0200 Message-Id: <10add72c8c1b908951e804c5ab04e659e76b0be0.1661179167.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1661179712727100001 Content-Type: text/plain; charset="utf-8" Currently the build option is accepted and unless explicitly enabled the build works just fine. In case it's desired we can completely remove the build option and then the packagers will need to stop passing them. Reviewed-by: Claudio Fontana Reviewed-by: J=C3=A1n Tomko --- libvirt.spec.in | 2 -- meson.build | 4 ---- meson_options.txt | 1 - 3 files changed, 7 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 4066d5509b..b199c624b8 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1170,7 +1170,6 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{_= specdir}/%{name}.spec) -Dstorage_disk=3Denabled \ -Dstorage_mpath=3Denabled \ %{?arg_storage_rbd} \ - -Dstorage_sheepdog=3Ddisabled \ %{?arg_storage_gluster} \ %{?arg_storage_zfs} \ -Dstorage_vstorage=3Ddisabled \ @@ -1282,7 +1281,6 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{_= specdir}/%{name}.spec) -Dstorage_mpath=3Ddisabled \ -Dstorage_rbd=3Ddisabled \ -Dstorage_scsi=3Ddisabled \ - -Dstorage_sheepdog=3Ddisabled \ -Dstorage_vstorage=3Ddisabled \ -Dstorage_zfs=3Ddisabled \ -Dsysctl_config=3Ddisabled \ diff --git a/meson.build b/meson.build index abfae91ee9..8d0debaaf4 100644 --- a/meson.build +++ b/meson.build @@ -1916,10 +1916,6 @@ if conf.has('WITH_LIBVIRTD') conf.set('WITH_STORAGE_SCSI', 1) endif - if not get_option('storage_sheepdog').disabled() - error('The sheepdog storage backend is no longer supported') - endif - if not get_option('storage_vstorage').disabled() vstorage_enable =3D true if host_machine.system() !=3D 'linux' diff --git a/meson_options.txt b/meson_options.txt index 00b6df8254..861c5577d2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -88,7 +88,6 @@ option('storage_lvm', type: 'feature', value: 'auto', des= cription: 'LVM backend option('storage_mpath', type: 'feature', value: 'auto', description: 'mpat= h backend for the storage driver') option('storage_rbd', type: 'feature', value: 'auto', description: 'RADOS = Block Device backend for the storage driver') option('storage_scsi', type: 'feature', value: 'auto', description: 'SCSI = backend for the storage driver') -option('storage_sheepdog', type: 'feature', value: 'disabled', description= : 'option flag preserved for compatibility') option('storage_vstorage', type: 'feature', value: 'auto', description: 'V= irtuozzo storage backend for the storage driver') option('storage_zfs', type: 'feature', value: 'auto', description: 'ZFS ba= ckend for the storage driver') --=20 2.37.1 From nobody Fri May 17 06:43:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1661179714; cv=none; d=zohomail.com; s=zohoarc; b=IioPvfZxiHCTFzS0OrgQWkI39W7LtVafzJDfjAN9tA//ka3QtqcJqxz0+MkFZHPmzEckn9XOb1h+uAbs1ZGz8aJyOFLLFl5eMyjxqhjK3sSdoOGYchuxmFVGAMLQtHQzU2DsJ196V25afouvXDOrui7q21qmO8pX0lkrQM/BKYA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661179714; 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; bh=I7I9UCyh1j5SsxSfZe2EDJ1pZnS6ALbnS3yo9QadL8k=; b=nvsmrzZuEgsabZzdBiq3yyZo4aTcOMy6ic3R+u+U7OmcJgju3NBictBhIBU9IZeXMsXppayGzNWzQ7Y6l8ulk7m16gJHNgNWtHVbZf1HSidQRhW1qkC5wP3mUvXdi0pnp+Duxsh//o8jBVBBeUXkwVbw34c82b8e4klBAni6T5Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1661179714564941.3354334216797; Mon, 22 Aug 2022 07:48:34 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-27-BXldlXKxOaKrwY43zJecrQ-1; Mon, 22 Aug 2022 10:48:29 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9F20F80418F; Mon, 22 Aug 2022 14:48:26 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89C77909FE; Mon, 22 Aug 2022 14:48:26 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 796311946A52; Mon, 22 Aug 2022 14:48:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 246991946A47 for ; Mon, 22 Aug 2022 14:48:25 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 19998492C3B; Mon, 22 Aug 2022 14:48:25 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2ABD4403348 for ; Mon, 22 Aug 2022 14:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661179713; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=I7I9UCyh1j5SsxSfZe2EDJ1pZnS6ALbnS3yo9QadL8k=; b=WLvrKrQOAubgh+oGDb4PrN7P1qsWycjZ8ezrAAyJVUlCDdQRrU3ZlF8lUpgCML9fC49N2t gv4ptFe52xtRZuE0WiNkW4ER6ZDXzoLWBLreswI1USYFuzg7K2uH0drK8E2D00xd4n6Z7l x9cJ/jd4wcoRvgEoYhATGebxTybAV88= X-MC-Unique: BXldlXKxOaKrwY43zJecrQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 5/5] storage: Remove the sheepdog storage driver backend source code Date: Mon, 22 Aug 2022 16:48:16 +0200 Message-Id: <6e6d2594bc690f1cb147d3bff69599a8e74a5246.1661179167.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1661179715113100001 Content-Type: text/plain; charset="utf-8" Remove the unused source code for the sheepdog storage backend. Signed-off-by: Peter Krempa Reviewed-by: Claudio Fontana Reviewed-by: J=C3=A1n Tomko --- po/POTFILES | 1 - src/storage/storage_backend_sheepdog.c | 376 -------------------- src/storage/storage_backend_sheepdog.h | 25 -- src/storage/storage_backend_sheepdog_priv.h | 30 -- 4 files changed, 432 deletions(-) delete mode 100644 src/storage/storage_backend_sheepdog.c delete mode 100644 src/storage/storage_backend_sheepdog.h delete mode 100644 src/storage/storage_backend_sheepdog_priv.h diff --git a/po/POTFILES b/po/POTFILES index 9621efb0d3..c3a370f8cc 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -229,7 +229,6 @@ src/storage/storage_backend_logical.c src/storage/storage_backend_mpath.c src/storage/storage_backend_rbd.c src/storage/storage_backend_scsi.c -src/storage/storage_backend_sheepdog.c src/storage/storage_backend_vstorage.c src/storage/storage_backend_zfs.c src/storage/storage_driver.c diff --git a/src/storage/storage_backend_sheepdog.c b/src/storage/storage_b= ackend_sheepdog.c deleted file mode 100644 index 6490dfae52..0000000000 --- a/src/storage/storage_backend_sheepdog.c +++ /dev/null @@ -1,376 +0,0 @@ -/* - * storage_backend_sheepdog.c: storage backend for Sheepdog handling - * - * Copyright (C) 2013-2014 Red Hat, Inc. - * Copyright (C) 2012 Wido den Hollander - * Copyright (C) 2012 Frank Spijkerman - * Copyright (C) 2012 Sebastian Wiedenroth - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . - */ - -#include - -#include "virerror.h" -#include "storage_backend_sheepdog.h" -#define LIBVIRT_STORAGE_BACKEND_SHEEPDOG_PRIV_H_ALLOW -#include "storage_backend_sheepdog_priv.h" -#include "storage_conf.h" -#include "vircommand.h" -#include "viralloc.h" -#include "virstring.h" -#include "storage_util.h" - -#define VIR_FROM_THIS VIR_FROM_STORAGE - -static int virStorageBackendSheepdogRefreshVol(virStoragePoolObj *pool, - virStorageVolDef *vol); - -void virStorageBackendSheepdogAddHostArg(virCommand *cmd, - virStoragePoolObj *pool); - -int -virStorageBackendSheepdogParseNodeInfo(virStoragePoolDef *pool, - char *output) -{ - /* fields: - * node id/total, size, used, use%, [total vdi size] - * - * example output: - * 0 15245667872 117571104 0% - * Total 15245667872 117571104 0% 20972341 - */ - - const char *p, *next; - - pool->allocation =3D pool->capacity =3D pool->available =3D 0; - - p =3D output; - do { - char *end; - - if ((next =3D strchr(p, '\n'))) - ++next; - else - break; - - if (!STRPREFIX(p, "Total ")) - continue; - - p =3D p + 6; - - if (virStrToLong_ull(p, &end, 10, &pool->capacity) < 0) - break; - - if ((p =3D end + 1) > next) - break; - - if (virStrToLong_ull(p, &end, 10, &pool->allocation) < 0) - break; - - pool->available =3D pool->capacity - pool->allocation; - return 0; - - } while ((p =3D next)); - - return -1; -} - -void -virStorageBackendSheepdogAddHostArg(virCommand *cmd, - virStoragePoolObj *pool) -{ - virStoragePoolDef *def =3D virStoragePoolObjGetDef(pool); - const char *address =3D "localhost"; - int port =3D 7000; - if (def->source.nhost > 0) { - if (def->source.hosts[0].name !=3D NULL) - address =3D def->source.hosts[0].name; - if (def->source.hosts[0].port) - port =3D def->source.hosts[0].port; - } - virCommandAddArg(cmd, "-a"); - virCommandAddArgFormat(cmd, "%s", address); - virCommandAddArg(cmd, "-p"); - virCommandAddArgFormat(cmd, "%d", port); -} - -static int -virStorageBackendSheepdogAddVolume(virStoragePoolObj *pool, const char *di= skInfo) -{ - g_autoptr(virStorageVolDef) vol =3D NULL; - - if (diskInfo =3D=3D NULL) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("Missing disk info when adding volume")); - return -1; - } - - vol =3D g_new0(virStorageVolDef, 1); - - vol->name =3D g_strdup(diskInfo); - - vol->type =3D VIR_STORAGE_VOL_NETWORK; - - if (virStorageBackendSheepdogRefreshVol(pool, vol) < 0) - return -1; - - if (virStoragePoolObjAddVol(pool, vol) < 0) - return -1; - vol =3D NULL; - - return 0; -} - -static int -virStorageBackendSheepdogRefreshAllVol(virStoragePoolObj *pool) -{ - size_t i; - g_autofree char *output =3D NULL; - g_auto(GStrv) lines =3D NULL; - g_autoptr(virCommand) cmd =3D NULL; - - cmd =3D virCommandNewArgList(SHEEPDOGCLI, "vdi", "list", "-r", NULL); - virStorageBackendSheepdogAddHostArg(cmd, pool); - virCommandSetOutputBuffer(cmd, &output); - if (virCommandRun(cmd, NULL) < 0) - return -1; - - lines =3D g_strsplit(output, "\n", 0); - if (lines =3D=3D NULL) - return -1; - - for (i =3D 0; lines[i]; i++) { - g_auto(GStrv) cells =3D NULL; - - cells =3D g_strsplit(lines[i], " ", 0); - - if (cells !=3D NULL && cells[0] && cells[1]) { - if (virStorageBackendSheepdogAddVolume(pool, cells[1]) < 0) - return -1; - } - } - - return 0; -} - - -static int -virStorageBackendSheepdogRefreshPool(virStoragePoolObj *pool) -{ - g_autofree char *output =3D NULL; - g_autoptr(virCommand) cmd =3D NULL; - - cmd =3D virCommandNewArgList(SHEEPDOGCLI, "node", "info", "-r", NULL); - virStorageBackendSheepdogAddHostArg(cmd, pool); - virCommandSetOutputBuffer(cmd, &output); - if (virCommandRun(cmd, NULL) < 0) - return -1; - - if (virStorageBackendSheepdogParseNodeInfo(virStoragePoolObjGetDef(poo= l), - output) < 0) - return -1; - - return virStorageBackendSheepdogRefreshAllVol(pool); -} - - -static int -virStorageBackendSheepdogDeleteVol(virStoragePoolObj *pool, - virStorageVolDef *vol, - unsigned int flags) -{ - g_autoptr(virCommand) cmd =3D NULL; - - virCheckFlags(0, -1); - - cmd =3D virCommandNewArgList(SHEEPDOGCLI, "vdi", "delete", vol->name, = NULL); - virStorageBackendSheepdogAddHostArg(cmd, pool); - return virCommandRun(cmd, NULL); -} - - -static int -virStorageBackendSheepdogCreateVol(virStoragePoolObj *pool, - virStorageVolDef *vol) -{ - virStoragePoolDef *def =3D virStoragePoolObjGetDef(pool); - - if (vol->target.encryption !=3D NULL) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - "%s", _("storage pool does not support encrypted " - "volumes")); - return -1; - } - - vol->type =3D VIR_STORAGE_VOL_NETWORK; - - VIR_FREE(vol->key); - vol->key =3D g_strdup_printf("%s/%s", def->source.name, vol->name); - - VIR_FREE(vol->target.path); - vol->target.path =3D g_strdup(vol->name); - - return 0; -} - - -static int -virStorageBackendSheepdogBuildVol(virStoragePoolObj *pool, - virStorageVolDef *vol, - unsigned int flags) -{ - g_autoptr(virCommand) cmd =3D NULL; - - virCheckFlags(0, -1); - - if (!vol->target.capacity) { - virReportError(VIR_ERR_NO_SUPPORT, "%s", - _("volume capacity required for this pool")); - return -1; - } - - cmd =3D virCommandNewArgList(SHEEPDOGCLI, "vdi", "create", vol->name, = NULL); - virCommandAddArgFormat(cmd, "%llu", vol->target.capacity); - virStorageBackendSheepdogAddHostArg(cmd, pool); - return virCommandRun(cmd, NULL); -} - - -int -virStorageBackendSheepdogParseVdiList(virStorageVolDef *vol, - char *output) -{ - /* fields: - * current/clone/snapshot, name, id, size, used, shared, creation time= , vdi id, [tag] - * - * example output: - * s test 1 10 0 0 1336556634 7c2b25 - * s test 2 10 0 0 1336557203 7c2b26 - * =3D test 3 10 0 0 1336557216 7c2b27 - */ - - int id; - const char *p, *next; - - vol->target.allocation =3D vol->target.capacity =3D 0; - - p =3D output; - do { - char *end; - - if ((next =3D strchr(p, '\n'))) - ++next; - - /* ignore snapshots */ - if (*p !=3D '=3D') - continue; - - /* skip space */ - if (p + 2 < next) - p +=3D 2; - else - return -1; - - /* skip name */ - while (*p !=3D '\0' && *p !=3D ' ') { - if (*p =3D=3D '\\') - ++p; - ++p; - } - - if (virStrToLong_i(p, &end, 10, &id) < 0) - return -1; - - p =3D end + 1; - - if (virStrToLong_ull(p, &end, 10, &vol->target.capacity) < 0) - return -1; - - p =3D end + 1; - - if (virStrToLong_ull(p, &end, 10, &vol->target.allocation) < 0) - return -1; - - return 0; - } while ((p =3D next)); - - return -1; -} - -static int -virStorageBackendSheepdogRefreshVol(virStoragePoolObj *pool, - virStorageVolDef *vol) -{ - char *output =3D NULL; - virStoragePoolDef *def =3D virStoragePoolObjGetDef(pool); - g_autoptr(virCommand) cmd =3D NULL; - - cmd =3D virCommandNewArgList(SHEEPDOGCLI, "vdi", "list", vol->name, "-= r", NULL); - virStorageBackendSheepdogAddHostArg(cmd, pool); - virCommandSetOutputBuffer(cmd, &output); - if (virCommandRun(cmd, NULL) < 0) - return -1; - - if (virStorageBackendSheepdogParseVdiList(vol, output) < 0) - return -1; - - vol->type =3D VIR_STORAGE_VOL_NETWORK; - - VIR_FREE(vol->key); - vol->key =3D g_strdup_printf("%s/%s", def->source.name, vol->name); - - VIR_FREE(vol->target.path); - vol->target.path =3D g_strdup(vol->name); - - return 0; -} - - -static int -virStorageBackendSheepdogResizeVol(virStoragePoolObj *pool, - virStorageVolDef *vol, - unsigned long long capacity, - unsigned int flags) -{ - g_autoptr(virCommand) cmd =3D NULL; - - virCheckFlags(0, -1); - - cmd =3D virCommandNewArgList(SHEEPDOGCLI, "vdi", "resize", vol->name, = NULL); - virCommandAddArgFormat(cmd, "%llu", capacity); - virStorageBackendSheepdogAddHostArg(cmd, pool); - return virCommandRun(cmd, NULL); -} - - - -virStorageBackend virStorageBackendSheepdog =3D { - .type =3D VIR_STORAGE_POOL_SHEEPDOG, - - .refreshPool =3D virStorageBackendSheepdogRefreshPool, - .createVol =3D virStorageBackendSheepdogCreateVol, - .buildVol =3D virStorageBackendSheepdogBuildVol, - .refreshVol =3D virStorageBackendSheepdogRefreshVol, - .deleteVol =3D virStorageBackendSheepdogDeleteVol, - .resizeVol =3D virStorageBackendSheepdogResizeVol, -}; - - -int -virStorageBackendSheepdogRegister(void) -{ - return virStorageBackendRegister(&virStorageBackendSheepdog); -} diff --git a/src/storage/storage_backend_sheepdog.h b/src/storage/storage_b= ackend_sheepdog.h deleted file mode 100644 index e1fde6373b..0000000000 --- a/src/storage/storage_backend_sheepdog.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * storage_backend_sheepdog.h: storage backend for Sheepdog handling - * - * Copyright (C) 2012 Wido den Hollander - * Copyright (C) 2012 Frank Spijkerman - * Copyright (C) 2012 Sebastian Wiedenroth - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . - */ - -#pragma once - -int virStorageBackendSheepdogRegister(void); diff --git a/src/storage/storage_backend_sheepdog_priv.h b/src/storage/stor= age_backend_sheepdog_priv.h deleted file mode 100644 index a8cadb5542..0000000000 --- a/src/storage/storage_backend_sheepdog_priv.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * storage_backend_sheepdog_priv.h: header for functions necessary in tests - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . - */ - -#ifndef LIBVIRT_STORAGE_BACKEND_SHEEPDOG_PRIV_H_ALLOW -# error "storage_backend_sheepdog_priv.h may only be included by storage_b= ackend_sheepdog.c or test suites" -#endif /* LIBVIRT_STORAGE_BACKEND_SHEEPDOG_PRIV_H_ALLOW */ - -#pragma once - -#include "conf/storage_conf.h" - -int virStorageBackendSheepdogParseNodeInfo(virStoragePoolDef *pool, - char *output); -int virStorageBackendSheepdogParseVdiList(virStorageVolDef *vol, - char *output); --=20 2.37.1